From: Jason Michalski Date: Wed, 9 Apr 2008 03:06:29 +0000 (-0500) Subject: Fixed push bug from the changed mind class api X-Git-Url: https://repo.or.cz/w/pyTivo.git/commitdiff_plain/f15900aefc8ba09915196185fd3f9895c1532600 Fixed push bug from the changed mind class api --- diff --git a/plugins/video/video.py b/plugins/video/video.py index c119505..60b8e6c 100644 --- a/plugins/video/video.py +++ b/plugins/video/video.py @@ -399,7 +399,7 @@ class Video(Plugin): handler.wfile.write(t) def TVBusQuery(self, handler, query): - tsn = handler.headers.getheader('tsn', '') + tsn = handler.headers.getheader('tsn', '') file = query['File'][0] path = self.get_local_path(handler, query) file_path = path + file @@ -422,7 +422,7 @@ class Video(Plugin): handler.end_headers() handler.wfile.write(file.read()) - + def Push(self, handler, query): file = unquote(query['File'][0]) tsn = query['tsn'][0] @@ -443,21 +443,11 @@ class Video(Plugin): url = 'http://%s:%s/%s%s' % (ip, port, container, quote(file)) - print 'tsn', tsn - print 'url', url - print query - - username = config.getTivoUsername() - password = config.getTivoPassword() - - if not username or not password: - raise Exception("tivo_username and tivo_password required") - try: - m = mind.Mind(username, password, True) + m = mind.getMind() m.pushVideo( - tsn = tsn, - url = url, + tsn = tsn, + url = url, description = file_info['description'], duration = file_info['duration'] / 1000, size = file_info['size'],