Skip to content

Commit

Permalink
final cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
omnunum committed Feb 12, 2024
1 parent 0feae6d commit d583872
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions backend/program/plex.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,15 @@ def _update_items(self, init=False):
max_workers=max_workers, thread_name_prefix="Plex"
) as executor:
for section in sections:
if section.key in processed_sections or not self._is_wanted_section(
section
):
is_wanted = self._is_wanted_section(section)
if section.key in processed_sections or not is_wanted:
continue
if section.refreshing:
processed_sections.add(section.key)
continue
# Fetch only items that have been added or updated since the last fetch
last_fetch_time = self._get_last_fetch_time(section)
filters = {"addedAt>>": last_fetch_time}
if init:
filters = {}
filters = {} if init else {"addedAt>>": last_fetch_time}
future_items = {
executor.submit(self._create_and_match_item, item)
for item in section.search(libtype=section.type, filters=filters)
Expand Down

0 comments on commit d583872

Please sign in to comment.