[vlc-commits] use make_uri on mrl inputs

Rob Jonson git at videolan.org
Wed Oct 5 18:51:31 CEST 2011


vlc | branch: master | Rob Jonson <rob at hobbyistsoftware.com> | Wed Sep 28 13:05:13 2011 +0100| [ab90a0b9bc1eaedba71ea8456cbddb2750c8db00] | committer: Jean-Baptiste Kempf

use make_uri on mrl inputs

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 NEWS                                    |    1 +
 share/lua/http/requests/README.txt      |   22 +++++++++++++++++-----
 share/lua/intf/modules/httprequests.lua |    6 +++---
 3 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/NEWS b/NEWS
index 309843a..ffb08da 100644
--- a/NEWS
+++ b/NEWS
@@ -104,6 +104,7 @@ Interfaces:
  * dbus: Upgrade to an mpris2 compliant interface, see http://www.mpris.org
  * webUI/http: Rewrite of the web interface, using jQuery
  * webUI/http: some requests are now supported in JSON in addition to XML
+ * webUI/http: path values for input and output are deprecated in favour of uri
 
 Video Output:
  * New video output based on Direct2D for Windows 7 and Vista (with Platform Update)
diff --git a/share/lua/http/requests/README.txt b/share/lua/http/requests/README.txt
index e57ec3e..5cba1fd 100644
--- a/share/lua/http/requests/README.txt
+++ b/share/lua/http/requests/README.txt
@@ -13,22 +13,34 @@ Examples:
  space -> +
  ...
 
+
+Deprecation Notice:
+---
+The entire interface is moving to using <MRL> for input and output parameters and attributes
+pl_play and in_enqueue previously accepted paths. This is still supported, but from 1.3 <MRL> will be required
+where path attributes are provided in output, these should be ignored in favour of uri attributes
+path support is scheduled to be removed entirely from 1.3
+---
+
+
 status.xml or status.json
 ===========
+
+
 < Get VLC status information, current item info and meta.
 < Get VLC version, and http api version
 
-> add <mrl> to playlist and start playback:
-  ?command=in_play&input=<mrl>&option=<option>
+> add <uri> to playlist and start playback:
+  ?command=in_play&input=<uri>&option=<option>
   the option field is optional, and can have the values:
     noaudio
     novideo
 
-> add <mrl> to playlist:
-  ?command=in_enqueue&input=<mrl>
+> add <uri> to playlist:
+  ?command=in_enqueue&input=<uri>
 
 > add subtitle to currently playing file
-  ?command=addsubtitle&val=<path>
+  ?command=addsubtitle&val=<uri>
 
 > play playlist item <id>. If <id> is omitted, play last active item:
   ?command=pl_play&id=<id>
diff --git a/share/lua/intf/modules/httprequests.lua b/share/lua/intf/modules/httprequests.lua
index 4bcf0df..cd86113 100644
--- a/share/lua/intf/modules/httprequests.lua
+++ b/share/lua/intf/modules/httprequests.lua
@@ -83,11 +83,11 @@ processcommands = function ()
 	  end
 	  vlc.msg.err( "</options>" )
 	  --]]
-	  vlc.playlist.add({{path=input,options=options}})
+	  vlc.playlist.add({{path=vlc.strings.make_uri(input),options=options}})
 	elseif command == "addsubtitle" then
-	  vlc.input.add_subtitle (val)
+	  vlc.input.add_subtitle (vlc.strings.make_uri(val))
 	elseif command == "in_enqueue" then
-	  vlc.playlist.enqueue({{path=input,options=options}})
+	  vlc.playlist.enqueue({{path=vlc.strings.make_uri(input),options=options}})
 	elseif command == "pl_play" then
 	  if id == -1 then
 		vlc.playlist.play()



More information about the vlc-commits mailing list