From cb3930bf2c08ada9a6a453805906bcc512b15f31 Mon Sep 17 00:00:00 2001 From: Stefan Bethke Date: Sat, 28 Jun 2014 12:16:12 +0000 Subject: [PATCH] Unsere Shows wieder aktivieren, leichtes Aufraeumen --- src/tivomirror/tivomirror | 48 ++++++++------------------------------- 1 file changed, 10 insertions(+), 38 deletions(-) diff --git a/src/tivomirror/tivomirror b/src/tivomirror/tivomirror index 090844f..6556857 100755 --- a/src/tivomirror/tivomirror +++ b/src/tivomirror/tivomirror @@ -1,6 +1,6 @@ #!/usr/local/bin/python -# $Schlepperbande: src/tivomirror/tivomirror,v 1.54 2014/05/31 11:42:06 stb Exp $ +# $Schlepperbande: src/tivomirror/tivomirror,v 1.55 2014/06/24 16:41:00 stb Exp $ # # Stefans Script, um die Sendungen vom Tivo runterzuladen und in MPEG4 # zu transkodieren. @@ -37,15 +37,13 @@ minfree = 10 * gig ignoreepisodetitle = False arset = dict() -arset["Futurama"] = 169 includes = dict() includes['Brooklyn Nine-Nine'] = 1 includes['Castle'] = 1 -includes['Cosmos: A Spacetime Odyssey'] = 1 includes['Family Guy'] = 1 includes['Hot in Cleveland'] = 1 -#includes['Late Show With David Letterman'] = 1 +includes['Late Show With David Letterman'] = 1 includes['Louie'] = 1 includes['Mad Men'] = 1 includes['Modern Family'] = 1 @@ -55,9 +53,9 @@ includes['NFL Football'] = 1 includes['Person of Interest'] = 1 includes['Sesame Street'] = 1 includes['The Big Bang Theory'] = 1 -#includes['The Colbert Report'] = 1 -#includes['The Daily Show With Jon Stewart'] = 1 -#includes['The Late Late Show With Craig Ferguson'] = 1 +includes['The Colbert Report'] = 1 +includes['The Daily Show With Jon Stewart'] = 1 +includes['The Late Late Show With Craig Ferguson'] = 1 #includes['The Tonight Show Starring Jimmy Fallon'] = 1 @@ -162,31 +160,6 @@ class TivoItem: return repr(self.title) -def makeCookie(name, value): - return cookielib.Cookie( - version=0, - name=name, - value=value, - port=None, - port_specified=False, - domain="", - domain_specified=False, - domain_initial_dot=False, - path="/", - path_specified=True, - secure=False, - expires=None, - discard=False, - comment=None, - comment_url=None, - rest=None - ) - - -def get_cookie_by_name(cj, name): - return [cookie for cookie in cj if cookie.name == name][0] - - def loadtoc(offset): global session @@ -327,7 +300,7 @@ def download_decode(item, mak): def savetoc(dom): - fd=open("toc.xml", "w") + fd=open("tivomirror-toc.xml", "w") fd.write(dom.toprettyxml()) fd.close() @@ -357,8 +330,8 @@ def mirror(dom, downloaddb): items = dom.getElementsByTagName("Item") print "*** %d shows listed" % (items.length) - for i in items: - item = TivoItem(i) + for node in items: + item = TivoItem(node) reason = wantitem(item, downloaddb) if (reason != ""): @@ -376,7 +349,6 @@ def mirror(dom, downloaddb): #break except TivoException, e: print "Error processing \"%s\": %s" % (item.name, e) - break print "*** Completed %s" % datetime.datetime.now().strftime("%Y-%m-%d %H:%M") @@ -384,8 +356,8 @@ def mirror(dom, downloaddb): def printtoc(dom, downloaddb): items = dom.getElementsByTagName("Item") print "*** %d shows listed" % (items.length) - for i in items: - item = TivoItem(i) + for node in items: + item = TivoItem(node) reason = wantitem(item, downloaddb) if (reason != ""): print "--- %-11.11s: %s" % (reason, item.name)