Noch ein paar Ausnahmen dazu
This commit is contained in:
parent
fee53946a0
commit
7011a68f47
1 changed files with 22 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/local/bin/python
|
#!/usr/local/bin/python
|
||||||
|
|
||||||
# $Schlepperbande: src/tivomirror/tivomirror,v 1.40 2010/12/22 17:12:24 stb Exp $
|
# $Schlepperbande: src/tivomirror/tivomirror,v 1.41 2011/01/13 17:26:33 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.
|
||||||
|
@ -38,12 +38,24 @@ arset["House"] = 43
|
||||||
#arset["The Late Late Show With Craig Ferguson"] = 149
|
#arset["The Late Late Show With Craig Ferguson"] = 149
|
||||||
|
|
||||||
excludes = dict()
|
excludes = dict()
|
||||||
|
excludes['The 2011 Billboard Music Awards'] = 1
|
||||||
|
excludes['2011 French Open Tennis'] = 1
|
||||||
|
excludes['2011 French Open Tennis - Second Round'] = 1
|
||||||
|
excludes["2011 French Open Tennis - Men's and Women's Quarterfinals"] = 1
|
||||||
|
excludes['2011 Tour de France - Stage 3'] = 1
|
||||||
|
excludes['2011 Wimbledon Championships'] = 1
|
||||||
|
excludes['2011 Tour de France'] = 1
|
||||||
excludes['Cops'] = 1
|
excludes['Cops'] = 1
|
||||||
|
excludes['Dancing With the Stars'] = 1
|
||||||
|
excludes['French Open Tonight'] = 1
|
||||||
excludes['Hot Pursuit'] = 1
|
excludes['Hot Pursuit'] = 1
|
||||||
excludes['Greatest Tank Battles'] = 1
|
excludes['Greatest Tank Battles'] = 1
|
||||||
excludes['Judge Judy'] = 1
|
excludes['Judge Judy'] = 1
|
||||||
excludes['Most Shocking'] = 1
|
excludes['Most Shocking'] = 1
|
||||||
|
excludes['Secrets of World War II'] = 1
|
||||||
|
excludes['Speeders'] = 1
|
||||||
excludes['Tennis'] = 1
|
excludes['Tennis'] = 1
|
||||||
|
excludes['World War II in Color'] = 1
|
||||||
excludes["World's Wildest Police Videos"] = 1
|
excludes["World's Wildest Police Videos"] = 1
|
||||||
|
|
||||||
class flushfile(object):
|
class flushfile(object):
|
||||||
|
@ -252,13 +264,13 @@ for i in items:
|
||||||
episode = getTagText(i, "EpisodeTitle")
|
episode = getTagText(i, "EpisodeTitle")
|
||||||
date = getTagText(i, "CaptureDate")
|
date = getTagText(i, "CaptureDate")
|
||||||
date = datetime.datetime.utcfromtimestamp(int(date, 16))
|
date = datetime.datetime.utcfromtimestamp(int(date, 16))
|
||||||
date = date.strftime("%Y%m%d-%H%M")
|
datestr = date.strftime("%Y%m%d-%H%M")
|
||||||
url = getTagText(i, "Url")
|
url = getTagText(i, "Url")
|
||||||
inprogress = getTagText(i, "InProgress")
|
inprogress = getTagText(i, "InProgress")
|
||||||
available = getTagText(i, "Available")
|
available = getTagText(i, "Available")
|
||||||
sourcesize = int(getTagText(i, "SourceSize"))
|
sourcesize = int(getTagText(i, "SourceSize"))
|
||||||
if episode == "":
|
if episode == "":
|
||||||
episode = date
|
episode = datestr
|
||||||
name = "%s - %s" % (title, episode)
|
name = "%s - %s" % (title, episode)
|
||||||
#dir = "%s/tivo/%s" % (curdir, re.sub("[:/]", "-", title))
|
#dir = "%s/tivo/%s" % (curdir, re.sub("[:/]", "-", title))
|
||||||
dir = "%s/%s" % (targetdir, re.sub("[:/]", "-", title))
|
dir = "%s/%s" % (targetdir, re.sub("[:/]", "-", title))
|
||||||
|
@ -281,15 +293,19 @@ for i in items:
|
||||||
#print "*** skipping \"%s\": already downloaded" % name
|
#print "*** skipping \"%s\": already downloaded" % name
|
||||||
continue
|
continue
|
||||||
if excludes.has_key(title) or excludes.has_key(episode) or excludes.has_key(name):
|
if excludes.has_key(title) or excludes.has_key(episode) or excludes.has_key(name):
|
||||||
print "*** skipping \"%s\": excluded" % name
|
#print "*** skipping \"%s\": excluded" % name
|
||||||
continue
|
continue
|
||||||
print "*** downloading \"%s\": %.3fGB" % (name, sourcesize / 1e9)
|
print "*** downloading \"%s\": %.3fGB" % (name, sourcesize / 1e9)
|
||||||
try:
|
try:
|
||||||
download_decode(file, url, mak, ar)
|
download_decode(file, url, mak, ar)
|
||||||
downloaddb[name] = date
|
try:
|
||||||
|
os.utime(file, [date, date])
|
||||||
|
except Exception, e:
|
||||||
|
print "Urgh:", e
|
||||||
|
downloaddb[name] = datestr
|
||||||
if getattr(downloaddb, "sync", None) and callable(downloaddb.sync):
|
if getattr(downloaddb, "sync", None) and callable(downloaddb.sync):
|
||||||
downloaddb.sync()
|
downloaddb.sync()
|
||||||
# stop after the fist successful download since the tivo hangs easily
|
# stop after the first successful download since the tivo hangs easily
|
||||||
print "Stopping after one successful transfer"
|
print "Stopping after one successful transfer"
|
||||||
break
|
break
|
||||||
except TivoException, e:
|
except TivoException, e:
|
||||||
|
|
Loading…
Reference in a new issue