Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
a97b78c2
Commit
a97b78c2
authored
Feb 15, 2010
by
Fabio Ritrovato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lua SD: freebox now should work correctly
parent
ffa6a2fa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
share/lua/sd/freebox.lua
share/lua/sd/freebox.lua
+24
-1
No files found.
share/lua/sd/freebox.lua
View file @
a97b78c2
...
@@ -22,5 +22,28 @@
...
@@ -22,5 +22,28 @@
--]]
--]]
function
main
()
function
main
()
vlc
.
sd
.
add_item
(
{
url
=
"http://mafreebox.freebox.fr/freeboxtv/playlist.m3u"
,
options
=
{
"deinterlace=1"
}}
)
local
fd
=
vlc
.
stream
(
"http://mafreebox.freebox.fr/freeboxtv/playlist.m3u"
)
local
line
=
fd
:
readline
()
if
line
~=
"#EXTM3U"
then
return
nil
end
line
=
fd
:
readline
()
local
duration
,
artist
,
name
local
options
=
{
"deinterlace=1"
}
while
line
~=
nil
do
if
(
string.find
(
line
,
"#EXTINF"
)
)
then
_
,
_
,
duration
,
artist
,
name
=
string.find
(
line
,
":(%w+),(%w+)%s*-%s*(.+)"
)
--TODO: fix the name not showing special characters correctly
elseif
(
string.find
(
line
,
"#EXTVLCOPT"
)
)
then
_
,
_
,
option
=
string.find
(
line
,
":(.+)"
)
table.insert
(
options
,
option
)
else
vlc
.
sd
.
add_item
(
{
url
=
line
,
duration
=
duration
,
artist
=
artist
,
title
=
name
,
options
=
options
}
)
duration
=
nil
artist
=
nil
name
=
nil
options
=
{
"deinterlace=1"
}
end
line
=
fd
:
readline
()
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment