Author: dmeyer
Date: Tue Nov 28 19:41:34 2006
New Revision: 8669
Modified:
trunk/ui/src/audio/player.py
Log:
handle failed playing
Modified: trunk/ui/src/audio/player.py
==============================================================================
--- trunk/ui/src/audio/player.py (original)
+++ trunk/ui/src/audio/player.py Tue Nov 28 19:41:34 2006
@@ -103,10 +103,23 @@
self.player.open(self.item.url)
self.player.signals['end'].connect_once(PLAY_END.post, self.item)
self.player.signals['start'].connect_once(PLAY_START.post, self.item)
+ self.player.signals['failed'].connect_once(self._play_failed)
self.player.play()
self.refresh()
+ def _play_failed(self):
+ """
+ Playing this item failed.
+ """
+ log.error('playback failed for %s', self.item)
+ # We should handle it here with a messge or something like that. To
+ # make playlist work, we just send start and stop. It's ugly but it
+ # should work.
+ PLAY_START.post(self.item)
+ PLAY_STOP.post(self.item)
+
+
def stop(self):
"""
Stop playing.
-------------------------------------------------------------------------
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