4 Copyright © 2010 VideoLAN and AUTHORS
6 Authors: Fabio Ritrovato <sephiroth87 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.
24 return { title="Freebox TV" }
28 local fd = vlc.stream( "http://mafreebox.freebox.fr/freeboxtv/playlist.m3u" )
29 local line= fd:readline()
30 if line ~= "#EXTM3U" then
33 local loading = vlc.sd.add_item( {path="vlc://nop",title="Loading..."} )
35 local duration, artist, name
36 local options={"deinterlace=1"}
38 if( string.find( line, "#EXTINF" ) ) then
39 _, _, duration, artist, name = string.find( line, ":(%w+),(%w+)%s*-%s*(.+)" )
40 elseif( string.find( line, "#EXTVLCOPT" ) ) then
41 _, _, option = string.find( line, ":(.+)" )
42 table.insert( options, option )
44 vlc.sd.add_item( {path=line,duration=duration,artist=artist,title=name,options=options} )
48 options={"deinterlace=1"}
52 vlc.sd.remove_item( loading )