From b66ac39ccce815c82aaf0ebc672d907cd4860a68 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 28 Mar 2015 05:39:53 -0500 Subject: [PATCH] Fixed manual auth For now, moved back to global variables to allow manual login. --- resources/lib/PlaybackUtils.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/resources/lib/PlaybackUtils.py b/resources/lib/PlaybackUtils.py index 9171efe2..382cc8db 100644 --- a/resources/lib/PlaybackUtils.py +++ b/resources/lib/PlaybackUtils.py @@ -24,24 +24,30 @@ addon = xbmcaddon.Addon(id='plugin.video.emby') addondir = xbmc.translatePath(addon.getAddonInfo('profile')) WINDOW = xbmcgui.Window( 10000 ) +downloadUtils = DownloadUtils() +port = addon.getSetting('port') +host = addon.getSetting('ipaddress') +server = host + ":" + port + +userid = downloadUtils.getUserId() class PlaybackUtils(): settings = None language = addon.getLocalizedString logLevel = 0 - downloadUtils = DownloadUtils() + #downloadUtils = DownloadUtils() def __init__(self, *args): pass def PLAY(self, id): - port = addon.getSetting('port') + '''port = addon.getSetting('port') host = addon.getSetting('ipaddress') server = host + ":" + port - userid = self.downloadUtils.getUserId() + userid = self.downloadUtils.getUserId()''' jsonData = self.downloadUtils.downloadUrl("http://" + server + "/mediabrowser/Users/" + userid + "/Items/" + id + "?format=json&ImageTypeLimit=1", suppress=False, popup=1 ) result = json.loads(jsonData) @@ -335,4 +341,4 @@ class PlaybackUtils(): playlist.add(playurl, listItem) - return True \ No newline at end of file + return True