]> git.sesse.net Git - vlc/commitdiff
Revert "web intf: fix uri decoding when browsing."
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 25 Sep 2011 11:42:58 +0000 (14:42 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 25 Sep 2011 11:49:18 +0000 (14:49 +0300)
This reverts commit fb9bbdc9a43b4bcb52141122f0a53eec862067ca.

share/lua/http/js/controlers.js

index 5d3e3381e1f65b512d7ac95e76ecaea5a6684a32..fb21dd531d76724eab5b363fc9ad7ba9ad905bef 100644 (file)
@@ -172,11 +172,11 @@ function browse(dir){
                        $('#browse_elements').empty();
             $('element',data).each(function(){
                                if($(this).attr('type')=='dir' || $.inArray($(this).attr('name').substr(-3),video_types)!=-1 || $.inArray($(this).attr('name').substr(-3),audio_types)!=-1){
-                                       $('#browse_elements').append(createElementLi($(this).attr('name'),$(this).attr('type'),$(this).attr('uri'),$(this).attr('name').substr(-3)));
+                                       $('#browse_elements').append(createElementLi($(this).attr('name'),$(this).attr('type'),$(this).attr('path'),$(this).attr('name').substr(-3)));
                                }
                        });
                        $('[opendir]').dblclick(function(){
-                               browse(decodeURIComponent($(this).attr('opendir')).substring(7));
+                               browse($(this).attr('opendir'));
                        });
                        $('[openfile]').dblclick(function(){
                                switch(tgt){
@@ -195,7 +195,7 @@ function browse(dir){
                                        case '#mobile':
                                                break;
                                        default:
-                                               sendCommand('command=in_play&input='+encodeURIComponent($(this).attr('openfile')));
+                                               sendCommand('command=in_play&input=file://'+encodeURIComponent($(this).attr('openfile')));
                                                break;
                                }
                                $('#window_browse').dialog('close');
@@ -212,7 +212,7 @@ function browse(dir){
                        $('[openfile]').click(function(){
                                switch(tgt){
                                        case '#mobile':
-                                               sendCommand('command=in_play&input='+encodeURIComponent($(this).attr('openfile')),"window.location='mobile.html'");
+                                               sendCommand('command=in_play&input=file://'+encodeURIComponent($(this).attr('openfile')),"window.location='mobile.html'");
                                                break;
                                        default:
                                                break;