Freien Plattenplatz in eigene Variable, und eine Konstante fuer Gig.
This commit is contained in:
parent
28f217b9e1
commit
4b00bad4c2
1 changed files with 6 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
# $Schlepperbande: src/tivomirror/tivomirror,v 1.30 2010/08/05 20:05:18 stb Exp $
|
# $Schlepperbande: src/tivomirror/tivomirror,v 1.31 2010/08/06 08:41:55 stb Exp $
|
||||||
#
|
#
|
||||||
# Stefans Script, um die Sendungen vom Tivo runterzuladen und in MPEG4
|
# Stefans Script, um die Sendungen vom Tivo runterzuladen und in MPEG4
|
||||||
# zu transkodieren.
|
# zu transkodieren.
|
||||||
|
@ -21,6 +21,8 @@ import re
|
||||||
host = "tivo.lassitu.de"
|
host = "tivo.lassitu.de"
|
||||||
mak = "7194378159"
|
mak = "7194378159"
|
||||||
targetdir = "/mnt/safe/tivo"
|
targetdir = "/mnt/safe/tivo"
|
||||||
|
gig = 1024.0 * 1024 * 1024
|
||||||
|
minfree = 10 * gig
|
||||||
|
|
||||||
arset = dict()
|
arset = dict()
|
||||||
arset["Family Guy"] = 43
|
arset["Family Guy"] = 43
|
||||||
|
@ -193,9 +195,9 @@ def savetoc(toc):
|
||||||
curdir = os.getcwd()
|
curdir = os.getcwd()
|
||||||
os.chdir(tmp)
|
os.chdir(tmp)
|
||||||
avail = getAvail(targetdir)
|
avail = getAvail(targetdir)
|
||||||
if avail < 1024*1024*1024:
|
if avail < minfree:
|
||||||
print "%s: %.1fM available, at least 1024M needed, stopping" % \
|
print "%s: %.1fG available, at least %.1fG needed, stopping" % \
|
||||||
(targetdir, avail / 1024.0 / 1024.0)
|
(targetdir, avail / gig, minfree / gig)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
downloaddb = anydbm.open(curdir + "/tivo/.downloads", "c")
|
downloaddb = anydbm.open(curdir + "/tivo/.downloads", "c")
|
||||||
print "*** Getting listing"
|
print "*** Getting listing"
|
||||||
|
|
Loading…
Reference in a new issue