]> git.sesse.net Git - vlc/commitdiff
lua: icecast: can fix radionomy's station names
authorFrancois Cartegnie <fcvlcdev@free.fr>
Tue, 8 May 2012 13:09:37 +0000 (15:09 +0200)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Tue, 8 May 2012 13:09:59 +0000 (15:09 +0200)
share/lua/sd/icecast.lua

index 253988f8cd65391455fb28cd6289a8013b1686f4..c01e591c409602310b77b2a4895542411e31d2e1 100644 (file)
@@ -33,6 +33,11 @@ function main()
        if station_name == "Unspecified name" or station_name == ""
        then
                station_name = station.children_map["listen_url"][1].children[1]
+               if string.find( station_name, "radionomy.com" )
+               then
+                       station_name = string.match( station_name, "([^/]+)$")
+                       station_name = string.gsub( station_name, "-", "\ " )
+               end
        end
         vlc.sd.add_item( {path=station.children_map["listen_url"][1].children[1],
                           title=station_name,