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

@ -1,3 +1,3 @@
#!/usr/bin/env python3
__version__ = "1.5.18"
__version__ = "1.5.19"

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"

View File

@ -7,7 +7,7 @@ README = (HERE / "README.md").read_text()
setup(
name="deemix",
version="1.5.18",
version="1.5.19",
description="A barebone deezer downloader library",
long_description=README,
long_description_content_type="text/markdown",