mirror of
https://github.com/jellyfin/jellyfin-roku.git
synced 2025-02-25 09:20:54 +00:00
unbreak details spinners
This commit is contained in:
parent
241216666e
commit
b54b5bdcc4
@ -167,6 +167,7 @@ sub Main (args as dynamic) as void
|
||||
else if selectedItem.type = "Episode"
|
||||
' play episode
|
||||
' todo: create an episode page to link here
|
||||
startLoadingSpinner()
|
||||
video_id = selectedItem.id
|
||||
if selectedItem.selectedAudioStreamIndex <> invalid and selectedItem.selectedAudioStreamIndex > 1
|
||||
video = CreateVideoPlayerGroup(video_id, invalid, selectedItem.selectedAudioStreamIndex)
|
||||
@ -236,10 +237,12 @@ sub Main (args as dynamic) as void
|
||||
group = CreateMovieDetailsGroup(node)
|
||||
else if isNodeEvent(msg, "seriesSelected")
|
||||
' If you select a TV Series from ANYWHERE, follow this flow
|
||||
startLoadingSpinner()
|
||||
node = getMsgPicker(msg, "picker")
|
||||
group = CreateSeriesDetailsGroup(node)
|
||||
else if isNodeEvent(msg, "seasonSelected")
|
||||
' If you select a TV Season from ANYWHERE, follow this flow
|
||||
startLoadingSpinner()
|
||||
ptr = msg.getData()
|
||||
' ptr is for [row, col] of selected item... but we only have 1 row
|
||||
series = msg.getRoSGNode()
|
||||
|
@ -6,12 +6,12 @@ function VideoPlayer(id, mediaSourceId = invalid, audio_stream_idx = 1, subtitle
|
||||
AddVideoContent(video, mediaSourceId, audio_stream_idx, subtitle_idx, -1, forceTranscoding, showIntro, allowResumeDialog)
|
||||
|
||||
if video.errorMsg = "introaborted"
|
||||
stopMediaLoadingSpinner()
|
||||
stopLoadingSpinner()
|
||||
return video
|
||||
end if
|
||||
|
||||
if video.content = invalid
|
||||
stopMediaLoadingSpinner()
|
||||
stopLoadingSpinner()
|
||||
return invalid
|
||||
end if
|
||||
jellyfin_blue = "#00a4dcFF"
|
||||
@ -19,7 +19,7 @@ function VideoPlayer(id, mediaSourceId = invalid, audio_stream_idx = 1, subtitle
|
||||
video.retrievingBar.filledBarBlendColor = jellyfin_blue
|
||||
video.bufferingBar.filledBarBlendColor = jellyfin_blue
|
||||
video.trickPlayBar.filledBarBlendColor = jellyfin_blue
|
||||
stopMediaLoadingSpinner()
|
||||
stopLoadingSpinner()
|
||||
return video
|
||||
end function
|
||||
|
||||
@ -61,7 +61,7 @@ sub AddVideoContent(video, mediaSourceId, audio_stream_idx = 1, subtitle_idx = -
|
||||
playbackPosition = meta.json.UserData.PlaybackPositionTicks
|
||||
if allowResumeDialog
|
||||
if playbackPosition > 0
|
||||
stopMediaLoadingSpinner()
|
||||
stopLoadingSpinner()
|
||||
dialogResult = startPlayBackOver(playbackPosition)
|
||||
startMediaLoadingSpinner()
|
||||
'Dialog returns -1 when back pressed, 0 for resume, and 1 for start over
|
||||
|
@ -282,17 +282,23 @@ function findNodeBySubtype(node, subtype)
|
||||
return foundNodes
|
||||
end function
|
||||
|
||||
sub startMediaLoadingSpinner()
|
||||
sub startLoadingSpinner()
|
||||
m.spinner = createObject("roSGNode", "Spinner")
|
||||
m.spinner.translation = "[900, 450]"
|
||||
m.spinner.visible = true
|
||||
m.scene.appendChild(m.spinner)
|
||||
end sub
|
||||
|
||||
|
||||
sub startMediaLoadingSpinner()
|
||||
dialog = createObject("roSGNode", "ProgressDialog")
|
||||
dialog.id = "invisibiledialog"
|
||||
dialog.visible = false
|
||||
m.scene.dialog = dialog
|
||||
startLoadingSpinner()
|
||||
end sub
|
||||
|
||||
sub stopMediaLoadingSpinner()
|
||||
sub stopLoadingSpinner()
|
||||
if isValid(m.spinner)
|
||||
m.spinner.visible = false
|
||||
end if
|
||||
|
Loading…
x
Reference in New Issue
Block a user