mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-27 18:22:41 -08:00
1.8 KiB
1.8 KiB
id, title, status, assignee, created_date, updated_date, labels, milestone, dependencies, references, priority
| id | title | status | assignee | created_date | updated_date | labels | milestone | dependencies | references | priority | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TASK-8 | Reduce MpvIpcClient deps interface and separate protocol from application logic | Done | 2026-02-11 08:20 | 2026-02-15 07:00 |
|
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
Final Summary
Superseded by TASK-27.4 which absorbed this task's full scope (protocol/application separation, deps interface reduction from 22 properties to protocol-level concerns, event-based app reactions). All acceptance criteria met by TASK-27.4.