Handle anilist['status'] being null

This commit is contained in:
blank X 2020-11-15 22:58:10 +07:00
parent f80af447a2
commit a590c6c7ee
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ async def generate_media(anilist):
type = anilist['type'].capitalize() type = anilist['type'].capitalize()
format = anilist['format'] format = anilist['format']
format = FORMAT_NAMES.get(format, format) format = FORMAT_NAMES.get(format, format)
status = anilist['status'].replace('_', ' ').title() status = (anilist['status'] or 'Unknown').replace('_', ' ').title()
description = (anilist.get('description') or '').strip() description = (anilist.get('description') or '').strip()
episodes = anilist['episodes'] episodes = anilist['episodes']
duration = anilist['duration'] duration = anilist['duration']