Skip to content

Commit

Permalink
only check if item has streams to be scraped state
Browse files Browse the repository at this point in the history
  • Loading branch information
omnunum committed Feb 25, 2024
1 parent 710b75e commit 520e0a8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion backend/program/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def run(self):
logger.debug("%s is already complete and in the Library, skipping.", item.title)
continue
# we attemted to scrape it already and it failed, scraping each component
if item.scraped_times:
if item.scraped_times and isinstance(item, (Show, Season)):
if isinstance(item, Show):
items_to_submit = [s for s in item.seasons if s.state != States.Completed]
elif isinstance(item, Season):
Expand Down
1 change: 1 addition & 0 deletions backend/program/libaries/symlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

class SymlinkLibrary:
def __init__(self):
self.key = "symlinklibrary"
self.last_fetch_times = {}
self.settings = settings_manager.settings.symlink
self.initialized = True
Expand Down
7 changes: 2 additions & 5 deletions backend/program/media/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,8 @@ def _determine_state(self):
return States.Symlinked
elif self.file and self.folder:
return States.Downloaded
elif self.is_scraped() and self.is_checked_for_availability():
if any(stream.get('cached') for stream in self.streams.values()):
return States.Scraped
else:
return States.Requested
elif self.is_scraped():
return States.Scraped
elif self.title:
return States.Indexed
elif self.imdb_id and self.requested_by:
Expand Down

0 comments on commit 520e0a8

Please sign in to comment.