function fetch_art()
local meta = vlc.item:metas()
+ if meta["Listing Type"] == "radio"
+ or meta["Listing Type"] == "tv"
+ then return nil end
+
if meta["artist"] and meta["album"] then
query = "artist:\"" .. meta["artist"] .. "\" AND release:\"" .. meta["album"] .. "\""
relquery = "http://mb.videolan.org/ws/2/release/?query=" .. vlc.strings.encode_uri_component( query )
local meta = vlc.item:metas()
--- IceCast Entries
- if meta["Listing Source"] == "dir.xiph.org"
+-- Radio Entries
+ if meta["Listing Type"] == "radio"
then
title = meta["title"] .. " radio logo"
+-- TV Entries
+ elseif meta["Listing Type"] == "tv"
+ then
+ title = meta["title"] .. " tv logo"
-- Album entries
elseif meta["artist"] and meta["album"] then
title = meta["artist"].." "..meta["album"].." cover"
function fetch_art()
if vlc.item == nil then return nil end
local meta = vlc.item:metas()
+
+ if meta["Listing Type"] == "radio"
+ or meta["Listing Type"] == "tv"
+ then return nil end
+
if meta["artist"] and meta["album"] then
title = meta["artist"].."/"..meta["album"]
else
_, _, option = string.find( line, ":(.+)" )
table.insert( options, option )
else
- vlc.sd.add_item( {path=line,duration=duration,artist=artist,title=name,arturl=arturl,options=options} )
+ vlc.sd.add_item({ path = line,
+ duration = duration,
+ artist = artist,
+ title = name,
+ arturl = arturl,
+ meta = {["Listing Type"]="tv"},
+ options = options })
duration = nil
artist = nil
name = nil
.. station.children_map["listen_url"][1].children[1],
meta={
["Listing Source"]="dir.xiph.org",
+ ["Listing Type"]="radio",
["Icecast Bitrate"]=station.children_map["bitrate"][1].children[1],
["Icecast Server Type"]=station.children_map["server_type"][1].children[1]
}} )