score fix und unescape für myanimelist.lua

This commit is contained in:
Akamaru 2015-11-12 19:17:17 +01:00
parent 68305dc953
commit baeeec616b

View File

@ -37,7 +37,7 @@ local function send_anime_data(result, receiver)
local mal_url = 'http://myanimelist.net/anime/'..id
if xml.find(result, 'synopsis')[1] then
desc = '\n'..delete_tags(string.sub(xml.find(result, 'synopsis')[1], 1, 200)) .. '...'
desc = '\n'..unescape(delete_tags(string.sub(xml.find(result, 'synopsis')[1], 1, 200))) .. '...'
else
desc = ''
end
@ -54,11 +54,11 @@ local function send_anime_data(result, receiver)
status = ''
end
--[[if xml.find(result, 'score')[1] ~= "0.00" then
score = '\nScore: '..string.gsub(xml.find(result, 'score')[1], "%.", "%,")
if xml.find(result, 'score')[1] ~= "0.00" then
score = '\nScore: '..xml.find(result, 'score')[1]
else
score = ''
end]]
end
if xml.find(result, 'type')[1] then
typ = '\nTyp: '..xml.find(result, 'type')[1]
@ -78,8 +78,7 @@ local function send_anime_data(result, receiver)
enddate = ''
end
--local text = title..desc..episodes..status..score..typ..startdate..enddate..'\n— '..mal_url
local text = title..desc..episodes..status..typ..startdate..enddate..'\n'..mal_url
local text = title..desc..episodes..status..score..typ..startdate..enddate..'\n'..mal_url
if xml.find(result, 'image') then
local image_url = xml.find(result, 'image')[1]
local cb_extra = {