Skip to content

Commit dbf0b93

Browse files
committed
Fix season availability tracking
1 parent 2515313 commit dbf0b93

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

conreq/core/arrs/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def _set_content_attributes(content_type, content_source, results):
2525
@staticmethod
2626
def _check_availability(content: dict):
2727
"""Checks the availability of one item. For use within check_availability()"""
28-
statistics: dict = content.get("statistics", {})
28+
statistics: dict = content.get("statistics") or content or {}
2929
percent_available: int | None = statistics.get("percentOfEpisodes")
3030
grabbed: bool | None = statistics.get("grabbed")
3131

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

conreq/core/more_info/views.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ def series_modal(request):
139139

140140
# If it doesn't already exists, add then add it
141141
if requested_show is None:
142-
143142
sonarr_params = obtain_sonarr_parameters(tmdb_id, tvdb_id)
144143

145144
requested_show = sonarr_manager.add(

0 commit comments

Comments
 (0)