diff --git a/bazarr/get_series.py b/bazarr/get_series.py index 4d3dd65c8..2a447ef69 100644 --- a/bazarr/get_series.py +++ b/bazarr/get_series.py @@ -165,9 +165,9 @@ def update_series(): removed_series = list(set(current_shows_db_list) - set(current_shows_sonarr)) for series in removed_series: - print(TableShows.delete().where( + TableShows.delete().where( TableShows.tvdb_id == series - ).execute()) + ).execute() logging.debug('BAZARR All series synced from Sonarr into database.') diff --git a/bazarr/get_subtitle.py b/bazarr/get_subtitle.py index c10450453..0eb2303d5 100644 --- a/bazarr/get_subtitle.py +++ b/bazarr/get_subtitle.py @@ -202,7 +202,7 @@ def download_subtitle(path, language, hi, forced, providers, providers_auth, sce directory=fld, chmod=chmod, # formats=("srt", "vtt") - path_decoder=None + path_decoder=force_unicode ) except Exception as e: logging.exception('BAZARR Error saving Subtitles file to disk for this file:' + path) @@ -429,7 +429,7 @@ def manual_download_subtitle(path, language, hi, forced, subtitle, provider, pro directory=fld, chmod=chmod, # formats=("srt", "vtt") - path_decoder=None) + path_decoder=force_unicode) except Exception as e: logging.exception('BAZARR Error saving Subtitles file to disk for this file:' + path) diff --git a/libs/pyprobe/pyprobe.py b/libs/pyprobe/pyprobe.py index 417961be2..b300965d5 100644 --- a/libs/pyprobe/pyprobe.py +++ b/libs/pyprobe/pyprobe.py @@ -176,8 +176,8 @@ class VideoFileParser: IOError: ffprobe execution failed """ - command = [parser] + commandArgs + [inputFile.encode(getfilesystemencoding())] if PY3: + command = [parser] + commandArgs + [inputFile] completedProcess = subprocess.run( command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8" ) @@ -187,6 +187,7 @@ class VideoFileParser: ) return completedProcess.stdout else: + command = [parser] + commandArgs + [inputFile.encode(getfilesystemencoding())] try: completedProcess = subprocess.check_output( command, stderr=subprocess.STDOUT