forked from upstream/IPod-Shuffle-4g
Skip hidden directories for auto playlists
This commit is contained in:
parent
6e919eca3d
commit
8dff7e8d5e
1 changed files with 16 additions and 14 deletions
|
|
@ -459,6 +459,8 @@ class Playlist(Record):
|
|||
for (dirpath, dirnames, filenames) in os.walk(playlistpath):
|
||||
dirnames.sort()
|
||||
|
||||
# Ignore any hidden directories
|
||||
if "/." not in dirpath.lower():
|
||||
for filename in sorted(filenames, key = lambda x: x.lower()):
|
||||
# Only add valid music files to playlist
|
||||
if os.path.splitext(filename)[1].lower() in (".mp3", ".m4a", ".m4b", ".m4p", ".aa", ".wav"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue