[vlc-commits] add browse.json as an alternative view of the browse data

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:19:39 2011 +0100| [9807b702b63b757c07e14a9e03b42cb9fdda4b8a] | committer: Rémi Denis-Courmont

add browse.json as an alternative view of the browse data

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

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

 share/Makefile.am                   |    1 +
 share/lua/http/requests/README.txt  |    2 +-
 share/lua/http/requests/browse.json |   40 +++++++++++++++++++++++++++++++++++
 3 files changed, 42 insertions(+), 1 deletions(-)

diff --git a/share/Makefile.am b/share/Makefile.am
index f030eda..ac6ed9c 100644
--- a/share/Makefile.am
+++ b/share/Makefile.am
@@ -327,6 +327,7 @@ DIST_http_lua = \
 	lua/http/requests/README.txt \
 	lua/http/requests/playlist_jstree.xml \
 	lua/http/requests/browse.xml \
+	lua/http/requests/browse.json \
 	lua/http/requests/vlm_cmd.xml \
 	lua/http/requests/status.xml \
 	lua/http/requests/status.json \
diff --git a/share/lua/http/requests/README.txt b/share/lua/http/requests/README.txt
index a60969c..e57ec3e 100644
--- a/share/lua/http/requests/README.txt
+++ b/share/lua/http/requests/README.txt
@@ -144,7 +144,7 @@ playlist.xml or playlist.json:
 NB: playlist_jstree.xml is used for the internal web client. It should not be relied upon by external remotes.
 It may be removed without notice.
 
-browse.xml:
+browse.xml or browse.json:
 ===========
 
 < ?dir=<uri>
diff --git a/share/lua/http/requests/browse.json b/share/lua/http/requests/browse.json
new file mode 100644
index 0000000..da9fc9a
--- /dev/null
+++ b/share/lua/http/requests/browse.json
@@ -0,0 +1,40 @@
+<?vlc --[[
+vim:syntax=lua
+<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
+<  status.xml: VLC media player web interface
+<  this should mirror the content and function of status.json
+< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
+<  Copyright (C) 2005-2009 the VideoLAN team
+<  $Id$
+<
+<  Authors: Rob Jonson <rob -at- hobbyistsoftware -dot- com>
+<
+<  This program is free software; you can redistribute it and/or modify
+<  it under the terms of the GNU General Public License as published by
+<  the Free Software Foundation; either version 2 of the License, or
+<  (at your option) any later version.
+<
+<  This program is distributed in the hope that it will be useful,
+<  but WITHOUT ANY WARRANTY; without even the implied warranty of
+<  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+<  GNU General Public License for more details.
+<
+<  You should have received a copy of the GNU General Public License
+<  along with this program; if not, write to the Free Software
+<  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+]]?>
+<?vlc
+
+--package.loaded.httprequests = nil --uncomment to debug changes
+require "httprequests"
+
+httprequests.processcommands()
+
+local browseTable=httprequests.getbrowsetable()
+
+print('{')
+httprequests.printTableAsJson(browseTable,0)
+print('}')
+
+?>



More information about the vlc-commits mailing list