Skip to content

Commit

Permalink
Merge pull request #1874 from cewert/fix-loadvideocontenttask-crash2
Browse files Browse the repository at this point in the history
  • Loading branch information
cewert authored Aug 3, 2024
2 parents 99ba525 + eda817d commit a93c893
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions components/ItemGrid/LoadVideoContentTask.bs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ enum SubtitleSelection
end enum

sub init()
m.user = AboutMe()
m.top.functionName = "loadItems"
end sub

Expand Down Expand Up @@ -570,16 +569,16 @@ function sortSubtitles(id as string, MediaStreams)
end function

function FindPreferredAudioStream(streams as dynamic) as integer
preferredLanguage = m.user.Configuration.AudioLanguagePreference
playDefault = m.user.Configuration.PlayDefaultAudioTrack
preferredLanguage = m.global.session.user.Configuration.AudioLanguagePreference
playDefault = m.global.session.user.Configuration.PlayDefaultAudioTrack

if playDefault <> invalid and playDefault = true
return 1
end if

' Do we already have the MediaStreams or not?
if streams = invalid
url = Substitute("Users/{0}/Items/{1}", m.user.id, m.top.itemId)
url = Substitute("Users/{0}/Items/{1}", m.global.session.user.id, m.top.itemId)
resp = APIRequest(url)
jsonResponse = getJson(resp)

Expand Down

0 comments on commit a93c893

Please sign in to comment.