[vlc-commits] update browse.xml to support uri as preferred param
Rob Jonson
git at videolan.org
Mon Sep 26 16:58:35 CEST 2011
vlc | branch: master | Rob Jonson <rob at hobbyistsoftware.com> | Sun Sep 25 23:17:27 2011 +0100| [1cbee971051a55dfb9aa76280549801fdc4cbe84] | committer: Rémi Denis-Courmont
update browse.xml to support uri as preferred param
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1cbee971051a55dfb9aa76280549801fdc4cbe84
---
share/lua/http/requests/README.txt | 5 +++++
share/lua/intf/modules/httprequests.lua | 9 ++++++++-
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/share/lua/http/requests/README.txt b/share/lua/http/requests/README.txt
index c47d4a1..a60969c 100644
--- a/share/lua/http/requests/README.txt
+++ b/share/lua/http/requests/README.txt
@@ -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
diff --git a/share/lua/intf/modules/httprequests.lua b/share/lua/intf/modules/httprequests.lua
index 74d1a68..bb34de4 100644
--- a/share/lua/intf/modules/httprequests.lua
+++ b/share/lua/intf/modules/httprequests.lua
@@ -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
More information about the vlc-commits
mailing list