diff --git a/conreq/core/arrs/base.py b/conreq/core/arrs/base.py index 103e18a9..91020308 100644 --- a/conreq/core/arrs/base.py +++ b/conreq/core/arrs/base.py @@ -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") @@ -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 diff --git a/conreq/core/more_info/views.py b/conreq/core/more_info/views.py index 773d7234..5d523b60 100644 --- a/conreq/core/more_info/views.py +++ b/conreq/core/more_info/views.py @@ -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(