Skip to content

Commit

Permalink
Add types for plex_shows, show_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Apr 30, 2024
1 parent 9574d78 commit 3126ce1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plextraktsync/plan/Walker.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ def find_episodes(self):
yield from self.get_plex_episodes(self.plan.episodes)

# Preload plex shows
plex_shows = {}
plex_shows: dict[int, PlexLibraryItem] = {}

self.logger.info("Preload shows data")
for show in self.get_plex_shows():
plex_shows[show.key] = show
self.logger.info(f"Preloaded shows data ({len(plex_shows)} shows)")

show_cache = {}
show_cache: dict[int, Media] = {}
for ep in self.episodes_from_sections(self.plan.show_sections):
show_id = ep.show_id
ep.show = plex_shows[show_id]
Expand Down

0 comments on commit 3126ce1

Please sign in to comment.