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
c568ac6e
Commit
c568ac6e
authored
Sep 25, 2009
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rockbox FM radio presets parser script
See
http://www.rockbox.org/wiki/FmPresets
parent
aa40732b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
share/lua/playlist/rockbox_fm_presets.lua
share/lua/playlist/rockbox_fm_presets.lua
+27
-0
No files found.
share/lua/playlist/rockbox_fm_presets.lua
0 → 100644
View file @
c568ac6e
-- Parser script from Rockbox FM radio presets
-- See http://www.rockbox.org/wiki/FmPresets
function
probe
()
if
not
string.match
(
vlc
.
path
,
".fmr$"
)
then
return
false
end
local
line
=
vlc
.
peek
(
256
)
vlc
.
msg
.
err
(
line
)
local
freq
=
tonumber
(
string.match
(
line
,
"(%d*):"
))
if
not
freq
then
return
false
end
return
freq
>
80000000
and
freq
<
110000000
end
function
parse
()
vlc
.
msg
.
err
(
"test"
)
local
p
=
{}
while
true
do
line
=
vlc
.
readline
()
if
not
line
then
break
end
vlc
.
msg
.
err
(
line
)
for
freq
,
name
in
string.gmatch
(
line
,
"(%d*):(.*)"
)
do
vlc
.
msg
.
info
(
freq
)
table.insert
(
p
,
{
path
=
"v4l2c:///dev/radio0:tuner-frequency="
..
freq
,
name
=
name
}
)
end
end
vlc
.
msg
.
err
(
"test test"
)
return
p
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