Author: dmeyer
Date: Tue Jan  2 16:04:43 2007
New Revision: 2328

Modified:
   trunk/popcorn/src/backends/base.py
   trunk/popcorn/src/generic.py

Log:
improve debug, ignore STATE_SHUTDOWN->STATE_IDLE

Modified: trunk/popcorn/src/backends/base.py
==============================================================================
--- trunk/popcorn/src/backends/base.py  (original)
+++ trunk/popcorn/src/backends/base.py  Tue Jan  2 16:04:43 2007
@@ -94,7 +94,8 @@
         """
         if self._state_object == state:
             return
-
+        if state == STATE_IDLE and self._state_object == STATE_SHUTDOWN:
+            return
         old_state = self._state_object
         self._state_object = state
 
@@ -182,6 +183,13 @@
         return aspect, size
 
 
+    def __repr__(self):
+        """
+        For debugging only.
+        """
+        c = str(self.__class__)
+        return '<popcorn%s' % c[c.rfind('.'):]
+    
     def get_capabilities(self):
         """
         Return player capabilities.

Modified: trunk/popcorn/src/generic.py
==============================================================================
--- trunk/popcorn/src/generic.py        (original)
+++ trunk/popcorn/src/generic.py        Tue Jan  2 16:04:43 2007
@@ -168,7 +168,7 @@
     def _state_change(self, old_state, state):
         """
         """
-        log.debug('player %s -> %s', old_state, state)
+        log.debug('%s %s -> %s', str(self._player)[1:-1], old_state, state)
 
         if old_state in (STATE_OPENING, STATE_OPEN) and \
                state in (STATE_IDLE, STATE_NOT_RUNNING, STATE_SHUTDOWN):

-------------------------------------------------------------------------
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