Fix for path returning None

This commit is contained in:
morpheus65535 2018-08-22 09:52:14 -04:00
parent e5d0f43b8e
commit b6fc720759

View file

@ -100,7 +100,10 @@ def update_movies():
for added_movie in added_movies:
added_path = c.execute('SELECT path FROM table_movies WHERE tmdbId = ?', (added_movie,)).fetchone()
store_subtitles_movie(path_replace_movie(added_path[0]))
if added_path == None:
logging.error("No path returned from DB for movie with tmdbId " + added_movie)
else:
store_subtitles_movie(path_replace_movie(added_path[0]))
# Close database connection
db.close()