Commit graph

17 commits

Author SHA1 Message Date
Damien Elmes
67d8284a33 mpv was passing separators incorrectly and unnecessarily 2019-12-16 17:54:40 +10:00
Damien Elmes
d2f4450dc0 platform-specific imports 2019-12-16 17:51:33 +10:00
Damien Elmes
9fb5a3257c daemonize helper threads so that sys.exit() during startup works
with daemonize set to False, the app hangs waiting on the helper threads
2019-04-29 14:36:44 +10:00
Damien Elmes
7df402b006 catch full mpv request queue
presumably happening if multiple requests are sent before previous
response fetch times out

Caught exception:
  File "aqt/webview.py", line 314, in handler
  File "aqt/editor.py", line 351, in <lambda>
  File "aqt/addcards.py", line 225, in afterSave
  File "aqt/addcards.py", line 231, in doClose
  File "aqt/addcards.py", line 210, in _reject
  File "anki/sound.py", line 417, in clearAudioQueue
  File "anki/sound.py", line 117, in clearQueue
  File "anki/mpv.py", line 558, in command
  File "anki/mpv.py", line 352, in _send_request
  File "anki/mpv.py", line 311, in _send_message
<class 'anki.mpv.MPVTimeoutError'>: unable to put request
2019-04-21 18:56:11 +10:00
Damien Elmes
3721cc4604 silence some spurious errors and remove some unused code 2019-03-04 11:22:40 +10:00
Damien Elmes
727570418c restart mpv if it stops responding
https://anki.tenderapp.com/discussions/ankidesktop/31433-error
2018-12-13 21:30:17 +10:00
Dudemanguy911
63b6ffea44 force mpv --keep-open=no 2018-04-08 11:18:51 -05:00
Damien Elmes
bb6844716c linux mpv doesn't understand --input-media-keys 2018-01-21 10:34:29 +10:00
Damien Elmes
576c2b38b2 fix mpv warnings 2017-12-11 17:26:25 +10:00
Damien Elmes
ec9c2476a3 don't capture media keys 2017-10-13 13:11:22 +10:00
Damien Elmes
519187e941 probable fix for win32 startup errors; add timeout to mpv start 2017-10-13 12:14:40 +10:00
Damien Elmes
d3233f2446 don't show album artwork 2017-10-05 14:35:58 +10:00
Damien Elmes
f9f5a3d9f6 add coding: line to mpv.py for xgettext 2017-10-02 16:41:14 +10:00
Damien Elmes
ca95552408 integrate _packagedCmd() into mpv for binary distrib 2017-10-02 16:37:52 +10:00
Damien Elmes
e8b4d276b4 use named pipes for mpv on windows
currently using non-blocking mode which involves a sleep in the read
loop - overlapped i/o might be a better option in the future
2017-09-30 19:32:48 +10:00
Damien Elmes
bb661a4b7d mpv.py fixes
- enable input keys for video seeking
- output debug info to stdout so it's not caught by anki's error handler
- before sending a command, check the process is still alive, and
restart if necessary - otherwise a user who closes a video window will
end up with errors
2017-09-30 19:29:48 +10:00
Damien Elmes
e7d9d1264d add mpv.py 2017-09-30 19:29:48 +10:00