mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-28 06:22:45 -08:00
1.4 KiB
1.4 KiB
id, title, status, assignee, created_date, labels, milestone, dependencies, references, priority
| id | title | status | assignee | created_date | labels | milestone | dependencies | references | priority | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TASK-8 | Reduce MpvIpcClient deps interface and separate protocol from application logic | To Do | 2026-02-11 08:20 |
|
Codebase Clarity & Composability |
|
medium |
Description
MpvIpcClient (761 lines) in src/core/services/mpv-service.ts has a 22-property MpvIpcClientDeps interface that reaches back into main.ts state for application-level concerns (overlay visibility, subtitle timing, media path updates, OSD display).
The class mixes two responsibilities:
- IPC Protocol: Socket connection, JSON message framing, reconnection, property observation
- Application Integration: Subtitle text broadcasting, overlay visibility sync, timing tracking
Separating these would let the protocol layer be simpler and testable, while application-level reactions to mpv events could be handled by listeners/callbacks registered externally.
Acceptance Criteria
- #1 MpvIpcClient deps interface reduced to protocol-level concerns only
- #2 Application-level reactions (subtitle broadcast, overlay sync, timing) handled via event emitter or external listeners
- #3 MpvIpcClient is testable without mocking 22 callbacks
- #4 Existing behavior preserved