1 -- Parser script from Rockbox FM radio presets
2 -- See http://www.rockbox.org/wiki/FmPresets
5 if not string.match( vlc.path, ".fmr$" ) then return false end
6 local line = vlc.peek(256)
8 local freq = tonumber(string.match( line, "(%d*):" ))
9 if not freq then return false end
10 return freq > 80000000 and freq < 110000000
18 if not line then break end
20 for freq, name in string.gmatch( line, "(%d*):(.*)" ) do
22 table.insert( p, { path = "v4l2c:///dev/radio0:tuner-frequency="..freq, name = name } )
25 vlc.msg.err("test test")