Fixed folder issue with Windows, updated to 1.5.19
This commit is contained in:
parent
c7e85d3808
commit
d514db2b76
|
@ -1,3 +1,3 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
__version__ = "1.5.18"
|
||||
__version__ = "1.5.19"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue