def update_title(m) = # The metadata lets remove some of the funny characters title = url.decode(m["title"]) artist = url.decode(m['artist']) album=url.decode(m['album']) station_name = url.decode(m['station_name']) #Just a print statement to test whats is showing as metadata #print(string.replace(pattern="-",(fun (s) -> " "),"#{title}")) #print(string.replace(pattern="-",(fun (s) -> " "),"#{artist}")) # so lets remove that funny and annoying - charater title = string.replace(pattern="-",(fun (s) -> " "),"#{title}") artist = string.replace(pattern="-",(fun (s) -> " "),"#{artist}") # If title is empty if title == "" then [("title","#{station_name} #{album} You Station For Variety"),("artist"," #{artist} Now Playing")] elsif # is the artist is empty artist == "" then [("title"," #{title}#{album} Currently On Air"),("artist","#{station_name} Playing")] else [("artist"," #{artist} "),("title"," #{title}")] end end s = map_metadata(update_title,s)