[vlc-commits] web intf: fix uri decoding when browsing.

Francois Cartegnie git at videolan.org
Sun Sep 25 00:15:37 CEST 2011


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Sep 24 20:31:53 2011 +0200| [fb9bbdc9a43b4bcb52141122f0a53eec862067ca] | committer: Francois Cartegnie

web intf: fix uri decoding when browsing.

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

 share/lua/http/js/controlers.js |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/share/lua/http/js/controlers.js b/share/lua/http/js/controlers.js
index fb21dd5..5d3e338 100644
--- a/share/lua/http/js/controlers.js
+++ b/share/lua/http/js/controlers.js
@@ -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('path'),$(this).attr('name').substr(-3)));
+					$('#browse_elements').append(createElementLi($(this).attr('name'),$(this).attr('type'),$(this).attr('uri'),$(this).attr('name').substr(-3)));
 				}
 			});
 			$('[opendir]').dblclick(function(){
-				browse($(this).attr('opendir'));
+				browse(decodeURIComponent($(this).attr('opendir')).substring(7));
 			});
 			$('[openfile]').dblclick(function(){
 				switch(tgt){
@@ -195,7 +195,7 @@ function browse(dir){
 					case '#mobile':
 						break;
 					default:
-						sendCommand('command=in_play&input=file://'+encodeURIComponent($(this).attr('openfile')));
+						sendCommand('command=in_play&input='+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=file://'+encodeURIComponent($(this).attr('openfile')),"window.location='mobile.html'");
+						sendCommand('command=in_play&input='+encodeURIComponent($(this).attr('openfile')),"window.location='mobile.html'");
 						break;
 					default:
 						break;



More information about the vlc-commits mailing list