From 236c57c2dcebbd9104af6301c5dc5d9fa2df4608 Mon Sep 17 00:00:00 2001 From: EmilJohan Date: Wed, 7 Aug 2024 11:45:23 +0200 Subject: [PATCH] test v3 --- Smelt.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Smelt.py b/Smelt.py index 4125ecf..f7d7a68 100644 --- a/Smelt.py +++ b/Smelt.py @@ -581,13 +581,15 @@ def execute_ffmpeg_commands(self, commands): # Normalize path for Windows if platform.system() == 'Windows': - # log_path = os.path.normpath(log_path) - # # Escape colon by adding a backslash before it - # log_path = log_path.replace(':', '\\:') - log_path = "D\:\RichardStorken_tlr_mst_1998x1080_12bit-rgb_dpx/logs/Ffmpeg_lossless.log:level=32" - - # Construct FFREPORT value - ffreport_value = "file=" + log_path + ":level=32" + log_path = os.path.normpath(log_path) + # Convert backslashes to forward slashes for the path + log_path = log_path.replace('\\', '/') + # Ensure the drive letter has the correct format + if log_path[1] == ':': + log_path = log_path[0] + r'\:' + log_path[2:] + + # Wrap the path in quotes + ffreport_value = f'file="{log_path}":level=32' os.environ['FFREPORT'] = ffreport_value self.output_text.append(ffreport_value) step_text = "Step {}/{}: Running {}".format(i + 1, len(commands), cmd.replace('_', ' ').title())