mirror of
https://github.com/jellyfin/jellyfin-roku.git
synced 2024-11-23 06:09:41 +00:00
validate data from api to prevent crash on episode list
This commit is contained in:
parent
d7c99f508f
commit
e2080fb25a
@ -224,8 +224,12 @@ sub Main (args as dynamic) as void
|
||||
' Find the object in the scene's data and update its json data
|
||||
for i = 0 to currentScene.objects.Items.count() - 1
|
||||
if LCase(currentScene.objects.Items[i].id) = LCase(currentEpisode.id)
|
||||
currentScene.objects.Items[i].json = api.users.GetItem(m.global.session.user.id, currentEpisode.id)
|
||||
m.global.queueManager.callFunc("setTopStartingPoint", currentScene.objects.Items[i].json.UserData.PlaybackPositionTicks)
|
||||
|
||||
data = api.users.GetItem(m.global.session.user.id, currentEpisode.id)
|
||||
if isValid(data)
|
||||
currentScene.objects.Items[i].json = data
|
||||
m.global.queueManager.callFunc("setTopStartingPoint", data.UserData.PlaybackPositionTicks)
|
||||
end if
|
||||
exit for
|
||||
end if
|
||||
end for
|
||||
|
Loading…
Reference in New Issue
Block a user