Catch TraktException in rate limit to retry after 1s
MODIFY
plex_trakt_sync/decorators/rate_limit.py
plex_trakt_sync/decorators/rate_limit.py
from time import sleep, time
from requests.exceptions import ConnectionError
-from trakt.errors import RateLimitException
+from trakt.errors import RateLimitException, TraktInternalException
from plex_trakt_sync.logging import logger
last_time = None
@@ -41,7 +41,7 @@ def wrapper(*args, **kwargs):
try:
respect_trakt_rate()
return fn(*args, **kwargs)
- except (RateLimitException, ConnectionError) as e:
+ except (RateLimitException, ConnectionError, TraktInternalException) as e:
if retry == retries:
raise e

Catch TraktException in rate limit to retry after 1s