Don't show episode and 'per episode' for movies

This commit is contained in:
blank X 2020-10-25 15:20:46 +07:00
parent 776639d2a1
commit 71f5d02039
1 changed files with 2 additions and 2 deletions

View File

@ -112,13 +112,13 @@ async def generate_media(anilist):
text += f'<b>Airing At:</b> {airing_at}\n<b>Airing In:</b> {time_until_airing}\n' text += f'<b>Airing At:</b> {airing_at}\n<b>Airing In:</b> {time_until_airing}\n'
if average_score is not None: if average_score is not None:
text += f'<b>Average Score:</b> {average_score}%\n' text += f'<b>Average Score:</b> {average_score}%\n'
if episodes or next_airing_episode: if (episodes is not None or next_airing_episode) and anilist['format'] != 'MOVIE':
text += f'<b>Episodes:</b> ' text += f'<b>Episodes:</b> '
if next_airing_episode: if next_airing_episode:
text += f'{next_airing_episode["episode"] - 1}/' text += f'{next_airing_episode["episode"] - 1}/'
text += f'{"???" if episodes is None else episodes}\n' text += f'{"???" if episodes is None else episodes}\n'
if duration: if duration:
text += f'<b>Duration:</b> {duration} minutes per episode\n' text += f'<b>Duration:</b> {duration} minutes{" per episode" if aniist["format"] != "MOVIE" else ""}\n'
if chapters: if chapters:
text += f'<b>Chapters:</b> {chapters}\n' text += f'<b>Chapters:</b> {chapters}\n'
if volumes: if volumes: