Author: dmeyer
Date: Mon Oct 15 13:38:59 2007
New Revision: 9985

Log:
better last_played handling

Modified:
   trunk/ui/src/menu/mediaitem.py

Modified: trunk/ui/src/menu/mediaitem.py
==============================================================================
--- trunk/ui/src/menu/mediaitem.py      (original)
+++ trunk/ui/src/menu/mediaitem.py      Mon Oct 15 13:38:59 2007
@@ -62,7 +62,8 @@
         self.filename = None
         self.fxdinfo = {}
         self.elapsed = 0
-        
+        self.user_stop = False
+
 
     def set_url(self, url):
         """
@@ -222,9 +223,10 @@
         """
         eventhandler for this item
         """
-        if event == PLAY_START:
-            self['last_played'] = int(time.time())
         if event == STOP:
-            # not fully played, clear info
-            self['last_played'] = 0
+            self.user_stop = True
+        if event == PLAY_END:
+            if not self.user_stop:
+                self['last_played'] = int(time.time())
+                self.user_stop = False
         return Item.eventhandler(self, event)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to