[vlc-commits] Revert "lua http: fix valid uri handling with v2."

Rémi Denis-Courmont git at videolan.org
Sun Sep 25 13:43:02 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Sep 25 14:42:57 2011 +0300| [e6508c3bb4310614647104782a94bbd764650b92] | committer: Rémi Denis-Courmont

Revert "lua http: fix valid uri handling with v2."

This reverts commit 06108030c0cc8e0bfb633319c9dae7ba7b349855.

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

 share/lua/http/js/controlers.js         |    4 ++--
 share/lua/intf/modules/httprequests.lua |   11 ++---------
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/share/lua/http/js/controlers.js b/share/lua/http/js/controlers.js
index 0d3680e..5d3e338 100644
--- a/share/lua/http/js/controlers.js
+++ b/share/lua/http/js/controlers.js
@@ -195,7 +195,7 @@ function browse(dir){
 					case '#mobile':
 						break;
 					default:
-						sendCommand('command=in_play&v=2&input='+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&v=2&input='+encodeURIComponent($(this).attr('openfile')),"window.location='mobile.html'");
+						sendCommand('command=in_play&input='+encodeURIComponent($(this).attr('openfile')),"window.location='mobile.html'");
 						break;
 					default:
 						break;
diff --git a/share/lua/intf/modules/httprequests.lua b/share/lua/intf/modules/httprequests.lua
index 0afdc24..131f164 100644
--- a/share/lua/intf/modules/httprequests.lua
+++ b/share/lua/intf/modules/httprequests.lua
@@ -71,12 +71,10 @@ processcommands = function ()
 
 	local input = _GET['input']
 	local command = _GET['command']
-	local version = tonumber(_GET['v'] or 1)
 	local id = tonumber(_GET['id'] or -1)
 	local val = _GET['val']
 	local options = _GET['option']
 	local band = _GET['band']
-	local decodedpath
 	if type(options) ~= "table" then -- Deal with the 0 or 1 option case
 	  options = { options }
 	end
@@ -89,16 +87,11 @@ processcommands = function ()
 	  end
 	  vlc.msg.err( "</options>" )
 	  --]]
-	  if version == 2 then
-		decodedpath = input
-	  else
-		decodedpath = stripslashes(input)
-	  end
-	  vlc.playlist.add({{path=decodedpath,options=options}})
+	  vlc.playlist.add({{path=stripslashes(input),options=options}})
 	elseif command == "addsubtitle" then
 	  vlc.input.add_subtitle (stripslashes(val))
 	elseif command == "in_enqueue" then
-	  vlc.playlist.enqueue({{path=decodedpath,options=options}})
+	  vlc.playlist.enqueue({{path=stripslashes(input),options=options}})
 	elseif command == "pl_play" then
 	  if id == -1 then
 		vlc.playlist.play()



More information about the vlc-commits mailing list