Neuer Output inkl. Alternativtitel bei myanimelist.lua
This commit is contained in:
parent
baeeec616b
commit
0d6459c084
@ -36,10 +36,16 @@ local function send_anime_data(result, receiver)
|
||||
local id = xml.find(result, 'id')[1]
|
||||
local mal_url = 'http://myanimelist.net/anime/'..id
|
||||
|
||||
if xml.find(result, 'synopsis')[1] then
|
||||
desc = '\n'..unescape(delete_tags(string.sub(xml.find(result, 'synopsis')[1], 1, 200))) .. '...'
|
||||
if xml.find(result, 'type')[1] then
|
||||
typ = ' ('..xml.find(result, 'type')[1]..')'
|
||||
else
|
||||
desc = ''
|
||||
typ = ''
|
||||
end
|
||||
|
||||
if xml.find(result, 'synonyms')[1] then
|
||||
syno = '\nAlternativ: '..unescape(delete_tags(string.sub(xml.find(result, 'synonyms')[1], 1, 200)))
|
||||
else
|
||||
syno = ''
|
||||
end
|
||||
|
||||
if xml.find(result, 'episodes')[1] then
|
||||
@ -59,26 +65,26 @@ local function send_anime_data(result, receiver)
|
||||
else
|
||||
score = ''
|
||||
end
|
||||
|
||||
if xml.find(result, 'type')[1] then
|
||||
typ = '\nTyp: '..xml.find(result, 'type')[1]
|
||||
else
|
||||
typ = ''
|
||||
end
|
||||
|
||||
if xml.find(result, 'start_date')[1] ~= "0000-00-00" then
|
||||
startdate = '\nStart: '..makeOurDate(xml.find(result, 'start_date')[1])
|
||||
startdate = '\nAusstrahlung: '..makeOurDate(xml.find(result, 'start_date')[1])
|
||||
else
|
||||
startdate = ''
|
||||
end
|
||||
|
||||
if xml.find(result, 'end_date')[1] ~= "0000-00-00" then
|
||||
enddate = '\nEnde: '..makeOurDate(xml.find(result, 'end_date')[1])
|
||||
enddate = ' - '..makeOurDate(xml.find(result, 'end_date')[1])
|
||||
else
|
||||
enddate = ''
|
||||
end
|
||||
|
||||
if xml.find(result, 'synopsis')[1] then
|
||||
desc = '\n'..unescape(delete_tags(string.sub(xml.find(result, 'synopsis')[1], 1, 200))) .. '...'
|
||||
else
|
||||
desc = ''
|
||||
end
|
||||
|
||||
local text = title..desc..episodes..status..score..typ..startdate..enddate..'\n'..mal_url
|
||||
local text = title..typ..syno..episodes..status..score..startdate..enddate..'\n'..desc..'\n'..mal_url
|
||||
if xml.find(result, 'image') then
|
||||
local image_url = xml.find(result, 'image')[1]
|
||||
local cb_extra = {
|
||||
|
Reference in New Issue
Block a user