From 8e3e6914b72e7335bf97b80958e99c4ab9318018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 14 Jan 2024 22:47:41 +0200 Subject: [PATCH] Use section pager method --- plextraktsync/plan/Walker.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/plextraktsync/plan/Walker.py b/plextraktsync/plan/Walker.py index dc2f44fb54a..84aa5d7b7ae 100644 --- a/plextraktsync/plan/Walker.py +++ b/plextraktsync/plan/Walker.py @@ -146,10 +146,8 @@ def media_from_sections(self, sections: list[PlexLibrarySection]) -> Generator[P for section in sections: with measure_time(f"{section.title_link} processed", extra={"markup": True}): self.set_window_title(f"Processing {section.title}") - total = len(section) it = self.progressbar( - section.items(total), - total=total, + section.pager(), desc=f"Processing {section.title_link}", ) yield from it @@ -158,10 +156,8 @@ def episodes_from_sections(self, sections: list[PlexLibrarySection]) -> Generato for section in sections: with measure_time(f"{section.title_link} processed", extra={"markup": True}): self.set_window_title(f"Processing {section.title}") - items = section.search_episodes() it = self.progressbar( - items, - total=len(items), + section.pager("episode"), desc=f"Processing {section.title_link}", ) yield from it