Ignoriere 00 Tage/Monate in MyAnimeList
This commit is contained in:
parent
47590c6cdc
commit
0e2991b9ea
@ -21,8 +21,14 @@ end
|
|||||||
local makeOurDate = function(dateString)
|
local makeOurDate = function(dateString)
|
||||||
local pattern = "(%d+)%-(%d+)%-(%d+)"
|
local pattern = "(%d+)%-(%d+)%-(%d+)"
|
||||||
local year, month, day = dateString:match(pattern)
|
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
|
return day..'.'..month..'.'..year
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local function get_anime_info(anime)
|
local function get_anime_info(anime)
|
||||||
local url = BASE_URL..'/search.xml?q='..anime
|
local url = BASE_URL..'/search.xml?q='..anime
|
||||||
@ -50,7 +56,7 @@ local function send_anime_data(result, receiver)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if xml.find(result, 'english')[1] then
|
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
|
else
|
||||||
eng = ''
|
eng = ''
|
||||||
end
|
end
|
||||||
|
@ -21,8 +21,14 @@ end
|
|||||||
local makeOurDate = function(dateString)
|
local makeOurDate = function(dateString)
|
||||||
local pattern = "(%d+)%-(%d+)%-(%d+)"
|
local pattern = "(%d+)%-(%d+)%-(%d+)"
|
||||||
local year, month, day = dateString:match(pattern)
|
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
|
return day..'.'..month..'.'..year
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local function get_manga_info(manga)
|
local function get_manga_info(manga)
|
||||||
local url = BASE_URL..'/search.xml?q='..manga
|
local url = BASE_URL..'/search.xml?q='..manga
|
||||||
|
Reference in New Issue
Block a user