From 8ca91efbc583baabc6add9f3df8f7cf0708376be Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Sun, 14 Apr 2024 03:12:50 +0100 Subject: [PATCH] refactor(Audio): Do not print "?"/"Unknown" values in str() --- devine/core/tracks/audio.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/devine/core/tracks/audio.py b/devine/core/tracks/audio.py index eec995c..19a4765 100644 --- a/devine/core/tracks/audio.py +++ b/devine/core/tracks/audio.py @@ -79,10 +79,13 @@ class Audio(Track): def __str__(self) -> str: return " | ".join(filter(bool, [ "AUD", - f"[{self.codec.value}]", + f"[{self.codec.value}]" if self.codec else None, str(self.language), - str(self.channels or "?") + (f" (JOC {self.joc})" if self.joc else ""), - f"{self.bitrate // 1000 if self.bitrate else '?'} kb/s", + ", ".join(filter(bool, [ + str(self.channels) if self.channels else None, + f"JOC {self.joc}" if self.joc else None, + ])), + f"{self.bitrate // 1000} kb/s" if self.bitrate else None, self.get_track_name(), self.edition ]))