|
|
@ -21,9 +21,16 @@ def update_series():
|
|
|
|
|
|
|
|
|
|
|
|
sonarr_version = get_sonarr_version()
|
|
|
|
sonarr_version = get_sonarr_version()
|
|
|
|
serie_default_enabled = settings.general.getboolean('serie_default_enabled')
|
|
|
|
serie_default_enabled = settings.general.getboolean('serie_default_enabled')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if serie_default_enabled is True:
|
|
|
|
serie_default_language = settings.general.serie_default_language
|
|
|
|
serie_default_language = settings.general.serie_default_language
|
|
|
|
serie_default_hi = settings.general.serie_default_hi
|
|
|
|
serie_default_hi = settings.general.serie_default_hi
|
|
|
|
serie_default_forced = settings.general.serie_default_forced
|
|
|
|
serie_default_forced = settings.general.serie_default_forced
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
serie_default_language = '[]'
|
|
|
|
|
|
|
|
serie_default_hi = 'Flase'
|
|
|
|
|
|
|
|
serie_default_forced = 'False'
|
|
|
|
|
|
|
|
|
|
|
|
audio_profiles = get_profile_list()
|
|
|
|
audio_profiles = get_profile_list()
|
|
|
|
|
|
|
|
|
|
|
|
# Get shows data from Sonarr
|
|
|
|
# Get shows data from Sonarr
|
|
|
@ -93,7 +100,6 @@ def update_series():
|
|
|
|
'year': str(show['year']),
|
|
|
|
'year': str(show['year']),
|
|
|
|
'alternateTitles': alternate_titles})
|
|
|
|
'alternateTitles': alternate_titles})
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
if serie_default_enabled is True:
|
|
|
|
|
|
|
|
series_to_add.append({'title': show["title"],
|
|
|
|
series_to_add.append({'title': show["title"],
|
|
|
|
'path': show["path"],
|
|
|
|
'path': show["path"],
|
|
|
|
'tvdbId': show["tvdbId"],
|
|
|
|
'tvdbId': show["tvdbId"],
|
|
|
@ -108,18 +114,6 @@ def update_series():
|
|
|
|
'year': str(show['year']),
|
|
|
|
'year': str(show['year']),
|
|
|
|
'alternateTitles': alternate_titles,
|
|
|
|
'alternateTitles': alternate_titles,
|
|
|
|
'forced': serie_default_forced})
|
|
|
|
'forced': serie_default_forced})
|
|
|
|
else:
|
|
|
|
|
|
|
|
series_to_add.append({'title': show["title"],
|
|
|
|
|
|
|
|
'path': show["path"],
|
|
|
|
|
|
|
|
'tvdbId': show["tvdbId"],
|
|
|
|
|
|
|
|
'sonarrSeriesId': show["id"],
|
|
|
|
|
|
|
|
'overview': overview,
|
|
|
|
|
|
|
|
'poster': poster,
|
|
|
|
|
|
|
|
'fanart': fanart,
|
|
|
|
|
|
|
|
'audio_language': audio_language,
|
|
|
|
|
|
|
|
'sortTitle': show['sortTitle'],
|
|
|
|
|
|
|
|
'year': str(show['year']),
|
|
|
|
|
|
|
|
'alternateTitles': alternate_titles})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Remove old series from DB
|
|
|
|
# Remove old series from DB
|
|
|
|
removed_series = list(set(current_shows_db_list) - set(current_shows_sonarr))
|
|
|
|
removed_series = list(set(current_shows_db_list) - set(current_shows_sonarr))
|
|
|
|