HMS

Home Media Server for Roku Players
git clone https://www.brianlane.com/git/HMS
Log | Files | Refs | README | LICENSE

commit c68f65f0ca81fa926833c30ea18b855521c93a2b
parent 060330a17d41fccbae13a146400713dc12f0ce2e
Author: Brian C. Lane <bcl@brianlane.com>
Date:   Sun, 13 Oct 2024 13:57:21 -0700

Do not store grid position while starting playback

The keystore is only able to execute one command at a time, and it
doesn't have any detection to see if it is busy so trying to do a store
while starting ends up with a race, which the store usually wins, and
the playback gets the value of the grid position instead of the time
to start playing.

Really, the keystore needs a queue, but I do not want to implement that
right now.

Diffstat:
MHMS/components/MainScene.brs | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/HMS/components/MainScene.brs b/HMS/components/MainScene.brs @@ -190,7 +190,7 @@ sub OnPosterSelected() StartVideoPlayer(m.posterGrid.itemSelected) ' Store the new selection for this category - SetKeystoreValue(m.metadataTask.category, m.posterGrid.itemSelected.ToStr(), "ResetKeystoreTask") + ' SetKeystoreValue(m.metadataTask.category, m.posterGrid.itemSelected.ToStr(), "ResetKeystoreTask") end sub ' OnPosterFocused updates the information at the top of the screen with the @@ -266,6 +266,9 @@ sub StartPlayback() m.video.visible = true m.video.SetFocus(true) m.video.control = "play" + + ' Store the new selection for this category + ' SetKeystoreValue(m.metadataTask.category, m.posterGrid.itemSelected.ToStr(), "ResetKeystoreTask") end sub ' OnVideoStateChanged is called when the playback is finished or there is an error