Adjust path (if it exists) for the child playlist in FilterCommand
authorW. Trevor King <wking@drexel.edu>
Wed, 19 May 2010 10:05:18 +0000 (06:05 -0400)
committerW. Trevor King <wking@drexel.edu>
Wed, 19 May 2010 10:05:18 +0000 (06:05 -0400)
hooke/plugin/playlist.py

index a17a892a47822bf9ffc565f6b3c317fc6db9bdb6..3940a2fa0c36ba1623db5dc2876674fab71c1dd8 100644 (file)
@@ -21,6 +21,7 @@ several associated :class:`hooke.command.Command`\s for handling
 :mod:`hooke.playlist` classes.
 """
 
+import os.path
 import glob
 
 from ..command import Command, Argument, Failure
@@ -301,6 +302,8 @@ Function returning `True` for "good" curves.
         p = params['playlist'].filter(filter_fn,
             hooke=hooke, inqueue=inqueue, outqueue=outqueue, params=params)
         p.name = params['name']
+        if hasattr(p, 'path') and p.path != None:
+            p.set_path(os.path.join(os.path.dirname(p.path), p.name))
         hooke.playlists.append(p)
         outqueue.put(p)