save userConfig to global var + check userConfig before showing "next episode" popup
This commit is contained in:
parent
ef2b1293ec
commit
d34002cc3d
|
@ -86,7 +86,7 @@ end sub
|
||||||
' Runs Next Episode button animation and sets focus to button
|
' Runs Next Episode button animation and sets focus to button
|
||||||
sub showNextEpisodeButton()
|
sub showNextEpisodeButton()
|
||||||
if m.top.content.contenttype <> 4 then return
|
if m.top.content.contenttype <> 4 then return
|
||||||
if m.top.userConfig.EnableNextEpisodeAutoPlay and not m.nextEpisodeButton.visible
|
if m.global.userConfig.EnableNextEpisodeAutoPlay and not m.nextEpisodeButton.visible
|
||||||
m.showNextEpisodeButtonAnimation.control = "start"
|
m.showNextEpisodeButtonAnimation.control = "start"
|
||||||
m.nextEpisodeButton.setFocus(true)
|
m.nextEpisodeButton.setFocus(true)
|
||||||
m.nextEpisodeButton.visible = true
|
m.nextEpisodeButton.visible = true
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
<field id="directPlaySupported" type="boolean" />
|
<field id="directPlaySupported" type="boolean" />
|
||||||
<field id="systemOverlay" type="boolean" value="false" />
|
<field id="systemOverlay" type="boolean" value="false" />
|
||||||
<field id="showID" type="string" />
|
<field id="showID" type="string" />
|
||||||
<field id="userConfig" type="assocarray" />
|
|
||||||
|
|
||||||
<field id="transcodeParams" type="assocarray" />
|
<field id="transcodeParams" type="assocarray" />
|
||||||
<field id="transcodeAvailable" type="boolean" value="false" />
|
<field id="transcodeAvailable" type="boolean" value="false" />
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<component name="Home" extends="JFGroup">
|
<component name="Home" extends="JFGroup">
|
||||||
<children>
|
<children>
|
||||||
<Poster id="backdrop" loadDisplayMode="scaleToZoom" width="1920" height="1200" />
|
<Poster id="backdrop" loadDisplayMode="scaleToZoom" width="1920" height="1200" />
|
||||||
|
@ -7,7 +7,6 @@
|
||||||
</children>
|
</children>
|
||||||
<interface>
|
<interface>
|
||||||
<field id="selectedItem" alias="homeRows.selectedItem" />
|
<field id="selectedItem" alias="homeRows.selectedItem" />
|
||||||
<field id="userConfig" alias="homeRows.userConfig" />
|
|
||||||
<field id="quickPlayNode" alias="homeRows.quickPlayNode" />
|
<field id="quickPlayNode" alias="homeRows.quickPlayNode" />
|
||||||
<field id="timeLastRefresh" type="integer" />
|
<field id="timeLastRefresh" type="integer" />
|
||||||
<function name="refresh" />
|
<function name="refresh" />
|
||||||
|
@ -17,4 +16,4 @@
|
||||||
<script type="text/brightscript" uri="pkg:/source/api/baserequest.brs" />
|
<script type="text/brightscript" uri="pkg:/source/api/baserequest.brs" />
|
||||||
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
|
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
|
||||||
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
|
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
|
||||||
</component>
|
</component>
|
|
@ -97,7 +97,7 @@ sub onLibrariesLoaded()
|
||||||
|
|
||||||
' validate library data
|
' validate library data
|
||||||
if isValid(m.libraryData) and m.libraryData.count() > 0
|
if isValid(m.libraryData) and m.libraryData.count() > 0
|
||||||
userConfig = m.top.userConfig
|
userConfig = m.global.userConfig
|
||||||
|
|
||||||
' populate My Media row
|
' populate My Media row
|
||||||
filteredMedia = filterNodeArray(m.libraryData, "id", userConfig.MyMediaExcludes)
|
filteredMedia = filterNodeArray(m.libraryData, "id", userConfig.MyMediaExcludes)
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
<component name="HomeRows" extends="RowList">
|
<component name="HomeRows" extends="RowList">
|
||||||
<interface>
|
<interface>
|
||||||
<field id="selectedItem" type="node" alwaysNotify="true" />
|
<field id="selectedItem" type="node" alwaysNotify="true" />
|
||||||
<field id="userConfig" type="assocarray" />
|
|
||||||
<field id="quickPlayNode" type="node" alwaysNotify="true" />
|
<field id="quickPlayNode" type="node" alwaysNotify="true" />
|
||||||
<function name="updateHomeRows" />
|
<function name="updateHomeRows" />
|
||||||
<function name="loadLibraries" />
|
<function name="loadLibraries" />
|
||||||
|
|
|
@ -98,7 +98,7 @@ end sub
|
||||||
'
|
'
|
||||||
' Runs Next Episode button animation and sets focus to button
|
' Runs Next Episode button animation and sets focus to button
|
||||||
sub showNextEpisodeButton()
|
sub showNextEpisodeButton()
|
||||||
if not m.nextEpisodeButton.visible
|
if m.global.userConfig.EnableNextEpisodeAutoPlay and not m.nextEpisodeButton.visible
|
||||||
m.showNextEpisodeButtonAnimation.control = "start"
|
m.showNextEpisodeButtonAnimation.control = "start"
|
||||||
m.nextEpisodeButton.setFocus(true)
|
m.nextEpisodeButton.setFocus(true)
|
||||||
m.nextEpisodeButton.visible = true
|
m.nextEpisodeButton.visible = true
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<component name="VideoPlayerView" extends="Video">
|
<component name="VideoPlayerView" extends="Video">
|
||||||
<interface>
|
<interface>
|
||||||
<field id="backPressed" type="boolean" alwaysNotify="true" />
|
<field id="backPressed" type="boolean" alwaysNotify="true" />
|
||||||
|
|
|
@ -47,12 +47,13 @@ sub Main (args as dynamic) as void
|
||||||
app_start:
|
app_start:
|
||||||
' First thing to do is validate the ability to use the API
|
' First thing to do is validate the ability to use the API
|
||||||
if not LoginFlow() then return
|
if not LoginFlow() then return
|
||||||
|
' remove previous scenes from the stack
|
||||||
sceneManager.callFunc("clearScenes")
|
sceneManager.callFunc("clearScenes")
|
||||||
|
' save user config
|
||||||
|
m.global.addFields({ userConfig: m.user.configuration })
|
||||||
' load home page
|
' load home page
|
||||||
sceneManager.currentUser = m.user.Name
|
sceneManager.currentUser = m.user.Name
|
||||||
group = CreateHomeGroup()
|
group = CreateHomeGroup()
|
||||||
group.userConfig = m.user.configuration
|
|
||||||
group.callFunc("loadLibraries")
|
group.callFunc("loadLibraries")
|
||||||
sceneManager.callFunc("pushScene", group)
|
sceneManager.callFunc("pushScene", group)
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ function VideoPlayer(id, mediaSourceId = invalid, audio_stream_idx = 1, subtitle
|
||||||
' Get video controls and UI
|
' Get video controls and UI
|
||||||
video = CreateObject("roSGNode", "JFVideo")
|
video = CreateObject("roSGNode", "JFVideo")
|
||||||
video.id = id
|
video.id = id
|
||||||
video.userConfig = m.user.configuration
|
|
||||||
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"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user