Schoener loggen

This commit is contained in:
Stefan Bethke 2014-05-31 11:42:06 +00:00
parent a10cd1486d
commit f8715d1ea8

View file

@ -1,6 +1,6 @@
#!/usr/local/bin/python
# $Schlepperbande: src/tivomirror/tivomirror,v 1.52 2014/03/02 22:19:36 stb Exp $
# $Schlepperbande: src/tivomirror/tivomirror,v 1.53 2014/05/30 20:53:01 stb Exp $
#
# Stefans Script, um die Sendungen vom Tivo runterzuladen und in MPEG4
# zu transkodieren.
@ -252,8 +252,9 @@ def download(file, url, mak, target):
now = time.time()
if (now - upd) > 60:
upd = now
mb = count / 1024.0 / 1024.0
print " %5.1f MB downloaded, %.3f MB/s" % (mb, mb / now)
dur = now - start
mb = count / 1e6
print " %5.3f GB downloaded in %.0f min, %.3f MB/s" % (mb / 1e3, dur / 60, mb / dur)
finally:
try:
p_decode.stdin.close()
@ -267,8 +268,8 @@ def download(file, url, mak, target):
raise TivoException("downloaded file is too small")
elapsed = time.time() - start
throughput = size / elapsed
print "%5.3fGB transferred in %.f.%02.f hours, %.1fkB/s" % (
size/1e9, elapsed/3600, int(elapsed / 60) % 60, throughput/1e3)
print "%5.3fGB transferred in %d:%02d, %.1f MB/s" % (
size/1e9, int(elapsed/3600), int(elapsed / 60) % 60, throughput/1e6)
def download_decode(item, mak):