Show Light Novel for Anilist

This commit is contained in:
blank X 2020-11-08 21:43:18 +07:00
parent 54dce31d49
commit 935d2cd8ce
1 changed files with 4 additions and 2 deletions

View File

@ -51,7 +51,6 @@ FORMAT_NAMES = {
"ONA": "ONA",
"MUSIC": "Music",
"MANGA": "Manga",
"NOVEL": "Novel",
"ONE_SHOT": "One Shot"
}
CHARACTER_QUERY = '''query ($id: Int, $search: String) {
@ -75,6 +74,9 @@ async def generate_media(anilist):
title_romaji = anilist['title']['romaji']
title_english = anilist['title']['english']
title_native = anilist['title']['native']
if anilist['format'] == 'NOVEL':
type = 'Light Novel'
else:
type = anilist['type'].capitalize()
format = anilist['format']
format = FORMAT_NAMES.get(format, format)