mirror of
https://github.com/nims11/IPod-Shuffle-4g.git
synced 2025-12-07 07:58:01 +09:00
Ignore hidden filenames
This commit is contained in:
parent
e189477870
commit
d8eb3871bf
1 changed files with 7 additions and 5 deletions
12
shuffle.py
12
shuffle.py
|
|
@ -608,11 +608,13 @@ class Shuffler(object):
|
||||||
# Ignore the speakable directory and any hidden directories
|
# Ignore the speakable directory and any hidden directories
|
||||||
if not is_path_prefix("iPod_Control/Speakable", relpath) and "/." not in dirpath:
|
if not is_path_prefix("iPod_Control/Speakable", relpath) and "/." not in dirpath:
|
||||||
for filename in sorted(filenames, key = lambda x: x.lower()):
|
for filename in sorted(filenames, key = lambda x: x.lower()):
|
||||||
fullPath = os.path.abspath(os.path.join(dirpath, filename))
|
# Ignore hidden files
|
||||||
if os.path.splitext(filename)[1].lower() in (".mp3", ".m4a", ".m4b", ".m4p", ".aa", ".wav"):
|
if not filename.startswith("."):
|
||||||
self.tracks.append(fullPath)
|
fullPath = os.path.abspath(os.path.join(dirpath, filename))
|
||||||
if os.path.splitext(filename)[1].lower() in (".pls", ".m3u"):
|
if os.path.splitext(filename)[1].lower() in (".mp3", ".m4a", ".m4b", ".m4p", ".aa", ".wav"):
|
||||||
self.lists.append(fullPath)
|
self.tracks.append(fullPath)
|
||||||
|
if os.path.splitext(filename)[1].lower() in (".pls", ".m3u"):
|
||||||
|
self.lists.append(fullPath)
|
||||||
|
|
||||||
# Create automatic playlists in music directory.
|
# Create automatic playlists in music directory.
|
||||||
# Ignore the (music) root and any hidden directories.
|
# Ignore the (music) root and any hidden directories.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue