From 03416513cfabd3a5bb5d31c95025a3228779176a Mon Sep 17 00:00:00 2001 From: xnappo Date: Wed, 25 Mar 2015 07:48:29 -0500 Subject: [PATCH] Change suppress to False unless really needed This is how it really was before yesterday's commit to re-enable the optionality --- resources/lib/CreateFiles.py | 4 ++-- resources/lib/ReadEmbyDB.py | 20 ++++++++++---------- resources/lib/WebSocketClient.py | 2 +- resources/lib/WriteKodiDB.py | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/resources/lib/CreateFiles.py b/resources/lib/CreateFiles.py index 2403cb81..fdb8f9fd 100644 --- a/resources/lib/CreateFiles.py +++ b/resources/lib/CreateFiles.py @@ -227,7 +227,7 @@ class CreateFiles(): trailerUrl = None if item.get("LocalTrailerCount") != None and item.get("LocalTrailerCount") > 0: itemTrailerUrl = "http://" + server + "/mediabrowser/Users/" + userid + "/Items/" + item.get("Id") + "/LocalTrailers?format=json" - jsonData = downloadUtils.downloadUrl(itemTrailerUrl, suppress=True, popup=0 ) + jsonData = downloadUtils.downloadUrl(itemTrailerUrl, suppress=False, popup=0 ) if(jsonData != ""): trailerItem = json.loads(jsonData) if trailerItem[0].get("LocationType") == "FileSystem": @@ -289,7 +289,7 @@ class CreateFiles(): utils.logMsg("MB3 Syncer","creating Theme file " + themeFile,2) #theme music link themeMusicUrl = "http://" + server + "/mediabrowser/Items/" + item["Id"] + "/ThemeSongs?format=json" - jsonData = downloadUtils.downloadUrl(themeMusicUrl, suppress=True, popup=0 ) + jsonData = downloadUtils.downloadUrl(themeMusicUrl, suppress=False, popup=0 ) if(jsonData != ""): themeMusic = json.loads(jsonData) if(themeMusic != None and themeMusic["TotalRecordCount"] > 0): diff --git a/resources/lib/ReadEmbyDB.py b/resources/lib/ReadEmbyDB.py index 134f22d2..efc54838 100644 --- a/resources/lib/ReadEmbyDB.py +++ b/resources/lib/ReadEmbyDB.py @@ -33,7 +33,7 @@ class ReadEmbyDB(): else: url = server + '/mediabrowser/Users/' + userid + '/items?ParentId=' + id + sortstring + '&Fields=CumulativeRunTimeTicks&Recursive=true&SortOrder=Descending&IncludeItemTypes=Movie&CollapseBoxSetItems=false&format=json&ImageTypeLimit=1' - jsonData = downloadUtils.downloadUrl(url, suppress=True, popup=0) + jsonData = downloadUtils.downloadUrl(url, suppress=False, popup=0) if jsonData != None and jsonData != "": result = json.loads(jsonData) if(result.has_key('Items')): @@ -62,7 +62,7 @@ class ReadEmbyDB(): else: url = server + '/mediabrowser/Users/' + userid + '/items?' + sortstring + '&Fields=CumulativeRunTimeTicks&Recursive=true&SortOrder=Descending&IncludeItemTypes=MusicVideo&CollapseBoxSetItems=false&format=json&ImageTypeLimit=1' - jsonData = downloadUtils.downloadUrl(url, suppress=True, popup=0) + jsonData = downloadUtils.downloadUrl(url, suppress=False, popup=0) if jsonData != None and jsonData != "": result = json.loads(jsonData) if(result.has_key('Items')): @@ -109,7 +109,7 @@ class ReadEmbyDB(): else: url = server + '/mediabrowser/Users/' + userid + '/Items?' + sortstring + '&Fields=CumulativeRunTimeTicks&Recursive=true&SortOrder=Descending&IncludeItemTypes=Series&format=json&ImageTypeLimit=1' - jsonData = downloadUtils.downloadUrl(url, suppress=True, popup=0) + jsonData = downloadUtils.downloadUrl(url, suppress=False, popup=0) if jsonData != None and jsonData != "": result = json.loads(jsonData) if(result.has_key('Items')): @@ -130,7 +130,7 @@ class ReadEmbyDB(): url = 'http://' + server + '/Shows/' + tvShowId + '/Seasons?UserId=' + userid + '&format=json&ImageTypeLimit=1' - jsonData = downloadUtils.downloadUrl(url, suppress=True, popup=0) + jsonData = downloadUtils.downloadUrl(url, suppress=False, popup=0) if jsonData != None and jsonData != "": result = json.loads(jsonData) if(result.has_key('Items')): @@ -154,7 +154,7 @@ class ReadEmbyDB(): else: url = server + '/mediabrowser/Users/' + userid + '/Items?ParentId=' + showId + '&IsVirtualUnaired=false&IsMissing=False&SortBy=SortName&Fields=Name,SortName,CumulativeRunTimeTicks&Recursive=true&SortOrder=Ascending&IncludeItemTypes=Episode&format=json&ImageTypeLimit=1' - jsonData = downloadUtils.downloadUrl(url, suppress=True, popup=0) + jsonData = downloadUtils.downloadUrl(url, suppress=False, popup=0) if jsonData != None and jsonData != "": result = json.loads(jsonData) @@ -178,7 +178,7 @@ class ReadEmbyDB(): else: url = server + '/mediabrowser/Users/' + userid + '/Items?Limit=20&SortBy=DateCreated&IsVirtualUnaired=false&IsMissing=False&Fields=ParentId,Name,SortName,CumulativeRunTimeTicks&Recursive=true&SortOrder=Descending&IncludeItemTypes=Episode&format=json&ImageTypeLimit=1' - jsonData = downloadUtils.downloadUrl(url, suppress=True, popup=0) + jsonData = downloadUtils.downloadUrl(url, suppress=False, popup=0) if jsonData != None and jsonData != "": result = json.loads(jsonData) @@ -243,7 +243,7 @@ class ReadEmbyDB(): server = host + ":" + port viewsUrl = server + "/mediabrowser/Users/" + userid + "/Views?format=json&ImageTypeLimit=1" - jsonData = DownloadUtils().downloadUrl(viewsUrl, suppress=True, popup=0 ) + jsonData = DownloadUtils().downloadUrl(viewsUrl, suppress=False, popup=0 ) collections=[] if(jsonData != ""): @@ -253,7 +253,7 @@ class ReadEmbyDB(): for view in views: if view.get("Type") == 'UserView': # Need to grab the real main node newViewsUrl = server + '/mediabrowser/Users/' + userid + '/items?ParentId=' + view.get("Id") + '&SortBy=SortName&SortOrder=Ascending&format=json&ImageTypeLimit=1' - jsonData = DownloadUtils().downloadUrl(newViewsUrl, suppress=True, popup=0 ) + jsonData = DownloadUtils().downloadUrl(newViewsUrl, suppress=False, popup=0 ) if(jsonData != ""): newViews = json.loads(jsonData) newViews = newViews.get("Items") @@ -287,7 +287,7 @@ class ReadEmbyDB(): url = server + '/mediabrowser/Users/' + userid + '/Items?SortBy=SortName&IsVirtualUnaired=false&IsMissing=False&Fields=Name,SortName,CumulativeRunTimeTicks&Recursive=true&SortOrder=Ascending&IncludeItemTypes=BoxSet&format=json&ImageTypeLimit=1' - jsonData = downloadUtils.downloadUrl(url, suppress=True, popup=0) + jsonData = downloadUtils.downloadUrl(url, suppress=False, popup=0) if jsonData != None and jsonData != "": result = json.loads(jsonData) @@ -308,7 +308,7 @@ class ReadEmbyDB(): url = server + '/mediabrowser/Users/' + userid + '/Items?ParentId=' + boxsetId + '&Fields=ItemCounts&format=json&ImageTypeLimit=1' - jsonData = downloadUtils.downloadUrl(url, suppress=True, popup=0) + jsonData = downloadUtils.downloadUrl(url, suppress=False, popup=0) if jsonData != None and jsonData != "": result = json.loads(jsonData) diff --git a/resources/lib/WebSocketClient.py b/resources/lib/WebSocketClient.py index 89ef2f99..39d1d96d 100644 --- a/resources/lib/WebSocketClient.py +++ b/resources/lib/WebSocketClient.py @@ -211,7 +211,7 @@ class WebSocketThread(threading.Thread): userUrl = "http://" + host + ":" + port + "/mediabrowser/System/Info?format=json" downloadUtils = DownloadUtils() - jsonData = downloadUtils.downloadUrl(userUrl, suppress=True, popup=1 ) + jsonData = downloadUtils.downloadUrl(userUrl, suppress=False, popup=1 ) if(jsonData == ""): return -1 diff --git a/resources/lib/WriteKodiDB.py b/resources/lib/WriteKodiDB.py index 4235a761..143cdb2d 100644 --- a/resources/lib/WriteKodiDB.py +++ b/resources/lib/WriteKodiDB.py @@ -136,7 +136,7 @@ class WriteKodiDB(): trailerUrl = None if MBitem.get("LocalTrailerCount") != None and MBitem.get("LocalTrailerCount") > 0: itemTrailerUrl = "http://" + server + "/mediabrowser/Users/" + userid + "/Items/" + MBitem.get("Id") + "/LocalTrailers?format=json" - jsonData = downloadUtils.downloadUrl(itemTrailerUrl, suppress=True, popup=0 ) + jsonData = downloadUtils.downloadUrl(itemTrailerUrl, suppress=False, popup=0 ) if(jsonData != ""): trailerItem = json.loads(jsonData) if trailerItem[0].get("LocationType") == "FileSystem": @@ -299,7 +299,7 @@ class WriteKodiDB(): trailerUrl = None if MBitem.get("LocalTrailerCount") != None and MBitem.get("LocalTrailerCount") > 0: itemTrailerUrl = "http://" + server + "/mediabrowser/Users/" + userid + "/Items/" + MBitem.get("Id") + "/LocalTrailers?format=json" - jsonData = downloadUtils.downloadUrl(itemTrailerUrl, suppress=True, popup=0 ) + jsonData = downloadUtils.downloadUrl(itemTrailerUrl, suppress=False, popup=0 ) if(jsonData != ""): trailerItem = json.loads(jsonData) trailerUrl = "plugin://plugin.video.mb3sync/?id=" + trailerItem[0].get("Id") + '&mode=play'