]> git.sesse.net Git - vlc/commitdiff
update browse.xml to support uri as preferred param
authorRob Jonson <rob@hobbyistsoftware.com>
Sun, 25 Sep 2011 22:17:27 +0000 (23:17 +0100)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 26 Sep 2011 14:57:10 +0000 (17:57 +0300)
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
share/lua/http/requests/README.txt
share/lua/intf/modules/httprequests.lua

index c47d4a19915ac90a10af9f92d4d583244dfab08c..a60969c4241d26954e7a63c58eb5cd87aa195d23 100644 (file)
@@ -146,6 +146,11 @@ It may be removed without notice.
 
 browse.xml:
 ===========
+
+< ?dir=<uri>
+> get file list from uri. At the moment, only local file uris are supported
+
+NB: uri is the preferred parameter. Dir is deprecated and may be removed in a future release.
 < ?dir=<dir>
 > get <dir>'s filelist
 
index 74d1a68bee6a957ac8494da85eeb04e10ca2496d..bb34de49e65a7caa6c13fcd6df97cd6caeacc6e4 100644 (file)
@@ -356,7 +356,14 @@ end
 
 getbrowsetable = function ()
 
-       local dir = _GET["dir"]
+       local dir = nil
+       local uri = _GET["uri"]
+       --uri takes precedence, but fall back to dir
+       if uri then
+               dir = vlc.strings.make_path(uri)
+       else
+               dir = _GET["dir"]
+       end
 
        local result={}
        --paths are returned as an array of elements