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