Skip to content

Commit

Permalink
Merge pull request #2129 from glensc/some-retries
Browse files Browse the repository at this point in the history
Fix: Add retry to some methods
  • Loading branch information
glensc authored Jan 1, 2025
2 parents f3a6f38 + 0038527 commit 4a1925c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plextraktsync/plex/PlexLibrarySection.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from plexapi.exceptions import NotFound

from plextraktsync.decorators.retry import retry
from plextraktsync.rich.RichMarkup import RichMarkup

if TYPE_CHECKING:
Expand Down Expand Up @@ -50,6 +51,7 @@ def find_by_title(self, name: str):
except NotFound:
return None

@retry
def search(self, **kwargs):
return self.section.search(**kwargs)

Expand Down
1 change: 1 addition & 0 deletions plextraktsync/plex/PlexSectionPager.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def __len__(self):
return self.total_size

@cached_property
@retry
def total_size(self):
return self.section.totalViewSize(libtype=self.libtype, includeCollections=False)

Expand Down

0 comments on commit 4a1925c

Please sign in to comment.