4 Copyright © 2010 VideoLAN and AUTHORS
6 Authors: Rémi Duraffort <ivoire at videolan dot org>
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
26 return vlc.access == 'http' and string.match( vlc.path, 'metachannels.com' )
32 local line = vlc.readline()
33 if line == nil then break end
34 webpage = webpage .. line
37 local feed = simplexml.parse_string( webpage )
38 local channel = feed.children[1]
40 -- list all children that are items
42 for _,item in ipairs( channel.children ) do
43 if( item.name == 'item' ) then
44 simplexml.add_name_maps( item )
45 local url = vlc.strings.resolve_xml_special_chars( item.children_map['link'][1].children[1] )
46 local title = vlc.strings.resolve_xml_special_chars( item.children_map['title'][1].children[1] )
48 if item.children_map['media:thumbnail'] then
49 arturl = vlc.strings.resolve_xml_special_chars( item.children_map['media:thumbnail'][1].attributes['url'] )
51 table.insert( tracks, { path = url,
54 options = {':play-and-pause'} } )