From 35328dcb5459b99ade4c77dc772b997dfb0c4f22 Mon Sep 17 00:00:00 2001 From: janis Date: Wed, 15 Mar 2023 15:44:40 +0100 Subject: [PATCH] possible fix for error --- bin/handler.py | 11 ++++++----- config/settings.ini | 3 +-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/handler.py b/bin/handler.py index 7c812f7..410a0a0 100644 --- a/bin/handler.py +++ b/bin/handler.py @@ -45,7 +45,10 @@ class Handler: else: print("OS CURRENTLY UNSUPPORTED!") return False - self.tmppath += "fsru/" + if ( self.tmppath[len(self.tmppath) - 1: ] == '/' ): + self.tmppath += "fsru/" + else: + self.tmppath += '/fsru/' self.ffmpegpath = config["PathSettings"]["ffmpeg"] # checking for spaces in filepath (for use with terminal commands) self.filepath = "" @@ -85,9 +88,7 @@ class Handler: self.command = f"{fsrpath} -Scale {quality_setting} {quality_setting} {self.filepath} {output_path}" else: print("OS CURRENTLY UNSUPPORTED!") - return False - print( self.command ) - + return False os.system(self.command) print("photo upscaled") @@ -120,7 +121,7 @@ class Handler: print("linux") self.command = f"ffmpeg -i {str(self.filepath)} {self.tmppath}ex%08d.png" elif self.os_type == "win32": - self.command = f"{ffmpegpath} -i {str(self.filepath)} {self.tmppath}ex%08d.png" + self.command = f"ffmpeg -i {str(self.filepath)} ${self.tmppath}ex%08d.png" else: print("OS CURRENTLY UNSUPPORTED!") return False diff --git a/config/settings.ini b/config/settings.ini index b44989c..352a9e9 100644 --- a/config/settings.ini +++ b/config/settings.ini @@ -1,8 +1,7 @@ [PathSettings] defaultOutputPath = $HOME/FSRImageVideoUpscaler/ tmpPathLinux = /tmp/ -tmpPathWindows = temp -ffmpeg = ./bin/lib/ffmpeg.exe +tmpPathWindows = C:\temp [DevSettings] loggerReqLevel = DEBUG \ No newline at end of file