mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-01-06 06:52:07 +08:00
Fix for #796
This commit is contained in:
parent
f80727f409
commit
d0d8388d9f
2 changed files with 27 additions and 26 deletions
|
@ -134,31 +134,31 @@ def update_movies():
|
|||
current_movies_radarr.append(six.text_type(movie['tmdbId']))
|
||||
|
||||
if six.text_type(movie['tmdbId']) in current_movies_db_list:
|
||||
movies_to_update.append({'radarrId': movie["id"],
|
||||
'title': six.text_type(movie["title"]),
|
||||
'path': six.text_type(movie["path"] + separator + movie['movieFile']['relativePath']),
|
||||
movies_to_update.append({'radarrId': int(movie["id"]),
|
||||
'title': movie["title"],
|
||||
'path': movie["path"] + separator + movie['movieFile']['relativePath'],
|
||||
'tmdbId': six.text_type(movie["tmdbId"]),
|
||||
'poster': six.text_type(poster),
|
||||
'fanart': six.text_type(fanart),
|
||||
'audio_language': six.text_type(profile_id_to_language(movie['qualityProfileId'], audio_profiles)),
|
||||
'poster': poster,
|
||||
'fanart': fanart,
|
||||
'audio_language': profile_id_to_language(movie['qualityProfileId'], audio_profiles),
|
||||
'sceneName': sceneName,
|
||||
'monitored': six.text_type(bool(movie['monitored'])),
|
||||
'year': six.text_type(movie['year']),
|
||||
'sortTitle': six.text_type(movie['sortTitle']),
|
||||
'alternativeTitles': six.text_type(alternativeTitles),
|
||||
'format': six.text_type(format),
|
||||
'resolution': six.text_type(resolution),
|
||||
'video_codec': six.text_type(videoCodec),
|
||||
'audio_codec': six.text_type(audioCodec),
|
||||
'overview': six.text_type(overview),
|
||||
'imdbId': six.text_type(imdbId),
|
||||
'movie_file_id': movie['movieFile']['id']})
|
||||
'sortTitle': movie['sortTitle'],
|
||||
'alternativeTitles': alternativeTitles,
|
||||
'format': format,
|
||||
'resolution': resolution,
|
||||
'video_codec': videoCodec,
|
||||
'audio_codec': audioCodec,
|
||||
'overview': overview,
|
||||
'imdbId': imdbId,
|
||||
'movie_file_id': int(movie['movieFile']['id'])})
|
||||
else:
|
||||
if movie_default_enabled is True:
|
||||
movies_to_add.append({'radarrId': movie["id"],
|
||||
movies_to_add.append({'radarrId': int(movie["id"]),
|
||||
'title': movie["title"],
|
||||
'path': movie["path"] + separator + movie['movieFile']['relativePath'],
|
||||
'tmdbId': movie["tmdbId"],
|
||||
'tmdbId': six.text_type(movie["tmdbId"]),
|
||||
'languages': movie_default_language,
|
||||
'subtitles': '[]',
|
||||
'hearing_impaired': movie_default_hi,
|
||||
|
@ -169,7 +169,7 @@ def update_movies():
|
|||
'sceneName': sceneName,
|
||||
'monitored': six.text_type(bool(movie['monitored'])),
|
||||
'sortTitle': movie['sortTitle'],
|
||||
'year': movie['year'],
|
||||
'year': six.text_type(movie['year']),
|
||||
'alternativeTitles': alternativeTitles,
|
||||
'format': format,
|
||||
'resolution': resolution,
|
||||
|
@ -177,12 +177,12 @@ def update_movies():
|
|||
'audio_codec': audioCodec,
|
||||
'imdbId': imdbId,
|
||||
'forced': movie_default_forced,
|
||||
'movie_file_id': movie['movieFile']['id']})
|
||||
'movie_file_id': int(movie['movieFile']['id'])})
|
||||
else:
|
||||
movies_to_add.append({'radarrId': movie["id"],
|
||||
movies_to_add.append({'radarrId': int(movie["id"]),
|
||||
'title': movie["title"],
|
||||
'path': movie["path"] + separator + movie['movieFile']['relativePath'],
|
||||
'tmdbId': movie["tmdbId"],
|
||||
'tmdbId': six.text_type(movie["tmdbId"]),
|
||||
'languages': None,
|
||||
'subtitles': '[]',
|
||||
'hearing_impaired': None,
|
||||
|
@ -193,7 +193,7 @@ def update_movies():
|
|||
'sceneName': sceneName,
|
||||
'monitored': six.text_type(bool(movie['monitored'])),
|
||||
'sortTitle': movie['sortTitle'],
|
||||
'year': movie['year'],
|
||||
'year': six.text_type(movie['year']),
|
||||
'alternativeTitles': alternativeTitles,
|
||||
'format': format,
|
||||
'resolution': resolution,
|
||||
|
@ -201,7 +201,7 @@ def update_movies():
|
|||
'audio_codec': audioCodec,
|
||||
'imdbId': imdbId,
|
||||
'forced': None,
|
||||
'movie_file_id': movie['movieFile']['id']})
|
||||
'movie_file_id': int(movie['movieFile']['id'])})
|
||||
else:
|
||||
logging.error(
|
||||
'BAZARR Radarr returned a movie without a file path: ' + movie["path"] + separator +
|
||||
|
|
|
@ -5,6 +5,7 @@ from __future__ import print_function
|
|||
import os
|
||||
import requests
|
||||
import logging
|
||||
import six
|
||||
from queueconfig import notifications
|
||||
|
||||
from config import settings, url_sonarr
|
||||
|
@ -91,7 +92,7 @@ def update_series():
|
|||
'fanart': fanart,
|
||||
'audio_language': audio_language,
|
||||
'sortTitle': show['sortTitle'],
|
||||
'year': str(show['year']),
|
||||
'year': six.text_type(show['year']),
|
||||
'alternateTitles': alternate_titles})
|
||||
else:
|
||||
if serie_default_enabled is True:
|
||||
|
@ -106,7 +107,7 @@ def update_series():
|
|||
'fanart': fanart,
|
||||
'audio_language': audio_language,
|
||||
'sortTitle': show['sortTitle'],
|
||||
'year': str(show['year']),
|
||||
'year': six.text_type(show['year']),
|
||||
'alternateTitles': alternate_titles,
|
||||
'forced': serie_default_forced})
|
||||
else:
|
||||
|
@ -119,7 +120,7 @@ def update_series():
|
|||
'fanart': fanart,
|
||||
'audio_language': audio_language,
|
||||
'sortTitle': show['sortTitle'],
|
||||
'year': str(show['year']),
|
||||
'year': six.text_type(show['year']),
|
||||
'alternateTitles': alternate_titles})
|
||||
|
||||
# Remove old series from DB
|
||||
|
|
Loading…
Reference in a new issue