Update of /cvsroot/freevo/freevo/src/audio/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13959
Modified Files:
playlist.py
Log Message:
better enqueue, osd messages and dir handling
Index: playlist.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/plugins/playlist.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** playlist.py 31 Jan 2004 13:19:15 -0000 1.6
--- playlist.py 14 Feb 2004 19:30:54 -0000 1.7
***************
*** 48,51 ****
--- 48,53 ----
import config
import rc
+ import util
+
from event import *
***************
*** 69,73 ****
Add something like this to your local_conf.py
! EVENTS['menu']['REC'] = Event(MENU_CALL_ITEM_ACTION, arg='queue_a_track')
"""
--- 71,76 ----
Add something like this to your local_conf.py
! EVENTS['menu']['REC'] = Event(MENU_CALL_ITEM_ACTION, arg='queue_a_track')
! EVENTS['menu']['SAVE'] = Event(MENU_CALL_ITEM_ACTION, arg='close_playlist')
"""
***************
*** 98,107 ****
# that could cause us much trouble
return []
-
- return [ ( self.queue_file, _( 'Enqueue this Music in Playlist' ),
- 'queue_a_track'),
- ( self.new_playlist, _( 'Make a new Audio Playlist' ),
- 'close_playlist')]
def queue_file(self,arg=None, menuw=None):
if not self.playlist_handle:
--- 101,112 ----
# that could cause us much trouble
return []
+ items = [ (self.queue_file, _('Enqueue this Music in Playlist'),
'queue_a_track') ]
+ if self.playlist_handle:
+ items.append((self.new_playlist, _( 'Make a new Audio Playlist' ),
+ 'close_playlist'))
+ return items
+
+
def queue_file(self,arg=None, menuw=None):
if not self.playlist_handle:
***************
*** 110,125 ****
for f in self.item.files.get():
if os.path.isdir(f):
! for file in os.listdir(f):
self.playlist_handle.write('%s\n' % os.path.join(f, file))
else:
self.playlist_handle.write('%s\n' % f)
self.playlist_handle.flush()
! rc.post_event(Event(OSD_MESSAGE, arg='Queued Track'))
return
def new_playlist(self, arg=None, menuw=None):
- rc.post_event(Event(OSD_MESSAGE, arg='Added New Playlist'))
if self.playlist_handle:
self.playlist_handle.close()
self.playlist_handle = None
return
--- 115,135 ----
for f in self.item.files.get():
if os.path.isdir(f):
! for file in util.match_files_recursively(f, config.AUDIO_SUFFIX):
self.playlist_handle.write('%s\n' % os.path.join(f, file))
else:
self.playlist_handle.write('%s\n' % f)
self.playlist_handle.flush()
! if menuw:
! if self.item.type == 'dir':
! menuw.delete_submenu(True, True, _('Queued Directory'))
! else:
! menuw.delete_submenu(True, True, _('Queued Track'))
return
def new_playlist(self, arg=None, menuw=None):
if self.playlist_handle:
self.playlist_handle.close()
self.playlist_handle = None
+ if menuw:
+ menuw.delete_submenu(True, True, _('Added New Playlist'))
return
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog