cplay-ng

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

commit
d2f6d5bf1ce251ba006d3ae422451eb119fd97df
parent
33c839800028faa8d404042021ea1e5bfddbd3af
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2021-06-17 20:37
do not share pipes among Player instances

Diffstat

M cplay.py 8 ++++----

1 files changed, 4 insertions, 4 deletions


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

@@ -125,10 +125,6 @@ def listdir(path):
  125   125 class Player:
  126   126     re_progress = re.compile(br'AV?: (\d+):(\d+):(\d+) / (\d+):(\d+):(\d+)')
  127   127 
  128    -1     stdin_r, stdin_w = os.pipe()
  129    -1     stdout_r, stdout_w = os.pipe()
  130    -1     stderr_r, stderr_w = os.pipe()
  131    -1 
  132   128     def __init__(self):
  133   129         self._proc = None
  134   130         self.path = None
@@ -137,6 +133,10 @@ class Player:
  137   133         self._seek_step = 0
  138   134         self._seek_timeout = None
  139   135 
   -1   136         self.stdin_r, self.stdin_w = os.pipe()
   -1   137         self.stdout_r, self.stdout_w = os.pipe()
   -1   138         self.stderr_r, self.stderr_w = os.pipe()
   -1   139 
  140   140     def parse_progress(self, fd):
  141   141         match = self.re_progress.search(os.read(fd, 512))
  142   142         if match and not self._seek_step: