Use the playlist's basename if it doesn't colide with earlier playlists.
authorW. Trevor King <wking@drexel.edu>
Fri, 13 Aug 2010 02:08:24 +0000 (22:08 -0400)
committerW. Trevor King <wking@drexel.edu>
Fri, 13 Aug 2010 02:08:24 +0000 (22:08 -0400)
hooke/plugin/playlist.py

index 85fd2d88ca4690a2dab0dbbcc9e9394334b31563..da16dfc8e348dac0c7f898acdfca941501faf467 100644 (file)
@@ -247,6 +247,9 @@ Drivers for loading curves.
     def _run(self, hooke, inqueue, outqueue, params):
         p = FilePlaylist(drivers=params['drivers'], path=params['input'])
         p.load(hooke=hooke)
+        playlist_names = [p.name for p in hooke.playlists]
+        if p.name not in playlist_names:
+            params['output playlist'] = p.name  # HACK: override input name.  How to tell if it is callback-generated?
         self._set_playlist(hooke, params, p)
        outqueue.put(p)