possible fix for error

This commit is contained in:
janis
2023-03-15 15:44:40 +01:00
parent 403d2b4521
commit 35328dcb54
2 changed files with 7 additions and 7 deletions

View File

@@ -45,7 +45,10 @@ class Handler:
else: else:
print("OS CURRENTLY UNSUPPORTED!") print("OS CURRENTLY UNSUPPORTED!")
return False return False
self.tmppath += "fsru/" if ( self.tmppath[len(self.tmppath) - 1: ] == '/' ):
self.tmppath += "fsru/"
else:
self.tmppath += '/fsru/'
self.ffmpegpath = config["PathSettings"]["ffmpeg"] self.ffmpegpath = config["PathSettings"]["ffmpeg"]
# checking for spaces in filepath (for use with terminal commands) # checking for spaces in filepath (for use with terminal commands)
self.filepath = "" self.filepath = ""
@@ -86,8 +89,6 @@ class Handler:
else: else:
print("OS CURRENTLY UNSUPPORTED!") print("OS CURRENTLY UNSUPPORTED!")
return False return False
print( self.command )
os.system(self.command) os.system(self.command)
print("photo upscaled") print("photo upscaled")
@@ -120,7 +121,7 @@ class Handler:
print("linux") print("linux")
self.command = f"ffmpeg -i {str(self.filepath)} {self.tmppath}ex%08d.png" self.command = f"ffmpeg -i {str(self.filepath)} {self.tmppath}ex%08d.png"
elif self.os_type == "win32": 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: else:
print("OS CURRENTLY UNSUPPORTED!") print("OS CURRENTLY UNSUPPORTED!")
return False return False

View File

@@ -1,8 +1,7 @@
[PathSettings] [PathSettings]
defaultOutputPath = $HOME/FSRImageVideoUpscaler/ defaultOutputPath = $HOME/FSRImageVideoUpscaler/
tmpPathLinux = /tmp/ tmpPathLinux = /tmp/
tmpPathWindows = temp tmpPathWindows = C:\temp
ffmpeg = ./bin/lib/ffmpeg.exe
[DevSettings] [DevSettings]
loggerReqLevel = DEBUG loggerReqLevel = DEBUG