Skip to content

Commit

Permalink
Do not retry conflict errors in scrobble
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Mar 30, 2024
1 parent f23b58b commit 2f8968b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plextraktsync/queue/TraktScrobbleWorker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from typing import TYPE_CHECKING

from trakt.errors import ConflictException

from plextraktsync.decorators.rate_limit import rate_limit
from plextraktsync.decorators.retry import retry
from plextraktsync.decorators.time_limit import time_limit
Expand Down Expand Up @@ -45,7 +47,10 @@ def submit(self, name, items):
@retry()
def scrobble(self, scrobbler: Scrobbler, name: str, progress: float):
method = getattr(scrobbler, name)
return method(progress)
try:
return method(progress)
except ConflictException:
return

@staticmethod
def normalize(items: list[TraktPlayable]):
Expand Down

0 comments on commit 2f8968b

Please sign in to comment.