Mercurial > code > home > repos > light9
diff bin/ascoltami @ 243:fff8762db48a
finished incomplete patch- asco now measures the length of songs (only for .wav)
author | drewp@bigasterisk.com |
---|---|
date | Tue, 14 Jun 2005 02:52:37 +0000 |
parents | 561b4202461d |
children | 1f7edb2e4724 |
line wrap: on
line diff
--- a/bin/ascoltami Mon Jun 13 03:18:04 2005 +0000 +++ b/bin/ascoltami Tue Jun 14 02:52:37 2005 +0000 @@ -29,7 +29,7 @@ from twisted.web import xmlrpc, server import run_local -from light9 import networking, showconfig +from light9 import networking, showconfig, wavelength from pympd import Mpd @@ -138,7 +138,9 @@ reactor.callLater(.05, self.pollStatus) def set_total_time(self, song_path): - raise NotImplementedError("get lengther.py from semprini") + # currently only good for .wav + p = os.path.join(showconfig.musicDir(), song_path) + self.total_time.set(wavelength.wavelength(p)) def play(self, song_path): @@ -150,13 +152,6 @@ self.filename_var.set(song_path) self.set_total_time(song_path) -## # jump to song 1 to get its total_time -## self.mpd.seek(seconds=0, song=1) -## self.mpd.pause() -## self.mpd.status().addCallback(self.play2) - -## def play2(self, stat): -## self.total_time.set(stat.time_total) self.mpd.seek(seconds=0, song=0) def check_autopause(self):