Skip to content

Commit

Permalink
Fix season availability tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
Archmonger committed Jun 30, 2024
1 parent 2515313 commit dbf0b93
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions conreq/core/arrs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def _set_content_attributes(content_type, content_source, results):
@staticmethod
def _check_availability(content: dict):
"""Checks the availability of one item. For use within check_availability()"""
statistics: dict = content.get("statistics", {})
statistics: dict = content.get("statistics") or content or {}
percent_available: int | None = statistics.get("percentOfEpisodes")
grabbed: bool | None = statistics.get("grabbed")

Expand All @@ -45,7 +45,7 @@ def _check_availability(content: dict):
content["availability"] = "Partial"
return content
# Radarr: Check if a movie is being downloaded.
if grabbed is True and statistics and statistics.get("movieFileCount") == 0:
if grabbed is True and statistics.get("movieFileCount") == 0:
content["availability"] = "Partial"
return content

Expand Down
1 change: 0 additions & 1 deletion conreq/core/more_info/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ def series_modal(request):

# If it doesn't already exists, add then add it
if requested_show is None:

sonarr_params = obtain_sonarr_parameters(tmdb_id, tvdb_id)

requested_show = sonarr_manager.add(
Expand Down

0 comments on commit dbf0b93

Please sign in to comment.