changeset 461:b0954240778d

fix bogus asco error after last song. Untested.
author drewp@bigasterisk.com
date Mon, 16 Jun 2008 00:37:30 +0000
parents b239d8c9f06f
children cd4d7b878550
files bin/ascoltami show/dance2008/readme
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/bin/ascoltami	Mon Jun 16 00:00:13 2008 +0000
+++ b/bin/ascoltami	Mon Jun 16 00:37:30 2008 +0000
@@ -278,10 +278,10 @@
         if state == 'stop':
             currentPath = self.player.song_uri
             try:
-                i = self.songURIs.index(currentPath) + 1
-            except ValueError:
-                i = 0
-            nextPath = self.songURIs[i]
+                nextPath = self.songURIs[self.songURIs.index(currentPath) + 1]
+            except (ValueError, IndexError):
+                nextPath = self.songURIs[0]
+                
             return ("next song %s" % shortSongPath(nextPath, self.songURIs),
                     lambda: self.player.play(nextPath))
 
--- a/show/dance2008/readme	Mon Jun 16 00:00:13 2008 +0000
+++ b/show/dance2008/readme	Mon Jun 16 00:37:30 2008 +0000
@@ -113,7 +113,7 @@
 
   record-everything mode that makes curves out of whatever happens on stage
 
-  asco makes lots of errors after you play through the last song
+OK  asco makes lots of errors after you play through the last song
 
   five second post