|
|
|
@ -22,6 +22,8 @@ def update_all_movies():
|
|
|
|
|
def update_movies():
|
|
|
|
|
logging.debug('BAZARR Starting movie sync from Radarr.')
|
|
|
|
|
apikey_radarr = settings.radarr.apikey
|
|
|
|
|
|
|
|
|
|
radarr_version = get_radarr_version()
|
|
|
|
|
movie_default_enabled = settings.general.getboolean('movie_default_enabled')
|
|
|
|
|
movie_default_language = settings.general.movie_default_language
|
|
|
|
|
movie_default_hi = settings.general.movie_default_hi
|
|
|
|
@ -127,6 +129,8 @@ def update_movies():
|
|
|
|
|
videoCodec = None
|
|
|
|
|
audioCodec = None
|
|
|
|
|
|
|
|
|
|
audio_language = profile_id_to_language(movie['qualityProfileId'], audio_profiles)
|
|
|
|
|
|
|
|
|
|
# Add movies in radarr to current movies list
|
|
|
|
|
current_movies_radarr.append(str(movie['tmdbId']))
|
|
|
|
|
|
|
|
|
@ -137,7 +141,7 @@ def update_movies():
|
|
|
|
|
'tmdbId': str(movie["tmdbId"]),
|
|
|
|
|
'poster': poster,
|
|
|
|
|
'fanart': fanart,
|
|
|
|
|
'audio_language': profile_id_to_language(movie['qualityProfileId'], audio_profiles),
|
|
|
|
|
'audio_language': audio_language,
|
|
|
|
|
'sceneName': sceneName,
|
|
|
|
|
'monitored': str(bool(movie['monitored'])),
|
|
|
|
|
'year': str(movie['year']),
|
|
|
|
@ -162,7 +166,7 @@ def update_movies():
|
|
|
|
|
'overview': overview,
|
|
|
|
|
'poster': poster,
|
|
|
|
|
'fanart': fanart,
|
|
|
|
|
'audio_language': profile_id_to_language(movie['qualityProfileId'], audio_profiles),
|
|
|
|
|
'audio_language': audio_language,
|
|
|
|
|
'sceneName': sceneName,
|
|
|
|
|
'monitored': str(bool(movie['monitored'])),
|
|
|
|
|
'sortTitle': movie['sortTitle'],
|
|
|
|
@ -186,7 +190,7 @@ def update_movies():
|
|
|
|
|
'overview': overview,
|
|
|
|
|
'poster': poster,
|
|
|
|
|
'fanart': fanart,
|
|
|
|
|
'audio_language': profile_id_to_language(movie['qualityProfileId'], audio_profiles),
|
|
|
|
|
'audio_language': audio_language,
|
|
|
|
|
'sceneName': sceneName,
|
|
|
|
|
'monitored': str(bool(movie['monitored'])),
|
|
|
|
|
'sortTitle': movie['sortTitle'],
|
|
|
|
@ -272,8 +276,11 @@ def get_profile_list():
|
|
|
|
|
radarr_version = get_radarr_version()
|
|
|
|
|
profiles_list = []
|
|
|
|
|
# Get profiles data from radarr
|
|
|
|
|
|
|
|
|
|
if radarr_version.startswith('0'):
|
|
|
|
|
url_radarr_api_movies = url_radarr() + "/api/profile?apikey=" + apikey_radarr
|
|
|
|
|
else:
|
|
|
|
|
url_radarr_api_movies = url_radarr() + "/api/v3/qualityprofile?apikey=" + apikey_radarr
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
profiles_json = requests.get(url_radarr_api_movies, timeout=60, verify=False)
|
|
|
|
|
except requests.exceptions.ConnectionError as errc:
|
|
|
|
@ -287,7 +294,7 @@ def get_profile_list():
|
|
|
|
|
if radarr_version.startswith('0'):
|
|
|
|
|
for profile in profiles_json.json():
|
|
|
|
|
profiles_list.append([profile['id'], profile['language'].capitalize()])
|
|
|
|
|
elif radarr_version.startswith('2'):
|
|
|
|
|
else:
|
|
|
|
|
for profile in profiles_json.json():
|
|
|
|
|
profiles_list.append([profile['id'], profile['language']['name'].capitalize()])
|
|
|
|
|
|
|
|
|
|