From 20864d63036f0e3eb24e9a49ae38248432ef2121 Mon Sep 17 00:00:00 2001 From: tntwise Date: Wed, 11 Sep 2024 16:25:40 -0500 Subject: [PATCH] patch for macos --- REAL-Video-Enhancer.py | 2 ++ src/Backendhandler.py | 2 +- src/Util.py | 5 +---- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/REAL-Video-Enhancer.py b/REAL-Video-Enhancer.py index 011f14b5..40e46e3a 100644 --- a/REAL-Video-Enhancer.py +++ b/REAL-Video-Enhancer.py @@ -51,6 +51,8 @@ from src.ui.QTstyle import Palette from src.ui.QTcustom import DownloadDepsDialog, RegularQTPopup, SettingUpBackendPopup +# patch for macos +os.chdir(os.path.dirname(os.path.abspath(__file__))) class MainWindow(QMainWindow, Ui_MainWindow): """Main window class for the REAL Video Enhancer application. diff --git a/src/Backendhandler.py b/src/Backendhandler.py index 5a3b0214..9b299b2b 100644 --- a/src/Backendhandler.py +++ b/src/Backendhandler.py @@ -89,7 +89,7 @@ def getAvailableBackends(self): for word in output: if "objc" in word: continue - new_out += word + new_out += word + " " output = new_out # Find the part of the output containing the backends list start = output.find("[") diff --git a/src/Util.py b/src/Util.py index 225eb67c..0b4f09ea 100644 --- a/src/Util.py +++ b/src/Util.py @@ -40,10 +40,7 @@ def isFlatpak(): "io.github.tntwise.REAL-Video-EnhancerV2", ) else: - if getPlatform() == 'darwin': - cwd = os.path.join(f"{homedir}","Library","REAL-Video-Enhancer") - else: - cwd = os.getcwd() + cwd = os.getcwd() def getAvailableDiskSpace() -> float: