~ubuntu-branches/ubuntu/maverick/vlc/maverick

« back to all changes in this revision

Viewing changes to share/lua/http/requests/playlist.xml

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-09-17 21:56:14 UTC
  • mfrom: (1.1.17 upstream)
  • Revision ID: james.westby@ubuntu.com-20080917215614-tj0vx8xzd57e52t8
Tags: 0.9.2-1ubuntu1
* New Upstream Release, exception granted by
    - dktrkranz, norsetto, Hobbsee (via irc). LP: #270404

Changes done in ubuntu:

* add libxul-dev to build-depends
* make sure that vlc is build against libxul in configure. This doesn't
  change anything in the package, but makes it more robust if building
  in an 'unclean' chroot or when modifying the package.
* debian/control: make Vcs-* fields point to the motumedia branch
* add libx264-dev and libass-dev to build-depends
  LP: #210354, #199870
* actually enable libass support by passing --enable-libass to configure
* enable libdca: add libdca-dev to build depends and --enable-libdca
* install the x264 plugin.

Changes already in the pkg-multimedia branch in debian:

* don't install usr/share/vlc/mozilla in debian/mozilla-plugin-vlc.install  
* new upstream .desktop file now registers flash video mimetype LP: #261567
* add Xb-Npp-Applications to mozilla-plugin-vlc
* remove duplicate entries in debian/vlc-nox.install

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="utf-8" standalone="yes" ?<?vlc print'>'?>
 
2
<?vlc --[[
 
3
vim:syntax=lua
 
4
<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
 
5
<  playlist.xml: VLC media player web interface
 
6
< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
 
7
<  Copyright (C) 2005-2006 the VideoLAN team
 
8
<  $Id$
 
9
 
10
<  Authors: Antoine Cellerier <dionoea -at- videolan -dot- org>
 
11
 
12
<  This program is free software; you can redistribute it and/or modify
 
13
<  it under the terms of the GNU General Public License as published by
 
14
<  the Free Software Foundation; either version 2 of the License, or
 
15
<  (at your option) any later version.
 
16
 
17
<  This program is distributed in the hope that it will be useful,
 
18
<  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
19
<  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
20
<  GNU General Public License for more details.
 
21
 
22
<  You should have received a copy of the GNU General Public License
 
23
<  along with this program; if not, write to the Free Software
 
24
<  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 
25
< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
 
26
]] ?>
 
27
 
 
28
<?vlc
 
29
--[[<node id="0" name="Undefined" ro="ro">]]
 
30
function print_playlist(item)
 
31
  if item.flags.disabled then return end
 
32
  if item.children then
 
33
    local name = vlc.strings.convert_xml_special_chars(item.name)
 
34
    print("<node id=\""..tostring(item.id).."\" name=\""..name.."\" ro=\""..(item.flags.ro and "ro" or "rw").."\">")
 
35
    for _, c in ipairs(item.children) do
 
36
      print_playlist(c)
 
37
    end
 
38
    print("</node>")
 
39
  else
 
40
    local name, path = vlc.strings.convert_xml_special_chars(item.name,item.path or "")
 
41
    print("<leaf id='"..tostring(item.id).."' uri='"..path.."' name='"..name.."' ro='"..(item.flags.ro and "ro" or "rw").."' duration='"..tostring(item.duration).."'/>")
 
42
  end
 
43
end
 
44
function a(t,pre)
 
45
  local pre = pre or ""
 
46
  for k,v in pairs(t) do
 
47
    vlc.msg.err(pre..tostring(k).." : "..tostring(v))
 
48
    if type(v) == "table" then
 
49
      a(v,pre.."  ")
 
50
    end
 
51
  end
 
52
end
 
53
--[[
 
54
for cat,pl in pairs(p) do
 
55
  print("<node id=\"-1\" name=\""..cat.."\" ro=\"ro\">")
 
56
  print_playlist(pl)
 
57
  print("</node>")
 
58
end
 
59
--]]
 
60
local p
 
61
if _GET["search"] then
 
62
  if _GET["search"] ~= "" then
 
63
    _G.search_key = _GET["search"]
 
64
  else
 
65
    _G.search_key = nil
 
66
  end
 
67
  local key = vlc.strings.decode_uri(_GET["search"])
 
68
  p = vlc.playlist.search(key)
 
69
else
 
70
  p = vlc.playlist.get()
 
71
end
 
72
-- a(p) Uncomment to debug
 
73
print_playlist(p)
 
74
?>
 
75
 
 
76
<?vlc --[[
 
77
</node>
 
78
<node id="9" name="Nevermind" ro="rw">
 
79
<leaf id="10" current="current" uri="file:///mnt/stuff/media/Nirvana/Nevermind/01 - Smells Like Teen Spirit.mp3" name="Smells Like Teen Spirit" ro="rw" duration="-1"/>
 
80
]]?>