Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1:/tmp/cvs-serv5760
Modified Files:
playlist.py
Log Message:
random playlist can now be non-recursive, too
Index: playlist.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/playlist.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** playlist.py 17 Oct 2003 17:29:03 -0000 1.27
--- playlist.py 17 Oct 2003 18:50:10 -0000 1.28
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.28 2003/10/17 18:50:10 dischi
+ # random playlist can now be non-recursive, too
+ #
# Revision 1.27 2003/10/17 17:29:03 dischi
# do not include games in playlist
***************
*** 328,332 ****
class RandomPlaylist(Playlist):
! def __init__(self, playlist, parent, add_args = None):
Item.__init__(self, parent)
self.type = 'playlist'
--- 331,335 ----
class RandomPlaylist(Playlist):
! def __init__(self, playlist, parent, add_args = None, recursive = True):
Item.__init__(self, parent)
self.type = 'playlist'
***************
*** 334,341 ****
# variables only for Playlist
self.current_item = None
! self.playlist = []
! self.autoplay = True
! self.unplayed = playlist
!
def actions(self):
--- 337,344 ----
# variables only for Playlist
self.current_item = None
! self.playlist = []
! self.autoplay = True
! self.unplayed = playlist
! self.recursive = recursive
def actions(self):
***************
*** 369,373 ****
if isinstance(self.unplayed, tuple):
dir, prefix = self.unplayed
! self.unplayed = util.match_files_recursively(dir, prefix)
# reset playlist
--- 372,379 ----
if isinstance(self.unplayed, tuple):
dir, prefix = self.unplayed
! if self.recursive:
! self.unplayed = util.match_files_recursively(dir, prefix)
! else:
! self.unplayed = util.match_files(dir, prefix)
# reset playlist
-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise
Linux in the Boardroom; in the Front Office; & in the Server Room
http://www.enterpriselinuxforum.com
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog