mirror of
https://github.com/morpheus65535/bazarr
synced 2025-02-21 13:37:34 +00:00
Merge branch 'development' of https://github.com/morpheus65535/bazarr into halali
This commit is contained in:
commit
f78c04ba17
1 changed files with 36 additions and 33 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue