Skip to content

Commit

Permalink
validate api data to prevent crash when hitting shuffle play from tv …
Browse files Browse the repository at this point in the history
…show details
  • Loading branch information
cewert committed Oct 1, 2024
1 parent d7c99f5 commit 4328318
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/tvshows/TVShowDetails.bs
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,10 @@ end function

sub onShuffleEpisodeDataLoaded()
m.getShuffleEpisodesTask.unobserveField("data")
m.global.queueManager.callFunc("set", m.getShuffleEpisodesTask.data.items)
m.global.queueManager.callFunc("playQueue")
if isValid(m.getShuffleEpisodesTask.data)
m.global.queueManager.callFunc("set", m.getShuffleEpisodesTask.data.items)
m.global.queueManager.callFunc("playQueue")
end if
end sub

function onKeyEvent(key as string, press as boolean) as boolean
Expand Down

0 comments on commit 4328318

Please sign in to comment.