[vlc-commits] add playlist.json as an additional view of playlist data

Rob Jonson git at videolan.org
Mon Sep 26 16:58:34 CEST 2011


vlc | branch: master | Rob Jonson <rob at hobbyistsoftware.com> | Sun Sep 25 23:02:45 2011 +0100| [e9905eb97e74b0ea52922850a5ea328a56a79172] | committer: Rémi Denis-Courmont

add playlist.json as an additional view of playlist data

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

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

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

diff --git a/share/Makefile.am b/share/Makefile.am
index d7b5dbd..f030eda 100644
--- a/share/Makefile.am
+++ b/share/Makefile.am
@@ -323,6 +323,7 @@ DIST_http_lua = \
 	lua/http/mobile_view.html \
 	lua/http/.hosts \
 	lua/http/requests/playlist.xml \
+	lua/http/requests/playlist.json \
 	lua/http/requests/README.txt \
 	lua/http/requests/playlist_jstree.xml \
 	lua/http/requests/browse.xml \
diff --git a/share/lua/http/requests/README.txt b/share/lua/http/requests/README.txt
index 47e59aa..c091e91 100644
--- a/share/lua/http/requests/README.txt
+++ b/share/lua/http/requests/README.txt
@@ -137,7 +137,7 @@ Band 0: 60 Hz, 1: 170 Hz, 2: 310 Hz, 3: 600 Hz, 4: 1 kHz,
 
 <Display the list of presets available for the equalizer
 
-playlist.xml:
+playlist.xml or playlist.json:
 =============
 < get the full playlist tree
 
diff --git a/share/lua/http/requests/playlist.json b/share/lua/http/requests/playlist.json
new file mode 100644
index 0000000..f99866e
--- /dev/null
+++ b/share/lua/http/requests/playlist.json
@@ -0,0 +1,38 @@
+<?vlc --[[
+vim:syntax=lua
+<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
+<  playlist.json: VLC media player web interface
+<  this should mirror the content of playlist.xml
+< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
+<  Copyright (C) 2005-2006 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()
+
+print('{')
+httprequests.printTableAsJson(httprequests.playlisttable(),0)
+print('}')
+
+?>



More information about the vlc-commits mailing list