Commit 80790ed6 authored by Pierre Ynard's avatar Pierre Ynard

metachannels: fix search function too

(cherry picked from commit 9dd9ba63)
Signed-off-by: default avatarPierre Ynard <linkfanel@yahoo.fr>
parent 637c9b52
......@@ -38,13 +38,15 @@ function search( string )
if( item.name == 'item' ) then
simplexml.add_name_maps( item )
local url = string.gsub( item.children_map['link'][1].children[1], '&amp;', '&' )
local 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'
local title = item.children_map['title'][1].children[1]
local arturl = nil
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
node:add_subitem( { path = url,
title = item.children_map['title'][1].children[1],
arturl = arturl } )
node:add_subitem( { path = url, title = title, arturl = arturl } )
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