From 935d873db81b80dcab9da6147942056fb4760180 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sat, 28 Dec 2024 22:13:28 +0200 Subject: [PATCH] Add rating.title property --- plextraktsync/util/Rating.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plextraktsync/util/Rating.py b/plextraktsync/util/Rating.py index 6dc168838b..6ddb27f74f 100644 --- a/plextraktsync/util/Rating.py +++ b/plextraktsync/util/Rating.py @@ -33,6 +33,10 @@ def __eq__(self, other): return self.rating == other.rating + @property + def title(self): + return self.RATING_TITLES[self.rating] + def __str__(self): rated_at = f"'{timestamp(self.rated_at)}'" if self.rated_at else None return f"Rating(rating={self.rating}, rated_at={rated_at})"