Author: dmeyer
Date: Sat Dec 2 22:24:49 2006
New Revision: 8689
Modified:
trunk/ui/src/audio/player.py
Log:
fix failed signal handling
Modified: trunk/ui/src/audio/player.py
==============================================================================
--- trunk/ui/src/audio/player.py (original)
+++ trunk/ui/src/audio/player.py Sat Dec 2 22:24:49 2006
@@ -75,6 +75,7 @@
def __init__(self):
Application.__init__(self, 'audioplayer', 'audio', False, True)
self.player = kaa.popcorn.Player()
+ self.player.signals['failed'].connect_weak(self._play_failed)
self.running = False
self.bg_playing = False
self.elapsed_timer = kaa.notifier.WeakTimer(self.elapsed)
@@ -103,7 +104,6 @@
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()
@@ -113,6 +113,9 @@
Playing this item failed.
"""
log.error('playback failed for %s', self.item)
+ # disconnect the signal handler with that item
+ self.player.signals['end'].disconnect(PLAY_END.post, self.item)
+ self.player.signals['start'].disconnect(PLAY_START.post, 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.
-------------------------------------------------------------------------
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