Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
f906e24e by Prince Gupta at 2023-03-07T14:07:05+00:00
qml: fix play with keyboard in recent videos' section

previously actionAtIndex was accessing it's parents model to get the id
from index, fix it to use it's own recent video model

- - - - -


1 changed file:

- modules/gui/qt/medialibrary/qml/VideoDisplayRecentVideos.qml


Changes:

=====================================
modules/gui/qt/medialibrary/qml/VideoDisplayRecentVideos.qml
=====================================
@@ -47,8 +47,8 @@ FocusScope {
 
     // Functions
 
-    function _actionAtIndex(index) {
-        MediaLib.addAndPlay( model.getIdForIndexes(index), 
[":restore-playback-pos=2"] )
+    function _play(id) {
+        MediaLib.addAndPlay( id, [":restore-playback-pos=2"] )
         g_mainDisplay.showPlayer()
     }
 
@@ -158,13 +158,14 @@ FocusScope {
 
                 function play() {
                     if (model.id !== undefined) {
-                        MediaLib.addAndPlay( model.id, 
[":restore-playback-pos=2"] )
-                        g_mainDisplay.showPlayer()
+                        root._play(model.id)
                     }
                 }
             }
 
-            onActionAtIndex: root._actionAtIndex(index)
+            onActionAtIndex: {
+                root._play(model.getIdForIndex(index))
+            }
         }
 
         Widgets.SubtitleLabel {



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/f906e24e6b4d6261837bd7cf0dea86bb45857c30

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/f906e24e6b4d6261837bd7cf0dea86bb45857c30
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to