diff --git a/components/data/SceneManager.brs b/components/data/SceneManager.brs index f621ae4d..b018ca75 100755 --- a/components/data/SceneManager.brs +++ b/components/data/SceneManager.brs @@ -141,7 +141,7 @@ end sub ' ' Clear previous scene from group stack sub clearPreviousScene() - m.groups.pop() + m.groups.Delete(2) end sub ' diff --git a/source/Main.brs b/source/Main.brs index 5dccf5b1..849c9189 100644 --- a/source/Main.brs +++ b/source/Main.brs @@ -110,6 +110,7 @@ sub Main (args as dynamic) as void else if isNodeEvent(msg, "selectedItem") ' If you select a library from ANYWHERE, follow this flow selectedItem = msg.getData() + m.type = selectedItem.type if selectedItem.type = "CollectionFolder" or selectedItem.type = "UserView" or selectedItem.type = "Folder" or selectedItem.type = "Channel" or selectedItem.type = "Boxset" group = CreateItemGrid(selectedItem) sceneManager.callFunc("pushScene", group) @@ -218,6 +219,7 @@ sub Main (args as dynamic) as void end if else if isNodeEvent(msg, "episodeSelected") ' If you select a TV Episode from ANYWHERE, follow this flow + m.type = "Episode" node = getMsgPicker(msg, "picker") video_id = node.id if node.selectedAudioStreamIndex <> invalid and node.selectedAudioStreamIndex > 1 @@ -247,6 +249,7 @@ sub Main (args as dynamic) as void node = getMsgPicker(msg) ' TODO - swap this based on target.mediatype ' types: [ Series (Show), Episode, Movie, Audio, Person, Studio, MusicArtist ] + m.type = node.type if node.type = "Series" group = CreateSeriesDetailsGroup(node) else if node.type = "Movie" @@ -387,7 +390,7 @@ sub Main (args as dynamic) as void end if else if isNodeEvent(msg, "state") node = msg.getRoSGNode() - if selectedItem.Type = "TvChannel" and node.state = "finished" + if m.type = "TvChannel" and node.state = "finished" video = CreateVideoPlayerGroup(node.id) m.global.sceneManager.callFunc("pushScene", video) m.global.sceneManager.callFunc("clearPreviousScene") diff --git a/source/VideoPlayer.brs b/source/VideoPlayer.brs index aad86829..1f7334a3 100644 --- a/source/VideoPlayer.brs +++ b/source/VideoPlayer.brs @@ -348,8 +348,6 @@ end function function startPlayBackOver(time as longinteger) as integer if m.scene.focusedChild.focusedChild.overhangTitle = tr("Home") and (m.videotype = "Episode" or m.videotype = "Series") return option_dialog([tr("Resume playing at ") + ticksToHuman(time) + ".", tr("Start over from the beginning."), tr("Watched"), tr("Go to series"), tr("Go to season"), tr("Go to episode")]) - else - return option_dialog(["Resume playing at " + ticksToHuman(time) + ".", "Start over from the beginning."]) end if end function