|
|
|
@ -50,6 +50,7 @@ def update_movies():
|
|
|
|
|
for movie in r.json():
|
|
|
|
|
if movie['hasFile'] is True:
|
|
|
|
|
if 'movieFile' in movie:
|
|
|
|
|
if movie['movieFile']['relativePath'] is not None:
|
|
|
|
|
try:
|
|
|
|
|
overview = unicode(movie['overview'])
|
|
|
|
|
except:
|
|
|
|
@ -85,6 +86,8 @@ def update_movies():
|
|
|
|
|
movies_to_add.append((movie["title"], movie["path"] + separator + movie['movieFile']['relativePath'], movie["tmdbId"], movie_default_language, '[]', movie_default_hi, movie["id"], overview, poster, fanart, profile_id_to_language(movie['qualityProfileId']), sceneName, unicode(bool(movie['monitored']))))
|
|
|
|
|
else:
|
|
|
|
|
movies_to_add.append((movie["title"], movie["path"] + separator + movie['movieFile']['relativePath'], movie["tmdbId"], movie["tmdbId"], movie["tmdbId"], movie["id"], overview, poster, fanart, profile_id_to_language(movie['qualityProfileId']), sceneName, unicode(bool(movie['monitored']))))
|
|
|
|
|
else:
|
|
|
|
|
logging.error('BAZARR Radarr returned a movie without a file path: ' + movie["path"] + separator + movie['movieFile']['relativePath'])
|
|
|
|
|
|
|
|
|
|
# Update or insert movies in DB
|
|
|
|
|
db = sqlite3.connect(os.path.join(config_dir, 'db/bazarr.db'), timeout=30)
|
|
|
|
|