All plex calls rate_limit decorator replaced with retry
MODIFY
plextraktsync/plex_api.py
plextraktsync/plex_api.py
from plextraktsync.decorators.flatten import flatten_dict, flatten_list
from plextraktsync.decorators.memoize import memoize
from plextraktsync.decorators.nocache import nocache
-from plextraktsync.decorators.rate_limit import rate_limit
+from plextraktsync.decorators.retry import retry
from plextraktsync.factory import factory
from plextraktsync.logging import logger
@@ -161,7 +161,7 @@ def is_legacy_agent(self):
return not self.item.guid.startswith("plex://")
@nocache
- @rate_limit()
+ @retry()
def get_guids(self):
return self.item.guids
@@ -198,7 +198,7 @@ def type(self):
@cached_property
@nocache
- @rate_limit(retries=1)
+ @retry(retries=1)
def rating(self):
if self.plex is not None:
ratings = self.plex.ratings[self.item.librarySectionID]
@@ -359,7 +359,7 @@ def episodes(self):
yield PlexLibraryItem(ep, plex=self.plex)
@nocache
- @rate_limit()
+ @retry()
def _get_episodes(self):
return self.item.episodes()
@@ -457,7 +457,7 @@ def all(self, max_items: int):
break
@nocache
- @rate_limit()
+ @retry()
def fetch_items(self, key: str, size: int, start: int):
return self.section.fetchItems(key, container_start=start, container_size=size)
@@ -566,7 +566,7 @@ def ratings(self):
return PlexRatingCollection(self)
@nocache
- @rate_limit()
+ @retry()
def rate(self, m, rating):
m.rate(rating)
@@ -599,7 +599,7 @@ def history(self, m, device=False, account=False):
yield h
@nocache
- @rate_limit()
+ @retry()
def mark_watched(self, m):
m.markWatched()

All plex calls rate_limit decorator replaced with retry