commit 32962fc0e8d06bd83117b737f248b9f95b09fb5d
parent c68f65f0ca81fa926833c30ea18b855521c93a2b
Author: Brian C. Lane <bcl@brianlane.com>
Date:   Sun, 13 Oct 2024 14:07:59 -0700
Save the selected item when closing the player
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/HMS/components/MainScene.brs b/HMS/components/MainScene.brs
@@ -267,8 +267,6 @@ sub StartPlayback()
     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
@@ -295,6 +293,9 @@ sub CloseVideoPlayer()
     m.video.visible = false
     m.video.control = "stop"
     m.posterGrid.SetFocus(true)
+
+    ' Store the new selection for this category
+     SetKeystoreValue(m.metadataTask.category, m.posterGrid.itemFocused.ToStr(), "ResetKeystoreTask")
 end sub
 
 ' OnVideoPositionChange is called every 5 seconds and it sends the position