Changeset - e841bea500c3
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 20 years ago 2005-06-18 15:41:28
drewp@bigasterisk.com
guard against some errors when mpd is playing other music
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
bin/ascoltami
Show inline comments
 
@@ -111,7 +111,7 @@ class Player:
 
        self.mpd.status().addCallback(self.pollStatus2)
 
        
 
    def pollStatus2(self, stat):
 

	
 
        try:
 
        if self.state.get() != stat.state:
 
            self.state.set(stat.state)
 

	
 
@@ -134,6 +134,7 @@ class Player:
 
                elapsed = self.marked_val + (time.time() - self.marked_time)
 
                songnum, total = self.true_song_total
 
            
 
                t = -1
 
            if songnum == 1:
 
                t = elapsed
 
            elif songnum == 0:
 
@@ -146,7 +147,7 @@ class Player:
 
            self.last_poll_time = time.time()
 

	
 
        self.check_autopause()
 

	
 
        finally:
 
        reactor.callLater(.05, self.pollStatus)
 

	
 
    def set_total_time(self, song_path):
0 comments (0 inline, 0 general)