File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
CircuitPython_JEplayer_mp3 Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ def auto_next(self):
234
234
@staticmethod
235
235
def has_any_mp3s (folder ):
236
236
"""True if the folder contains at least one item ending in .mp3"""
237
- return any (fn .lower ().endswith (".mp3" ) for fn in os .listdir (folder ))
237
+ return any (not fn . startswith ( "." ) and fn .lower ().endswith (".mp3" ) for fn in os .listdir (folder ))
238
238
239
239
def choose_folder (self , base = '/sd' ):
240
240
"""Let the user choose a folder within a base directory"""
@@ -493,7 +493,7 @@ def longest_common_prefix(seq):
493
493
494
494
def play_folder (location ):
495
495
"""Play everything within a given folder"""
496
- playlist = [d for d in os .listdir (location ) if d .lower ().endswith ('.mp3' )]
496
+ playlist = [d for d in os .listdir (location ) if not d . startswith ( '.' ) and d .lower ().endswith ('.mp3' )]
497
497
if not playlist :
498
498
# hmm, no mp3s in a folder? Well, don't crash okay?
499
499
del playlist
You can’t perform that action at this time.
0 commit comments