[cvs-annodex] commit (/annodex): annoamp/trunk/annoamp.py
jkivlighn
nobody at lists.annodex.net
Wed Nov 2 09:38:48 EST 2005
Update of /annodex (new revision 1595)
Modified files:
annoamp/trunk/annoamp.py
Log Message:
Allow a file to be passed on the command-line (I need this for testing)
Modified: annoamp/trunk/annoamp.py
===================================================================
--- annoamp/trunk/annoamp.py 2005-11-01 18:31:18 UTC (rev 1594)
+++ annoamp/trunk/annoamp.py 2005-11-01 22:38:46 UTC (rev 1595)
@@ -76,10 +76,10 @@
def update_time(self):
try:
time = self.bin.query_position(gst.FORMAT_TIME)
- #print str(time[0]/gst.SECOND/60) + ":" + str(time[0]/gst.SECOND%60)
self.update_time_callback(time[0]/gst.SECOND, self.duration)
except:
pass
+
if self.bin.get_state()[1] == gst.STATE_PAUSED:
return False
else:
@@ -239,7 +239,7 @@
global playlist_view
global playlist
playlist_view.set_cursor(playlist.get_path(playlist.iter_nth_child(None,chapter)))
- print "updated chapter"
+ print "updated chapter: "+str(chapter)
def update_gui_time(time, duration):
xml.get_widget("time").set_text(format_time(time) + "/" + format_time(duration))
@@ -295,4 +295,7 @@
player.update_time_callback = update_gui_time
player.duration_callback = update_gui_duration
+if len(sys.argv) == 2:
+ player.loadFile(sys.argv[1],playlist)
+
loop.run()
--
jkivlighn
More information about the cvs-annodex
mailing list