Change suppress to False unless really needed

This is how it really was before yesterday's commit to re-enable the
optionality
This commit is contained in:
xnappo 2015-03-25 07:48:29 -05:00
parent d647463bb4
commit 03416513cf
4 changed files with 15 additions and 15 deletions

View File

@ -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):

View File

@ -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)

View File

@ -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

View File

@ -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'