mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Revert throttle
Will have to test further with timeout scenario, before reimplementing
This commit is contained in:
parent
bfb893ad8e
commit
81dcd36dc3
1 changed files with 12 additions and 24 deletions
|
@ -210,18 +210,12 @@ class Read_EmbyServer():
|
||||||
"MediaSources"
|
"MediaSources"
|
||||||
)
|
)
|
||||||
result = doUtils.downloadUrl(url, parameters=params)
|
result = doUtils.downloadUrl(url, parameters=params)
|
||||||
try:
|
items['Items'].extend(result['Items'])
|
||||||
items['Items'].extend(result['Items'])
|
|
||||||
except TypeError:
|
index += jump
|
||||||
# Connection timed out, reduce the number
|
if dialog:
|
||||||
jump -= 50
|
percentage = int((float(index) / float(total))*100)
|
||||||
self.limitindex = jump
|
dialog.update(percentage)
|
||||||
self.logMsg("New throttle for items requested: %s" % jump, 1)
|
|
||||||
else:
|
|
||||||
index += jump
|
|
||||||
if dialog:
|
|
||||||
percentage = int((float(index) / float(total))*100)
|
|
||||||
dialog.update(percentage)
|
|
||||||
return items
|
return items
|
||||||
|
|
||||||
def getViews(self, type, root=False):
|
def getViews(self, type, root=False):
|
||||||
|
@ -399,18 +393,12 @@ class Read_EmbyServer():
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
result = doUtils.downloadUrl(url, parameters=params)
|
result = doUtils.downloadUrl(url, parameters=params)
|
||||||
try:
|
items['Items'].extend(result['Items'])
|
||||||
items['Items'].extend(result['Items'])
|
|
||||||
except TypeError:
|
index += jump
|
||||||
# Connection timed out, reduce the number
|
if dialog:
|
||||||
jump -= 50
|
percentage = int((float(index) / float(total))*100)
|
||||||
self.limitindex = jump
|
dialog.update(percentage)
|
||||||
self.logMsg("New throttle for items requested: %s" % jump, 1)
|
|
||||||
else:
|
|
||||||
index += jump
|
|
||||||
if dialog:
|
|
||||||
percentage = int((float(index) / float(total))*100)
|
|
||||||
dialog.update(percentage)
|
|
||||||
return items
|
return items
|
||||||
|
|
||||||
def getAlbums(self, basic=False, dialog=None):
|
def getAlbums(self, basic=False, dialog=None):
|
||||||
|
|
Loading…
Reference in a new issue