Cheap fix for Issue #796, not actually tested on mac but filters the directories on Linux and Windows

This commit is contained in:
Patrick Speiser
2012-09-03 18:09:36 +02:00
parent 7c85002e5d
commit 81082be1be

View File

@@ -56,6 +56,11 @@ def libraryScan(dir=None, append=False, ArtistID=None, ArtistName=None):
song_list = []
for r,d,f in os.walk(dir):
try:
d.remove('.AppleDouble')
d.remove('.DS_Store')
except ValueError:
pass
for files in f:
# MEDIA_FORMATS = music file extensions, e.g. mp3, flac, etc
if any(files.lower().endswith('.' + x.lower()) for x in headphones.MEDIA_FORMATS):