From da5467093c81b8855844051f31c1a454fe480649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Thu, 2 Jan 2025 03:27:48 +0200 Subject: [PATCH] Fix: Treat rating=0 as no rating --- plextraktsync/util/Rating.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plextraktsync/util/Rating.py b/plextraktsync/util/Rating.py index d88dcc2256..42f27d2bba 100644 --- a/plextraktsync/util/Rating.py +++ b/plextraktsync/util/Rating.py @@ -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)