Author: dmeyer
Date: Fri Dec  7 16:20:01 2007
New Revision: 10186

Log:
support __len__ for Playlist

Modified:
   trunk/ui/src/playlist.py

Modified: trunk/ui/src/playlist.py
==============================================================================
--- trunk/ui/src/playlist.py    (original)
+++ trunk/ui/src/playlist.py    Fri Dec  7 16:20:01 2007
@@ -124,6 +124,15 @@
         return playlist
 
 
+    def __len__(self):
+        """
+        Return length of playlist.
+        """
+        if not self._playlist_valid:
+            self._playlist_create_items()
+        return len(self.choices)
+
+
     def _read_pls(self, plsname, content):
         """
         This is the (pls) playlist reading function.

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to