Commit graph

21 commits

Author SHA1 Message Date
Damien Elmes
9e245ae621 apply black to all files 2019-12-23 10:34:10 +10:00
Damien Elmes
8095ad8e4b use isort to tidy up imports 2019-12-20 19:19:29 +10:00
Damien Elmes
de89c72511 remove typings from some other files
not used frequently enough to deal with the mypy errors they're causing
at the moment
2019-12-20 16:33:49 +10:00
Damien Elmes
9983774a12 add pytype inferred types to anki/
I've corrected some obvious issues, and we can fix others over time.
Mypy tests are currently broken, as adding the type hints has increased
mypy's testing surface.
2019-12-20 11:07:08 +10:00
Damien Elmes
53ffd13c98 mpv was passing separators incorrectly and unnecessarily 2019-12-16 17:54:40 +10:00
Damien Elmes
513aef78cf platform-specific imports 2019-12-16 17:51:33 +10:00
Damien Elmes
60afbcf62d 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
d1d7f230fe 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
8981da61c1 silence some spurious errors and remove some unused code 2019-03-04 11:22:40 +10:00
Damien Elmes
0c6cd8f1e8 restart mpv if it stops responding
https://anki.tenderapp.com/discussions/ankidesktop/31433-error
2018-12-13 21:30:17 +10:00
Dudemanguy911
0f6312ee68 force mpv --keep-open=no 2018-04-08 11:18:51 -05:00
Damien Elmes
fa3b70236c linux mpv doesn't understand --input-media-keys 2018-01-21 10:34:29 +10:00
Damien Elmes
39bc5d42ae fix mpv warnings 2017-12-11 17:26:25 +10:00
Damien Elmes
6a61516622 don't capture media keys 2017-10-13 13:11:22 +10:00
Damien Elmes
0fa24f4e0b probable fix for win32 startup errors; add timeout to mpv start 2017-10-13 12:14:40 +10:00
Damien Elmes
253dcd5e1f don't show album artwork 2017-10-05 14:35:58 +10:00
Damien Elmes
1edcafcd5d add coding: line to mpv.py for xgettext 2017-10-02 16:41:14 +10:00
Damien Elmes
c9aac25fba integrate _packagedCmd() into mpv for binary distrib 2017-10-02 16:37:52 +10:00
Damien Elmes
975f19b642 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
5c4296d41c 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
4f0afb0a20 add mpv.py 2017-09-30 19:29:48 +10:00