Author: dmeyer
Date: Tue Mar 13 11:33:44 2007
New Revision: 9329

Modified:
   trunk/ui/src/playlist.py

Log:
make REPEAT_* variables memebers of Playlist

Modified: trunk/ui/src/playlist.py
==============================================================================
--- trunk/ui/src/playlist.py    (original)
+++ trunk/ui/src/playlist.py    Tue Mar 13 11:33:44 2007
@@ -53,15 +53,16 @@
 # get logging object
 log = logging.getLogger()
 
-REPEAT_OFF      = 0
-REPEAT_ITEM     = 1
-REPEAT_PLAYLIST = 2
-
 class Playlist(MediaItem, ItemList):
     """
     Class for playlists. A playlist can be created with a list of items, a
     filename containing the playlist or a (list of) beacon query(s).
     """
+
+    REPEAT_OFF      = 0
+    REPEAT_ITEM     = 1
+    REPEAT_PLAYLIST = 2
+
     def __init__(self, name='', playlist=[], parent=None, type=None,
                  random=False, autoplay=False, repeat=REPEAT_OFF):
         """
@@ -345,7 +346,7 @@
 
         # get next item
         self.next_pos = (self.selected_pos+1) % len(self.choices)
-        if self.next_pos == 0 and not self.repeat == REPEAT_PLAYLIST:
+        if self.next_pos == 0 and not self.repeat == Playlist.REPEAT_PLAYLIST:
             self.next_pos = None
 
 
@@ -376,18 +377,18 @@
 
         if event == PLAYLIST_TOGGLE_REPEAT:
             self.repeat += 1
-            if self.repeat == REPEAT_ITEM:
+            if self.repeat == Playlist.REPEAT_ITEM:
                 arg = _('Repeat Item')
-            elif self.repeat == REPEAT_PLAYLIST:
+            elif self.repeat == Playlist.REPEAT_PLAYLIST:
                 arg = _('Repeat Playlist')
             else:
-                self.repeat = REPEAT_OFF
+                self.repeat = Playlist.REPEAT_OFF
                 arg = _('Repeat Off')
             OSD_MESSAGE.post(arg)
             return True
 
         if event == PLAY_END:
-            if self.repeat == REPEAT_ITEM:
+            if self.repeat == Playlist.REPEAT_ITEM:
                 # Repeat current item
                 self.selected.play()
                 return True

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to