Skip to content

Commit

Permalink
Add rating.title property
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Dec 28, 2024
1 parent 24bac5d commit 935d873
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plextraktsync/util/Rating.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})"
Expand Down

0 comments on commit 935d873

Please sign in to comment.