Fix transcoder utf8 decoder error handling
This commit is contained in:
parent
ba6e777320
commit
055eb7b04d
@ -294,7 +294,7 @@ def run_and_log_handbrake(dvd: Dvd, command) -> bool:
|
|||||||
|
|
||||||
# Handbrake often exits with returncode 0 even though it logged an error and transcoding was not successful
|
# Handbrake often exits with returncode 0 even though it logged an error and transcoding was not successful
|
||||||
def check_handbrake_log_for_error(dvd: Dvd):
|
def check_handbrake_log_for_error(dvd: Dvd):
|
||||||
with open(dvd.log_file, "r") as log_file:
|
with open(dvd.log_file, "r", encoding="utf-8", errors="ignore") as log_file:
|
||||||
for line in log_file:
|
for line in log_file:
|
||||||
if line.startswith("Encode failed"):
|
if line.startswith("Encode failed"):
|
||||||
return True
|
return True
|
||||||
@ -328,7 +328,7 @@ def find_series_titles(dvd: Dvd):
|
|||||||
if proc.returncode != 0:
|
if proc.returncode != 0:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
stdout = proc.stdout.decode("utf-8", errors="replace")
|
stdout = proc.stdout.decode("utf-8", errors="ignore")
|
||||||
|
|
||||||
json_str = ""
|
json_str = ""
|
||||||
in_json = False
|
in_json = False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user