diff --git a/src/tivomirror/tivomirror b/src/tivomirror/tivomirror index 320bd6c..0c72475 100755 --- a/src/tivomirror/tivomirror +++ b/src/tivomirror/tivomirror @@ -1,6 +1,6 @@ #!/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 # zu transkodieren. @@ -38,12 +38,24 @@ arset["House"] = 43 #arset["The Late Late Show With Craig Ferguson"] = 149 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['Dancing With the Stars'] = 1 +excludes['French Open Tonight'] = 1 excludes['Hot Pursuit'] = 1 excludes['Greatest Tank Battles'] = 1 excludes['Judge Judy'] = 1 excludes['Most Shocking'] = 1 +excludes['Secrets of World War II'] = 1 +excludes['Speeders'] = 1 excludes['Tennis'] = 1 +excludes['World War II in Color'] = 1 excludes["World's Wildest Police Videos"] = 1 class flushfile(object): @@ -252,13 +264,13 @@ for i in items: episode = getTagText(i, "EpisodeTitle") date = getTagText(i, "CaptureDate") 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") inprogress = getTagText(i, "InProgress") available = getTagText(i, "Available") sourcesize = int(getTagText(i, "SourceSize")) if episode == "": - episode = date + episode = datestr name = "%s - %s" % (title, episode) #dir = "%s/tivo/%s" % (curdir, re.sub("[:/]", "-", title)) dir = "%s/%s" % (targetdir, re.sub("[:/]", "-", title)) @@ -281,15 +293,19 @@ for i in items: #print "*** skipping \"%s\": already downloaded" % name continue 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 print "*** downloading \"%s\": %.3fGB" % (name, sourcesize / 1e9) try: 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): 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" break except TivoException, e: