From 71f5d020390f889a2f7ad078b625f9921e0f3fec Mon Sep 17 00:00:00 2001 From: blank X Date: Sun, 25 Oct 2020 15:20:46 +0700 Subject: [PATCH] Don't show episode and 'per episode' for movies --- sukuinote/slave-plugins/anilist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sukuinote/slave-plugins/anilist.py b/sukuinote/slave-plugins/anilist.py index 6e8de43..f4523df 100644 --- a/sukuinote/slave-plugins/anilist.py +++ b/sukuinote/slave-plugins/anilist.py @@ -112,13 +112,13 @@ async def generate_media(anilist): text += f'Airing At: {airing_at}\nAiring In: {time_until_airing}\n' if average_score is not None: text += f'Average Score: {average_score}%\n' - if episodes or next_airing_episode: + if (episodes is not None or next_airing_episode) and anilist['format'] != 'MOVIE': text += f'Episodes: ' if next_airing_episode: text += f'{next_airing_episode["episode"] - 1}/' text += f'{"???" if episodes is None else episodes}\n' if duration: - text += f'Duration: {duration} minutes per episode\n' + text += f'Duration: {duration} minutes{" per episode" if aniist["format"] != "MOVIE" else ""}\n' if chapters: text += f'Chapters: {chapters}\n' if volumes: