Ignoriere 00 Tage/Monate in MyAnimeList

This commit is contained in:
Akamaru 2015-12-19 15:19:26 +01:00
parent 47590c6cdc
commit 0e2991b9ea
2 changed files with 13 additions and 1 deletions

View File

@ -21,8 +21,14 @@ end
local makeOurDate = function(dateString)
local pattern = "(%d+)%-(%d+)%-(%d+)"
local year, month, day = dateString:match(pattern)
if day == "00" then
return month..'.'..year
elseif month == "00" then
return year
else
return day..'.'..month..'.'..year
end
end
local function get_anime_info(anime)
local url = BASE_URL..'/search.xml?q='..anime
@ -50,7 +56,7 @@ local function send_anime_data(result, receiver)
end
if xml.find(result, 'english')[1] then
eng = '; '..unescape(delete_tags(xml.find(result, 'english')[1]))
eng = '\nEnglisch: '..unescape(delete_tags(xml.find(result, 'english')[1]))
else
eng = ''
end

View File

@ -21,8 +21,14 @@ end
local makeOurDate = function(dateString)
local pattern = "(%d+)%-(%d+)%-(%d+)"
local year, month, day = dateString:match(pattern)
if day == "00" then
return month..'.'..year
elseif month == "00" then
return year
else
return day..'.'..month..'.'..year
end
end
local function get_manga_info(manga)
local url = BASE_URL..'/search.xml?q='..manga