From baeeec616b4e550b2a2bd46834d2e19069c1ab5e Mon Sep 17 00:00:00 2001 From: Akamaru Date: Thu, 12 Nov 2015 19:17:17 +0100 Subject: [PATCH] =?UTF-8?q?score=20fix=20und=20unescape=20f=C3=BCr=20myani?= =?UTF-8?q?melist.lua?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/myanimelist.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/plugins/myanimelist.lua b/plugins/myanimelist.lua index f97e693..dc29f27 100644 --- a/plugins/myanimelist.lua +++ b/plugins/myanimelist.lua @@ -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 = {