Fixed folder issue with Windows, updated to 1.5.19

This commit is contained in:
RemixDev
2020-10-30 15:38:21 +01:00
parent c7e85d3808
commit d514db2b76
3 changed files with 8 additions and 3 deletions

View File

@ -23,7 +23,12 @@ elif os.name == 'nt':
sub_key = r'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders'
music_guid = '{4BD8D571-6D19-48D3-BE97-422220080E43}'
with winreg.OpenKey(winreg.HKEY_CURRENT_USER, sub_key) as key:
location = winreg.QueryValueEx(key, music_guid)[0]
location = None
try: location = winreg.QueryValueEx(key, music_guid)[0]
except: pass
try: location = winreg.QueryValueEx(key, 'My Music')[0]
except: pass
if not location: location = homedata / "Music"
musicdata = Path(location) / "deemix Music"
else:
musicdata = homedata / "Music" / "deemix Music"