add days to ms2playtime

This commit is contained in:
j 2008-06-19 16:18:49 +02:00
parent 9fbc01dcb2
commit 43526e4999

View file

@ -172,6 +172,10 @@ def ms2playtime(ms):
ss = it % 60 ss = it % 60
mm = ((it-ss)/60) % 60 mm = ((it-ss)/60) % 60
hh = ((it-(mm*60)-ss)/3600) % 60 hh = ((it-(mm*60)-ss)/3600) % 60
if hh >= 24:
dd = int(hh / 24)
hh = hh % 24
playtime= "%d:%02d:%02d:%02d" % (dd, hh, mm, ss)
if hh: if hh:
playtime= "%02d:%02d:%02d" % (hh, mm, ss) playtime= "%02d:%02d:%02d" % (hh, mm, ss)
else: else: