From 3456e24846cd9e9f59b77a387b19f1d4fcbee8ff Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Thu, 2 Mar 2023 16:19:46 +0000 Subject: [PATCH] State full 'Episode' text if there's no episode name --- devine/core/titles/episode.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/devine/core/titles/episode.py b/devine/core/titles/episode.py index 56c75ba..0f9571b 100644 --- a/devine/core/titles/episode.py +++ b/devine/core/titles/episode.py @@ -196,11 +196,13 @@ class Series(SortedKeyList, ABC): ) for episode in self: if episode.season == season: - season_tree.add( - f"[bold]{str(episode.number).zfill(len(str(episodes)))}" + ( - f".[/] [bright_black]{episode.name}" if episode.name else "" + if episode.name: + season_tree.add( + f"[bold]{str(episode.number).zfill(len(str(episodes)))}.[/] " + f"[bright_black]{episode.name}" ) - ) + else: + season_tree.add(f"[bright_black]Episode {str(episode.number).zfill(len(str(episodes)))}") return tree