[vlc-commits] lua: icecast: can fix radionomy's station names

Francois Cartegnie git at videolan.org
Tue May 22 17:52:01 CEST 2012


vlc/vlc-2.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue May  8 15:09:37 2012 +0200| [7af7638bfe9593a38a8195392760c694137e76fa] | committer: Jean-Baptiste Kempf

lua: icecast: can fix radionomy's station names
(cherry picked from commit c483441208358fe98b1edbde033b7a958767f8ff)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=7af7638bfe9593a38a8195392760c694137e76fa
---

 share/lua/sd/icecast.lua |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/share/lua/sd/icecast.lua b/share/lua/sd/icecast.lua
index 253988f..c01e591 100644
--- a/share/lua/sd/icecast.lua
+++ b/share/lua/sd/icecast.lua
@@ -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,



More information about the vlc-commits mailing list