mirror of
https://gitlab.com/RemixDev/deemix-py.git
synced 2024-12-28 18:46:13 +00:00
Merge branch 'fix-paths' into 'main'
Directory overrides for docker See merge request RemixDev/deemix!2
This commit is contained in:
commit
f2cc780cec
|
@ -7,7 +7,9 @@ userdata = ""
|
||||||
musicdata = ""
|
musicdata = ""
|
||||||
|
|
||||||
|
|
||||||
if os.getenv("XDG_CONFIG_HOME"):
|
if os.getenv("DEEMIX_DATA_DIR"):
|
||||||
|
userdata = Path(os.getenv("DEEMIX_DATA_DIR"))
|
||||||
|
elif os.getenv("XDG_CONFIG_HOME"):
|
||||||
userdata = Path(os.getenv("XDG_CONFIG_HOME")) / 'deemix'
|
userdata = Path(os.getenv("XDG_CONFIG_HOME")) / 'deemix'
|
||||||
elif os.getenv("APPDATA"):
|
elif os.getenv("APPDATA"):
|
||||||
userdata = Path(os.getenv("APPDATA")) / "deemix"
|
userdata = Path(os.getenv("APPDATA")) / "deemix"
|
||||||
|
@ -16,7 +18,9 @@ elif sys.platform.startswith('darwin'):
|
||||||
else:
|
else:
|
||||||
userdata = homedata / '.config' / 'deemix'
|
userdata = homedata / '.config' / 'deemix'
|
||||||
|
|
||||||
if os.getenv("XDG_MUSIC_DIR"):
|
if os.getenv("DEEMIX_MUSIC_DIR"):
|
||||||
|
musicdata = Path(os.getenv("DEEMIX_MUSIC_DIR"))
|
||||||
|
elif os.getenv("XDG_MUSIC_DIR"):
|
||||||
musicdata = Path(os.getenv("XDG_MUSIC_DIR")) / "deemix Music"
|
musicdata = Path(os.getenv("XDG_MUSIC_DIR")) / "deemix Music"
|
||||||
elif os.name == 'nt':
|
elif os.name == 'nt':
|
||||||
import winreg
|
import winreg
|
||||||
|
@ -33,9 +37,6 @@ elif os.name == 'nt':
|
||||||
else:
|
else:
|
||||||
musicdata = homedata / "Music" / "deemix Music"
|
musicdata = homedata / "Music" / "deemix Music"
|
||||||
|
|
||||||
def getHomeFolder():
|
|
||||||
return homedata
|
|
||||||
|
|
||||||
def getConfigFolder():
|
def getConfigFolder():
|
||||||
return userdata
|
return userdata
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue