vlc | branch: master | Pierre Ynard <[email protected]> | Fri Aug  7 19:14:09 
2020 +0200| [9b167d9a8bf293a1d3612b1ad80f352d998e41ad] | committer: Pierre Ynard

lua/http: fix stray use of renamed current_id variable

This prevented the play button from working if no playlist item was
selected.

Fixes #4516

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9b167d9a8bf293a1d3612b1ad80f352d998e41ad
---

 share/lua/http/index.html | 2 +-
 share/lua/http/js/ui.js   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/share/lua/http/index.html b/share/lua/http/index.html
index 211fa08eec..4a8a4ff51c 100644
--- a/share/lua/http/index.html
+++ b/share/lua/http/index.html
@@ -168,7 +168,7 @@
                                        modal: true,
                                        buttons:{
                                                "<?vlc gettext("Yes") 
?>":function(){
-                                                       var file                
        =       $('[current="current"]','#libraryTree').length>0 ? 
$('[current="current"]','#libraryTree').first().attr('uri') : 
($('.jstree-clicked','#libraryTree').length>0 ? 
$('.jstree-clicked','#libraryTree').first().parents().first().attr('uri') : 
($('#plid_'+current_id).attr('uri') ? $('#plid_'+current_id).attr('uri') : 
false));
+                                                       var file                
        =       $('[current="current"]','#libraryTree').length>0 ? 
$('[current="current"]','#libraryTree').first().attr('uri') : 
($('.jstree-clicked','#libraryTree').length>0 ? 
$('.jstree-clicked','#libraryTree').first().parents().first().attr('uri') : 
($('#plid_'+current_playlist_id).attr('uri') ? 
$('#plid_'+current_playlist_id).attr('uri') : false));
                                                        if(file){
                                                                
if($('#viewContainer').css('display')=='none'){
                                                                        
$('#buttonViewer').click();
diff --git a/share/lua/http/js/ui.js b/share/lua/http/js/ui.js
index a404ef0ef8..3950bf056c 100644
--- a/share/lua/http/js/ui.js
+++ b/share/lua/http/js/ui.js
@@ -61,7 +61,7 @@ $(function () {
         if ($(this).attr('state') == 'stopped') {
             switch (current_que) {
             case 'main':
-                var id = $('.jstree-clicked', '#libraryTree').length > 0 ? 
$('.jstree-clicked', 
'#libraryTree').first().parents().first().attr('id').substr(5) : current_id;
+                var id = $('.jstree-clicked', '#libraryTree').length > 0 ? 
$('.jstree-clicked', 
'#libraryTree').first().parents().first().attr('id').substr(5) : 
current_playlist_id;
                 sendCommand({
                     'command': 'pl_play',
                     'id': id

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to