mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-27 18:22:41 -08:00
2.2 KiB
2.2 KiB
id, title, status, assignee, created_date, updated_date, labels, dependencies, priority
| id | title | status | assignee | created_date | updated_date | labels | dependencies | priority |
|---|---|---|---|---|---|---|---|---|
| TASK-21 | Persist and restore MPV secondary subtitle visibility across app lifecycle | Done | 2026-02-13 07:59 | 2026-02-13 08:01 | high |
Description
When SubMiner connects to MPV, capture the current MPV secondary-sub-visibility value and force it off. Keep it off during SubMiner runtime regardless of overlay visibility toggles. On app shutdown (and MPV shutdown event when possible), restore MPV secondary-sub-visibility to the captured pre-SubMiner value.
Acceptance Criteria
- #1 Capture MPV
secondary-sub-visibilityonce per MPV connection before overriding it. - #2 Set MPV
secondary-sub-visibilitytonoafter capture regardless ofbind_visible_overlay_to_mpv_sub_visibility. - #3 Do not mutate/restore secondary MPV visibility as a side effect of visible overlay toggles.
- #4 Restore captured secondary MPV visibility on app shutdown while MPV is connected.
- #5 Attempt restore on MPV shutdown event before disconnect and clear captured state afterward.
Final Summary
Implemented MPV secondary subtitle visibility lifecycle management:
- Moved secondary-sub visibility capture/disable to MPV connection initialization (
getInitialStaterequestssecondary-sub-visibility, then request handler stores prior value and forcessecondary-sub-visibility=no). - Removed secondary-sub visibility side effects from visible overlay visibility service so overlay toggles no longer capture/restore secondary MPV state.
- Added
restorePreviousSecondarySubVisibility()toMpvIpcClient, invoked on MPVshutdownevent and from apponWillQuitCleanup(best effort while connected). - Wired new dependency getter/setter in main runtime bootstrap for tracked previous secondary visibility state.
- Added unit coverage in
mpv-service.test.tsfor capture/disable and restore/clear behavior. - Verified with
pnpm run buildandnode --test dist/core/services/mpv-service.test.js.