|
|
@ -101,14 +101,17 @@ def store_subtitles(file):
|
|
|
|
actual_subtitles.append([str(detected_language), path_replace_reverse(
|
|
|
|
actual_subtitles.append([str(detected_language), path_replace_reverse(
|
|
|
|
os.path.join(os.path.dirname(file), subtitle))])
|
|
|
|
os.path.join(os.path.dirname(file), subtitle))])
|
|
|
|
|
|
|
|
|
|
|
|
logging.debug("BAZARR storing those languages to DB: " + str(actual_subtitles))
|
|
|
|
update_count = TableEpisodes.update(
|
|
|
|
TableEpisodes.update(
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TableEpisodes.subtitles: str(actual_subtitles)
|
|
|
|
TableEpisodes.subtitles: str(actual_subtitles)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
).where(
|
|
|
|
).where(
|
|
|
|
TableEpisodes.path == path_replace_reverse(file)
|
|
|
|
TableEpisodes.path == path_replace_reverse(file)
|
|
|
|
).execute()
|
|
|
|
).execute()
|
|
|
|
|
|
|
|
if update_count > 0:
|
|
|
|
|
|
|
|
logging.debug("BAZARR storing those languages to DB: " + str(actual_subtitles))
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
logging.debug("BAZARR haven't been able to update existing subtitles to DB : " + str(actual_subtitles))
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
logging.debug("BAZARR this file doesn't seems to exist or isn't accessible.")
|
|
|
|
logging.debug("BAZARR this file doesn't seems to exist or isn't accessible.")
|
|
|
|
|
|
|
|
|
|
|
@ -191,14 +194,17 @@ def store_subtitles_movie(file):
|
|
|
|
actual_subtitles.append([str(detected_language), path_replace_reverse_movie(
|
|
|
|
actual_subtitles.append([str(detected_language), path_replace_reverse_movie(
|
|
|
|
os.path.join(os.path.dirname(file), dest_folder, subtitle))])
|
|
|
|
os.path.join(os.path.dirname(file), dest_folder, subtitle))])
|
|
|
|
|
|
|
|
|
|
|
|
logging.debug("BAZARR storing those languages to DB: " + str(actual_subtitles))
|
|
|
|
update_count = TableMovies.update(
|
|
|
|
TableMovies.update(
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TableMovies.subtitles: str(actual_subtitles)
|
|
|
|
TableMovies.subtitles: str(actual_subtitles)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
).where(
|
|
|
|
).where(
|
|
|
|
TableMovies.path == path_replace_reverse_movie(file)
|
|
|
|
TableMovies.path == path_replace_reverse_movie(file)
|
|
|
|
).execute()
|
|
|
|
).execute()
|
|
|
|
|
|
|
|
if update_count > 0:
|
|
|
|
|
|
|
|
logging.debug("BAZARR storing those languages to DB: " + str(actual_subtitles))
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
logging.debug("BAZARR haven't been able to update existing subtitles to DB : " + str(actual_subtitles))
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
logging.debug("BAZARR this file doesn't seems to exist or isn't accessible.")
|
|
|
|
logging.debug("BAZARR this file doesn't seems to exist or isn't accessible.")
|
|
|
|
|
|
|
|
|
|
|
|