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):
234234 @staticmethod
235235 def has_any_mp3s (folder ):
236236 """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 ))
238238
239239 def choose_folder (self , base = '/sd' ):
240240 """Let the user choose a folder within a base directory"""
@@ -493,7 +493,7 @@ def longest_common_prefix(seq):
493493
494494def play_folder (location ):
495495 """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' )]
497497 if not playlist :
498498 # hmm, no mp3s in a folder? Well, don't crash okay?
499499 del playlist
You can’t perform that action at this time.
0 commit comments