projects
/
hooke.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a145b0b
)
Fix broken hooke.plugin.playlist.playlist_name_callback
author
W. Trevor King
<wking@drexel.edu>
Wed, 19 May 2010 06:40:52 +0000
(
02:40
-0400)
committer
W. Trevor King
<wking@drexel.edu>
Wed, 19 May 2010 06:40:52 +0000
(
02:40
-0400)
hooke/plugin/playlist.py
patch
|
blob
|
history
diff --git
a/hooke/plugin/playlist.py
b/hooke/plugin/playlist.py
index dd6e6261d33ad86052c201a0f051c055eadb8c8f..980123cd39482ffac9f52e7a65563b26f5c13a53 100644
(file)
--- a/
hooke/plugin/playlist.py
+++ b/
hooke/plugin/playlist.py
@@
-57,7
+57,13
@@
playlist.
""".strip())
def playlist_name_callback(hooke, command, argument, value):
- return hooke.playlists.free_name()
+ i = 0
+ names = [p.name for p in hooke.playlists]
+ while True:
+ name = 'playlist-%d' % i
+ if name not in names:
+ return name
+ i += 1
PlaylistNameArgument = Argument(
name='name', type='string', optional=True, callback=playlist_name_callback,