From 81082be1be35f83bc0ba9f75829dabaed8c0c381 Mon Sep 17 00:00:00 2001 From: Patrick Speiser Date: Mon, 3 Sep 2012 18:09:36 +0200 Subject: [PATCH] Cheap fix for Issue #796, not actually tested on mac but filters the directories on Linux and Windows --- headphones/librarysync.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/headphones/librarysync.py b/headphones/librarysync.py index 7001c14c..eeff6e8c 100644 --- a/headphones/librarysync.py +++ b/headphones/librarysync.py @@ -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):