Commit 9dd9ba63 authored by Pierre Ynard's avatar Pierre Ynard

metachannels: fix search function too

parent e0a19b96
...@@ -38,13 +38,15 @@ function search( string ) ...@@ -38,13 +38,15 @@ function search( string )
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 arturl = item.children_map['media:thumbnail'][1].attributes['url'] local title = item.children_map['title'][1].children[1]
if( arturl == '/images/thumb_channel_default.jpg' ) then local arturl = nil
arturl = 'http://www.metachannels.com/images/thumb_channel_default.jpg' if item.children_map['media:thumbnail'] ~= nil then
arturl = item.children_map['media:thumbnail'][1].attributes['url']
if( arturl == '/images/thumb_channel_default.jpg' ) then
arturl = 'http://www.metachannels.com/images/thumb_channel_default.jpg'
end
end end
node:add_subitem( { path = url, node:add_subitem( { path = url, title = title, arturl = arturl } )
title = item.children_map['title'][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