Expand ~ in the glob path of 'glob curves to playlist'.
[hooke.git] / hooke / plugin / playlist.py
index 616cfed6739c52ff73627cd0aff6ffc97cb19973..88608d6ea8fc6f5fba2bb9c35d97541f545987d5 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2010 W. Trevor King <wking@drexel.edu>
+# Copyright (C) 2010-2011 W. Trevor King <wking@drexel.edu>
 #
 # This file is part of Hooke.
 #
@@ -322,7 +322,7 @@ Additional information for the input :class:`hooke.curve.Curve`.
 
     def _run(self, hooke, inqueue, outqueue, params):
         p = self._playlist(hooke, params)
-        for path in sorted(glob.glob(params['input'])):
+        for path in sorted(glob.glob(os.path.expanduser(params['input']))):
             try:
                 p.append_curve_by_path(path, params['info'], hooke=hooke)
             except NotRecognized, e:
@@ -345,8 +345,9 @@ Index of target curve.
             help=self.__doc__, plugin=plugin)
 
     def _run(self, hooke, inqueue, outqueue, params):
-        self._playlist(hooke, params).pop(params['index'])
-        self._playlist(hooke, params).jump(params.index())
+        playlist = self._playlist(hooke, params)
+        playlist.pop(params['index'])
+        playlist.jump(playlist.index())
 
 
 class ApplyCommand (PlaylistCommand):