Commit e0a19b96 authored by Pierre Ynard's avatar Pierre Ynard

metachannels: don't crash if image tag is missing

Fixes #6008
parent 936199ff
...@@ -59,9 +59,14 @@ function main() ...@@ -59,9 +59,14 @@ function main()
if( item.name == 'item' ) then if( item.name == 'item' ) then
simplexml.add_name_maps( item ) simplexml.add_name_maps( item )
local url = string.gsub( item.children_map['link'][1].children[1], '&', '&' ) local url = string.gsub( item.children_map['link'][1].children[1], '&', '&' )
local title = item.children_map['title'][1].children[1]
local arturl = nil
if item.children_map['image'] ~= nil then
arturl = item.children_map['image'][1].children_map['url'][1].children[1]
end
local node = vlc.sd.add_item( { path = url, local node = vlc.sd.add_item( { path = url,
title = item.children_map['title'][1].children[1], title = title,
arturl = item.children_map['image'][1].children_map['url'][1].children[1] } ) arturl = arturl } )
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment