mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-24 09:46:11 +00:00
Fix missing mediasources
Also add a throttle to avoid crash if server connection times out.
This commit is contained in:
parent
5c9e571936
commit
5112500f4d
1 changed files with 23 additions and 9 deletions
|
@ -80,8 +80,9 @@ class Read_EmbyServer():
|
|||
"Path,Genres,SortName,Studios,Writer,ProductionYear,Taglines,"
|
||||
"CommunityRating,OfficialRating,CumulativeRunTimeTicks,"
|
||||
"Metascore,AirTime,DateCreated,MediaStreams,People,Overview,"
|
||||
"CriticRating,CriticRatingSummary,Etag,ProductionLocations,"
|
||||
"Tags,ProviderIds,RemoteTrailers,SpecialEpisodeNumbers"
|
||||
"CriticRating,CriticRatingSummary,Etag,ShortOverview,ProductionLocations,"
|
||||
"Tags,ProviderIds,ParentId,RemoteTrailers,SpecialEpisodeNumbers,"
|
||||
"MediaSources"
|
||||
)
|
||||
}
|
||||
result = self.doUtils.downloadUrl(url, parameters=params)
|
||||
|
@ -205,12 +206,19 @@ class Read_EmbyServer():
|
|||
"CommunityRating,OfficialRating,CumulativeRunTimeTicks,"
|
||||
"Metascore,AirTime,DateCreated,MediaStreams,People,Overview,"
|
||||
"CriticRating,CriticRatingSummary,Etag,ShortOverview,ProductionLocations,"
|
||||
"Tags,ProviderIds,ParentId,RemoteTrailers,SpecialEpisodeNumbers"
|
||||
"Tags,ProviderIds,ParentId,RemoteTrailers,SpecialEpisodeNumbers,"
|
||||
"MediaSources"
|
||||
)
|
||||
result = doUtils.downloadUrl(url, parameters=params)
|
||||
items['Items'].extend(result['Items'])
|
||||
|
||||
index += jump
|
||||
try:
|
||||
items['Items'].extend(result['Items'])
|
||||
except TypeError:
|
||||
# Connection timed out, reduce the number
|
||||
jump -= 50
|
||||
self.limitindex = jump
|
||||
self.logMsg("New throttle for items requested: %s" % jump, 1)
|
||||
else:
|
||||
index += jump
|
||||
|
||||
return items
|
||||
|
||||
|
@ -389,9 +397,15 @@ class Read_EmbyServer():
|
|||
)
|
||||
}
|
||||
result = doUtils.downloadUrl(url, parameters=params)
|
||||
items['Items'].extend(result['Items'])
|
||||
|
||||
index += jump
|
||||
try:
|
||||
items['Items'].extend(result['Items'])
|
||||
except TypeError:
|
||||
# Connection timed out, reduce the number
|
||||
jump -= 50
|
||||
self.limitindex = jump
|
||||
self.logMsg("New throttle for items requested: %s" % jump, 1)
|
||||
else:
|
||||
index += jump
|
||||
|
||||
return items
|
||||
|
||||
|
|
Loading…
Reference in a new issue