changeset 603:236a0b89ee0f

vidref poured exceptions when the player had no song Ignore-this: 338e48bf5e495e4592b618d5b271a30b
author drewp@bigasterisk.com
date Sun, 20 Jun 2010 21:13:11 +0000
parents c8bfe3c32670
children d5e07745e65f
files light9/vidref/main.py light9/vidref/replay.py
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/light9/vidref/main.py	Sun Jun 20 17:49:23 2010 +0000
+++ b/light9/vidref/main.py	Sun Jun 20 21:13:11 2010 +0000
@@ -102,7 +102,7 @@
         position = self.musicTime.getLatest()
 
         if not position['song']:
-            print "no song"
+            print "no song" # todo: this prints too much when the player has no song
             return gst.FLOW_OK
 
         try:
--- a/light9/vidref/replay.py	Sun Jun 20 17:49:23 2010 +0000
+++ b/light9/vidref/replay.py	Sun Jun 20 21:13:11 2010 +0000
@@ -54,6 +54,9 @@
             v.destroy()
         self.views[:] = []
 
+        if not song:
+            return
+        
         d = songDir(song)
         try:
             takes = sorted(t for t in os.listdir(d) if t.isdigit())