From cfb3a1c62541076785785fe6fe12ca09ad831348 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Thu, 12 Jun 2014 15:06:25 -0400 Subject: [PATCH] Allow spoofing a TSN in ToGo via the "togo_tsn" setting. This affects the behavior of pyTivo servers, at least. --- plugins/togo/togo.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/togo/togo.py b/plugins/togo/togo.py index e707f26..1ccf7d1 100644 --- a/plugins/togo/togo.py +++ b/plugins/togo/togo.py @@ -74,6 +74,10 @@ tivo_opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj), urllib2.HTTPBasicAuthHandler(auth_handler), urllib2.HTTPDigestAuthHandler(auth_handler)) +tsn = config.get_server('togo_tsn') +if tsn: + tivo_opener.addheaders.append(('TSN', tsn)) + class ToGo(Plugin): CONTENT_TYPE = 'text/html' -- 2.11.4.GIT