From eabf0b61f7d21ce917a1b6a2e019cdee41f0ebaa Mon Sep 17 00:00:00 2001 From: TNTwise <77559100+TNTwise@users.noreply.github.com> Date: Wed, 11 Sep 2024 14:59:09 -0500 Subject: [PATCH] Update Util.py --- src/Util.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/Util.py b/src/Util.py index 704e26f4..225eb67c 100644 --- a/src/Util.py +++ b/src/Util.py @@ -15,6 +15,14 @@ homedir = os.path.expanduser("~") +def getPlatform() -> str: + """ + Returns the current OS that the app is running on + Windows: win32 + MacOS: darwin + Linux: linux + """ + return sys.platform def isFlatpak(): return "FLATPAK_ID" in os.environ @@ -32,7 +40,10 @@ def isFlatpak(): "io.github.tntwise.REAL-Video-EnhancerV2", ) else: - cwd = os.getcwd() + if getPlatform() == 'darwin': + cwd = os.path.join(f"{homedir}","Library","REAL-Video-Enhancer") + else: + cwd = os.getcwd() def getAvailableDiskSpace() -> float: @@ -104,14 +115,7 @@ def getOSInfo() -> str: return f"{system} {release} {architecture}" -def getPlatform() -> str: - """ - Returns the current OS that the app is running on - Windows: win32 - MacOS: darwin - Linux: linux - """ - return sys.platform + def getRAMAmount() -> str: