- commit
- 688021304addf92eade2b166c197e5249fe9a0c4
- parent
- db1031ed1a407e44c8392eb9c22344c3f65456a5
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2024-04-29 02:42
allow to start URLs with offset see https://www.w3.org/TR/media-frags/
Diffstat
| M | cplay.py | 8 | ++++++-- |
1 files changed, 6 insertions, 2 deletions
diff --git a/cplay.py b/cplay.py
@@ -216,8 +216,12 @@ class Player: 216 216 self._ipc('loadfile', self.path, 'replace', 'start=%i' % self.position) 217 217 218 218 def play(self, path):219 -1 self.path = path220 -1 self.position = 0-1 219 if path and (m := re.match(r'^(http.*)#t=([0-9]+)$', path)): -1 220 self.path = m[1] -1 221 self.position = float(m[2]) -1 222 else: -1 223 self.path = path -1 224 self.position = 0 221 225 self.length = 0 222 226 self._seek_step = 0 223 227 self._play()