From f87ea7e9d195c20edeb95cf857b894d03a3af5ed Mon Sep 17 00:00:00 2001
From: Julian Mutter <julian.mutter@comumail.de>
Date: Fri, 16 Sep 2022 12:53:38 +0200
Subject: [PATCH] Append transcoding logs to scan logs instead of overwriting

---
 transcoder/transcode_dvd.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/transcoder/transcode_dvd.py b/transcoder/transcode_dvd.py
index 791133d..3a00017 100755
--- a/transcoder/transcode_dvd.py
+++ b/transcoder/transcode_dvd.py
@@ -198,7 +198,7 @@ def transcode_series(dvd: Dvd):
     (season, episodes) = season_episodes
     if len(episodes) != len(title_numbers):
         dvd.append_line_to_logfile(
-            f"{dvd} should have {len(episodes)} episodes, but handbrake found {len(title_numbers)}. Maybe you need to adjust 'MIN_EPISODES_DURATION_SECONDS'?"
+            f"{dvd} should have {len(episodes)} episodes, but {len(title_numbers)} were found. Maybe you need to adjust 'MIN_EPISODES_DURATION_SECONDS'?"
         )
         return False
 
@@ -228,7 +228,7 @@ def transcode_episode(dvd: Dvd, season, episode, title_number):
     video_file_name = episode_title + OUT_VIDEO_FORMAT
     output_file = os.path.join(TMP_DIR, video_file_name)
 
-    with open(dvd.log_file, "w") as log_file:
+    with open(dvd.log_file, "a") as log_file:
         proc = subprocess.run(
             dvd.transcode_command_args_without_title_number(output_file)
             + [