mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +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,"
|
"Path,Genres,SortName,Studios,Writer,ProductionYear,Taglines,"
|
||||||
"CommunityRating,OfficialRating,CumulativeRunTimeTicks,"
|
"CommunityRating,OfficialRating,CumulativeRunTimeTicks,"
|
||||||
"Metascore,AirTime,DateCreated,MediaStreams,People,Overview,"
|
"Metascore,AirTime,DateCreated,MediaStreams,People,Overview,"
|
||||||
"CriticRating,CriticRatingSummary,Etag,ProductionLocations,"
|
"CriticRating,CriticRatingSummary,Etag,ShortOverview,ProductionLocations,"
|
||||||
"Tags,ProviderIds,RemoteTrailers,SpecialEpisodeNumbers"
|
"Tags,ProviderIds,ParentId,RemoteTrailers,SpecialEpisodeNumbers,"
|
||||||
|
"MediaSources"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
result = self.doUtils.downloadUrl(url, parameters=params)
|
result = self.doUtils.downloadUrl(url, parameters=params)
|
||||||
|
@ -205,12 +206,19 @@ class Read_EmbyServer():
|
||||||
"CommunityRating,OfficialRating,CumulativeRunTimeTicks,"
|
"CommunityRating,OfficialRating,CumulativeRunTimeTicks,"
|
||||||
"Metascore,AirTime,DateCreated,MediaStreams,People,Overview,"
|
"Metascore,AirTime,DateCreated,MediaStreams,People,Overview,"
|
||||||
"CriticRating,CriticRatingSummary,Etag,ShortOverview,ProductionLocations,"
|
"CriticRating,CriticRatingSummary,Etag,ShortOverview,ProductionLocations,"
|
||||||
"Tags,ProviderIds,ParentId,RemoteTrailers,SpecialEpisodeNumbers"
|
"Tags,ProviderIds,ParentId,RemoteTrailers,SpecialEpisodeNumbers,"
|
||||||
|
"MediaSources"
|
||||||
)
|
)
|
||||||
result = doUtils.downloadUrl(url, parameters=params)
|
result = doUtils.downloadUrl(url, parameters=params)
|
||||||
items['Items'].extend(result['Items'])
|
try:
|
||||||
|
items['Items'].extend(result['Items'])
|
||||||
index += jump
|
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
|
return items
|
||||||
|
|
||||||
|
@ -389,9 +397,15 @@ class Read_EmbyServer():
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
result = doUtils.downloadUrl(url, parameters=params)
|
result = doUtils.downloadUrl(url, parameters=params)
|
||||||
items['Items'].extend(result['Items'])
|
try:
|
||||||
|
items['Items'].extend(result['Items'])
|
||||||
index += jump
|
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
|
return items
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue