cplay-ng

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

commit
35a37e600b1b6eee84614cac13ac7b118cfa0867
parent
8e10b92cd1ed4945f1910806b547b7076b0d5189
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2020-09-03 18:00
chdir to filelist path

Diffstat

M cplay.py 5 +++--

1 files changed, 3 insertions, 2 deletions


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

@@ -250,7 +250,7 @@ class List:
  250   250 
  251   251     def format_item(self, item, force_verbose=False):
  252   252         if app.verbose or force_verbose:
  253    -1             name = os.path.relpath(item, filelist.path)
   -1   253             name = os.path.relpath(item)
  254   254         else:
  255   255             name = os.path.basename(item)
  256   256         if os.path.isdir(item):
@@ -327,6 +327,7 @@ class Filelist(List):
  327   327     def set_path(self, path, prev=None):
  328   328         if path != self.path:
  329   329             self.path = path
   -1   330             os.chdir(path)
  330   331             self.search_cache = []
  331   332         self.all_items = []
  332   333         self.input.str = ''
@@ -602,7 +603,7 @@ class Application:
  602   603         elif self.tab == filelist and filelist.input.active:
  603   604             status = 'search: %s' % filelist.input.str
  604   605         elif player.path and player._proc:
  605    -1             status = 'Playing %s' % os.path.relpath(player.path, filelist.path)
   -1   606             status = 'Playing %s' % os.path.relpath(player.path)
  606   607         else:
  607   608             status = ''
  608   609