pull/550/head
Louis Vézina 5 years ago
parent 262ab090d5
commit 7d318117af

@ -17,6 +17,7 @@ from utils import get_sonarr_version
def update_series(): def update_series():
notifications.write(msg="Update series list from Sonarr is running...", queue='get_series') notifications.write(msg="Update series list from Sonarr is running...", queue='get_series')
apikey_sonarr = settings.sonarr.apikey apikey_sonarr = settings.sonarr.apikey
sonarr_version = get_sonarr_version()
serie_default_enabled = settings.general.getboolean('serie_default_enabled') serie_default_enabled = settings.general.getboolean('serie_default_enabled')
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
@ -89,7 +90,7 @@ def update_series():
'overview': unicode(overview), 'overview': unicode(overview),
'poster': unicode(poster), 'poster': unicode(poster),
'fanart': unicode(fanart), 'fanart': unicode(fanart),
'audio_language': unicode(profile_id_to_language((show['qualityProfileId'] if get_sonarr_version().startswith('2') else show['languageProfileId']), audio_profiles)), 'audio_language': unicode(profile_id_to_language((show['qualityProfileId'] if sonarr_version.startswith('2') else show['languageProfileId']), audio_profiles)),
'sort_title': unicode(show['sortTitle']), 'sort_title': unicode(show['sortTitle']),
'year': unicode(show['year']), 'year': unicode(show['year']),
'alternate_titles': unicode(alternateTitles)}) 'alternate_titles': unicode(alternateTitles)})
@ -104,7 +105,7 @@ def update_series():
'overview': overview, 'overview': overview,
'poster': poster, 'poster': poster,
'fanart': fanart, 'fanart': fanart,
'audio_language': profile_id_to_language((show['qualityProfileId'] if get_sonarr_version().startswith('2') else show['languageProfileId']), audio_profiles), 'audio_language': profile_id_to_language((show['qualityProfileId'] if sonarr_version.startswith('2') else show['languageProfileId']), audio_profiles),
'sort_title': show['sortTitle'], 'sort_title': show['sortTitle'],
'year': show['year'], 'year': show['year'],
'alternate_titles': alternateTitles, 'alternate_titles': alternateTitles,
@ -117,7 +118,7 @@ def update_series():
'overview': overview, 'overview': overview,
'poster': poster, 'poster': poster,
'fanart': fanart, 'fanart': fanart,
'audio_language': profile_id_to_language((show['qualityProfileId'] if get_sonarr_version().startswith('2') else show['languageProfileId']), audio_profiles), 'audio_language': profile_id_to_language((show['qualityProfileId'] if sonarr_version.startswith('2') else show['languageProfileId']), audio_profiles),
'sort_title': show['sortTitle'], 'sort_title': show['sortTitle'],
'year': show['year'], 'year': show['year'],
'alternate_title': alternateTitles}) 'alternate_title': alternateTitles})

Loading…
Cancel
Save