cplay-ng

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

commit
dc24e1a79d94d6cf1b1c90b2e6bcef9f5c619c7b
parent
0247517cee4842b97b997170951ce92344731315
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2021-07-04 17:56
fix path display in root dir

Diffstat

M cplay.py 4 ++--

1 files changed, 2 insertions, 2 deletions


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

@@ -89,7 +89,7 @@ def resize(*args):
   89    89 @functools.lru_cache()
   90    90 def relpath(path):
   91    91     if path.startswith(filelist.path):
   92    -1         return path[len(filelist.path) + 1:]
   -1    92         return path[len(filelist.path):].lstrip('/')
   93    93     else:
   94    94         return os.path.relpath(path)
   95    95 
@@ -347,7 +347,7 @@ class Filelist(List):
  347   347         self.set_path(os.getcwd())
  348   348 
  349   349     def get_title(self):
  350    -1         title = 'Filelist: %s/' % self.path
   -1   350         title = 'Filelist: %s/' % self.path.rstrip('/')
  351   351         if self.rsearch_str:
  352   352             title += 'search "%s"/' % self.rsearch_str
  353   353         return title