cplay-ng

simple curses audio player
git clone https://git.ce9e.org/cplay-ng.git

commit
a80673647541c0f79597417e6ce629050a3bdd19
parent
7cd27441db7040c21a5147cacd03843c57ba341f
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2026-04-25 06:44
refactor: use get_ext() consistently

Diffstat

M cplay.py 4 ++--

1 files changed, 2 insertions, 2 deletions


diff --git a/cplay.py b/cplay.py

@@ -488,7 +488,7 @@ class Filelist(List):
  488   488         self.rsearch_str = query
  489   489 
  490   490     def activate(self, item):
  491    -1         ext = item.rsplit('.', 1)[-1]
   -1   491         ext = get_ext(item)
  492   492         if os.path.isdir(item):
  493   493             self.set_path(item)
  494   494         elif ext in AUDIO_EXTENSIONS:
@@ -639,7 +639,7 @@ class Playlist(List):
  639   639         return count
  640   640 
  641   641     def add(self, path, *, recursive=False):
  642    -1         ext = path.rsplit('.', 1)[-1]
   -1   642         ext = get_ext(path)
  643   643         if os.path.isdir(path):
  644   644             return self.add_dir(path)
  645   645         elif ext == 'm3u' and not recursive: