mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-10 20:47:03 +01:00
The stateless half of talking to mpv moves out:
_mpv_ipc.py read_reply, build_argv, encode, note_errors, and
probe_properties/query lifted out of MpvPlayer.probe/_query,
which only ever needed the socket path
_player_api.py the Player Protocol that ui.py actually depends on
player.py keeps the class that owns the process and the socket, and re-exports
Player/build_argv/encode through __all__.
_note_errors stays as a bound delegate on MpvPlayer: test_player.py calls it on
the instance, and the tests are out of scope here. Caught by the suite failing,
not by guessing.
The probe constants moved across verbatim -- _PROBE_ID is 9001, and read_reply
matches replies on it, so a placeholder would have made every probe hang until
timeout while still returning a plausible error string.
player.py 373 -> 235, _mpv_ipc.py 158, _player_api.py 49. 277 tests pass.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
|
||
|---|---|---|
| .. | ||
| android_ui | ||
| app_icons | ||
| archwiki_rag | ||
| artgate | ||
| billsplit_coverage | ||
| brother_printer | ||
| code_tutor | ||
| focus_policy | ||
| live_calc | ||
| morning_routine | ||
| random_jpg | ||
| shared | ||
| syncyomi_guard | ||
| tests | ||
| token_audit | ||
| wsg_grabber | ||
| __init__.py | ||
| .gitignore | ||
| conftest.py | ||