Skip to content

Commit

Permalink
Merge pull request #2133 from glensc/rating-0
Browse files Browse the repository at this point in the history
Fix: Treat rating=0 as no rating
  • Loading branch information
glensc authored Jan 2, 2025
2 parents a3a35e1 + da54670 commit 680c058
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plextraktsync/util/Rating.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ def create(cls, rating: int | float | None, rated_at: datetime | str | None):
return None

rating = int(rating)

# Treat rating=0 as no rating
# https://github.com/Taxel/PlexTraktSync/issues/2122
if rating == 0:
return None

if isinstance(rated_at, str):
try:
rated_at = datetime.fromisoformat(rated_at)
Expand Down

0 comments on commit 680c058

Please sign in to comment.