fix: Join music file path safely.
This commit is contained in:
parent
e5f623f6c3
commit
384bacf1ef
2
util.py
2
util.py
@ -51,7 +51,7 @@ def get_recursive_file_list_sorted(path):
|
|||||||
try:
|
try:
|
||||||
mime = magic.from_file(fullpath, mime=True)
|
mime = magic.from_file(fullpath, mime=True)
|
||||||
if 'audio' in mime or 'audio' in magic.from_file(fullpath).lower() or 'video' in mime:
|
if 'audio' in mime or 'audio' in magic.from_file(fullpath).lower() or 'video' in mime:
|
||||||
filelist.append(relroot + file)
|
filelist.append(os.path.join(relroot, file))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user