From b1de18cf592de36795bdfbfd3f840c0ad5a2a97d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 29 Dec 2024 14:48:58 +0200 Subject: [PATCH 1/2] Add retry to PlexLibrarySection.search --- plextraktsync/plex/PlexLibrarySection.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plextraktsync/plex/PlexLibrarySection.py b/plextraktsync/plex/PlexLibrarySection.py index e7b19397c8..aff7106f13 100644 --- a/plextraktsync/plex/PlexLibrarySection.py +++ b/plextraktsync/plex/PlexLibrarySection.py @@ -4,6 +4,7 @@ from plexapi.exceptions import NotFound +from plextraktsync.decorators.retry import retry from plextraktsync.rich.RichMarkup import RichMarkup if TYPE_CHECKING: @@ -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) From 0038527640cdef49d9107b99ba49b3c0428a4d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 29 Dec 2024 14:49:11 +0200 Subject: [PATCH 2/2] Add retry to PlexSectionPager.total_size --- plextraktsync/plex/PlexSectionPager.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plextraktsync/plex/PlexSectionPager.py b/plextraktsync/plex/PlexSectionPager.py index 643cbcbcc2..67f63bd34a 100644 --- a/plextraktsync/plex/PlexSectionPager.py +++ b/plextraktsync/plex/PlexSectionPager.py @@ -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)