Fixed #6
This commit is contained in:
parent
11447d606b
commit
263ecd4be0
|
@ -46,9 +46,11 @@ def getMusicFolder():
|
|||
if (homedata / '.config' / 'user-dirs.dirs').is_file() and musicdata == "":
|
||||
with open(homedata / '.config' / 'user-dirs.dirs', 'r') as f:
|
||||
userDirs = f.read()
|
||||
musicdata = re.search(r"XDG_MUSIC_DIR=\"(.*)\"", userDirs).group(1)
|
||||
musicdata = Path(os.path.expandvars(musicdata))
|
||||
musicdata = checkPath(musicdata)
|
||||
musicdata_search = re.search(r"XDG_MUSIC_DIR=\"(.*)\"", userDirs)
|
||||
if musicdata_search:
|
||||
musicdata = musicdata_search.group(1)
|
||||
musicdata = Path(os.path.expandvars(musicdata))
|
||||
musicdata = checkPath(musicdata)
|
||||
if os.name == 'nt' and musicdata == "":
|
||||
musicKeys = ['My Music', '{4BD8D571-6D19-48D3-BE97-422220080E43}']
|
||||
regData = os.popen(r'reg.exe query "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"').read().split('\r\n')
|
||||
|
|
Loading…
Reference in New Issue