cplay-ng

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

commit
432e9b8a9b1955a7885f0e0608beeee80c904a4e
parent
82f109c6c09efece6d53638bdfaf1a69ee60a295
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2021-07-17 18:04
highlight playlist when dirty

Diffstat

M cplay.py 5 +++++

1 files changed, 5 insertions, 0 deletions


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

@@ -488,11 +488,14 @@ class Playlist(List):
  488   488         self.random = False
  489   489         self._played = set()
  490   490         self.path = None
   -1   491         self.items_written = []
  491   492 
  492   493     def get_title(self):
  493   494         title = 'Playlist'
  494   495         if self.path:
  495   496             title += ' ' + os.path.basename(self.path)
   -1   497             if self.items != self.items_written:
   -1   498                 title += '*'
  496   499         if self.repeat:
  497   500             title += ' [repeat all]'
  498   501         if self.random:
@@ -610,6 +613,7 @@ class Playlist(List):
  610   613         self.clear()
  611   614         self.add_playlist(path)
  612   615         self.path = path
   -1   616         self.items_written = self.items.copy()
  613   617 
  614   618     def write(self, path):
  615   619         try:
@@ -633,6 +637,7 @@ class Playlist(List):
  633   637         elif key == 'C':
  634   638             self.clear()
  635   639             self.path = None
   -1   640             self.items_written = []
  636   641         elif key == '\n':
  637   642             if not self.items:
  638   643                 return True