diff --git a/libs/subliminal_patch/subtitle.py b/libs/subliminal_patch/subtitle.py index a7140e958..9c8094b86 100644 --- a/libs/subliminal_patch/subtitle.py +++ b/libs/subliminal_patch/subtitle.py @@ -76,8 +76,8 @@ class Subtitle(Subtitle_): self.use_original_format = original_format def __repr__(self): - return '<%s %r [%s:%s]>' % ( - self.__class__.__name__, self.page_link, self.language, self._guessed_encoding) + r_info = str(self.release_info or self.id).replace("\n", " | ").strip() + return f"<{self.__class__.__name__}: {r_info} [{self.language}]>" @property def text(self): diff --git a/libs/subzero/language.py b/libs/subzero/language.py index 199856704..c7f3c3a2d 100644 --- a/libs/subzero/language.py +++ b/libs/subzero/language.py @@ -112,7 +112,8 @@ class Language(Language_): bool(self.hi) == bool(other.hi)) def __str__(self): - return super(Language, self).__str__() + (":forced" if self.forced else "") + info = ";".join(f"{k}={v}" for k, v in vars(self).items() if v) + return f"<{self.__class__.__name__}: {info}>" @property def basename(self):