Skip to content

Commit

Permalink
Update Util.py
Browse files Browse the repository at this point in the history
  • Loading branch information
TNTwise authored Sep 11, 2024
1 parent 93dd249 commit eabf0b6
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/Util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit eabf0b6

Please sign in to comment.