Skip to content

Commit

Permalink
Use section pager method
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Jan 15, 2024
1 parent c82e11a commit 8e3e691
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions plextraktsync/plan/Walker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 8e3e691

Please sign in to comment.