From 0413dbaa4cf632df0f560f5df2cd67851c3eee02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20Lofj=C3=A4rd?= Date: Mon, 30 Dec 2024 16:43:57 +0100 Subject: [PATCH] Improved languages profile health check to include default assigned profiles --- bazarr/utilities/health.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bazarr/utilities/health.py b/bazarr/utilities/health.py index 84a313cf0..ae32d3a0a 100644 --- a/bazarr/utilities/health.py +++ b/bazarr/utilities/health.py @@ -75,11 +75,13 @@ def get_health_issues(): .where(TableShows.profileId.is_not(None))).scalar() movies_with_profile = database.execute(select(func.count(TableMovies.radarrId)) .where(TableMovies.profileId.is_not(None))).scalar() + default_series_profile_empty = settings.general.serie_default_enabled and settings.general.serie_default_profile == '' + default_movies_profile_empty = settings.general.movie_default_enabled and settings.general.movie_default_profile == '' if languages_profiles_count == 0: health_issues.append({'object': 'Missing languages profile', 'issue': 'You must create at least one languages profile and assign it to your content.'}) - elif languages_profiles_count > 0 and ((settings.general.use_sonarr and series_with_profile == 0) or - (settings.general.use_radarr and movies_with_profile == 0)): + elif languages_profiles_count > 0 and ((settings.general.use_sonarr and series_with_profile == 0 and default_series_profile_empty) or + (settings.general.use_radarr and movies_with_profile == 0 and default_movies_profile_empty)): health_issues.append({'object': 'No assigned languages profile', 'issue': 'Although you have created at least one languages profile, you must assign it ' 'to your content.'})