mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-04-09 04:19:27 -07:00
Compare commits
4 Commits
7a64488ed5
...
9b4de93283
| Author | SHA1 | Date | |
|---|---|---|---|
|
9b4de93283
|
|||
|
16ffbbc4b3
|
|||
|
de4f3efa30
|
|||
|
|
bc7dde3b02 |
10
CHANGELOG.md
10
CHANGELOG.md
@@ -1,5 +1,15 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## v0.11.2 (2026-04-07)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Launcher: Replaced the launcher-only fullscreen toggle with `mpv.launchMode` so SubMiner-managed mpv playback can start in normal, maximized, or fullscreen mode.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Launcher: Fixed launcher-managed mpv spawning to force an explicit X11 GPU path when Wayland trackers are unavailable.
|
||||||
|
- Launcher: Local playback now promotes a single unlabeled external subtitle sidecar to the primary slot instead of leaving mpv's embedded English auto-selection in place.
|
||||||
|
- Release: Fixed Linux AppImage startup packaging so Chromium child relaunches can resolve the bundled `libffmpeg.so` instead of crash-looping on startup.
|
||||||
|
|
||||||
## v0.11.1 (2026-04-04)
|
## v0.11.1 (2026-04-04)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ Browse sibling episode files and the active mpv queue in one overlay modal. Open
|
|||||||
| Hyprland (`hyprctl`) · X11/Xwayland (`xdotool` + `xwininfo`) | Accessibility permission | No extra deps |
|
| Hyprland (`hyprctl`) · X11/Xwayland (`xdotool` + `xwininfo`) | Accessibility permission | No extra deps |
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> **Wayland support is compositor-specific.** Wayland has no universal API for window positioning and each compositor exposes its own IPC, so SubMiner needs a dedicated backend per compositor. Hyprland is the only native Wayland backend supported currenlty. All other Linux compositors require both mpv and SubMiner to run under X11 or Xwayland.
|
> **Wayland support is compositor-specific.** Wayland has no universal API for window positioning and each compositor exposes its own IPC, so SubMiner needs a dedicated backend per compositor. Hyprland is the only native Wayland backend supported currenlty. All other Linux compositors require both mpv and SubMiner to run under X11 or Xwayland. The launcher detects your compositor and configures this automatically.
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary><b>Arch Linux</b></summary>
|
<summary><b>Arch Linux</b></summary>
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
type: fixed
|
|
||||||
area: launcher
|
|
||||||
|
|
||||||
- Fixed launcher-managed mpv spawning to force an explicit X11 GPU path when Wayland trackers are unavailable.
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
type: fixed
|
|
||||||
area: launcher
|
|
||||||
|
|
||||||
Local playback now promotes a single unlabeled external subtitle sidecar to the primary slot instead of leaving mpv's embedded English auto-selection in place.
|
|
||||||
@@ -12,10 +12,21 @@ area: overlay
|
|||||||
- Added auto-pause toggle when opening the popup.
|
- Added auto-pause toggle when opening the popup.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For breaking changes, add `breaking: true`:
|
||||||
|
|
||||||
|
```md
|
||||||
|
type: changed
|
||||||
|
area: config
|
||||||
|
breaking: true
|
||||||
|
|
||||||
|
- Renamed `foo.bar` to `foo.baz`.
|
||||||
|
```
|
||||||
|
|
||||||
Rules:
|
Rules:
|
||||||
|
|
||||||
- `type` required: `added`, `changed`, `fixed`, `docs`, or `internal`
|
- `type` required: `added`, `changed`, `fixed`, `docs`, or `internal`
|
||||||
- `area` required: short product area like `overlay`, `launcher`, `release`
|
- `area` required: short product area like `overlay`, `launcher`, `release`
|
||||||
|
- `breaking` optional: set to `true` to flag as a breaking change
|
||||||
- each non-empty body line becomes a bullet
|
- each non-empty body line becomes a bullet
|
||||||
- `README.md` is ignored by the generator
|
- `README.md` is ignored by the generator
|
||||||
- if a PR should not produce release notes, apply the `skip-changelog` label instead of adding a fragment
|
- if a PR should not produce release notes, apply the `skip-changelog` label instead of adding a fragment
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
type: fixed
|
|
||||||
area: release
|
|
||||||
|
|
||||||
- Fixed Linux AppImage startup packaging so Chromium child relaunches can resolve the bundled `libffmpeg.so` instead of crash-looping on startup.
|
|
||||||
@@ -461,10 +461,12 @@
|
|||||||
// ==========================================
|
// ==========================================
|
||||||
// MPV Launcher
|
// MPV Launcher
|
||||||
// Optional mpv.exe override for Windows playback entry points.
|
// Optional mpv.exe override for Windows playback entry points.
|
||||||
|
// Set mpv.launchMode to choose normal, maximized, or fullscreen SubMiner-managed mpv playback.
|
||||||
// Leave mpv.executablePath blank to auto-discover mpv.exe from SUBMINER_MPV_PATH or PATH.
|
// Leave mpv.executablePath blank to auto-discover mpv.exe from SUBMINER_MPV_PATH or PATH.
|
||||||
// ==========================================
|
// ==========================================
|
||||||
"mpv": {
|
"mpv": {
|
||||||
"executablePath": "" // Optional absolute path to mpv.exe for Windows launch flows. Leave empty to auto-discover from SUBMINER_MPV_PATH or PATH.
|
"executablePath": "", // Optional absolute path to mpv.exe for Windows launch flows. Leave empty to auto-discover from SUBMINER_MPV_PATH or PATH.
|
||||||
|
"launchMode": "normal" // Default window state for SubMiner-managed mpv launches. Values: normal | maximized | fullscreen
|
||||||
}, // Optional mpv.exe override for Windows playback entry points.
|
}, // Optional mpv.exe override for Windows playback entry points.
|
||||||
|
|
||||||
// ==========================================
|
// ==========================================
|
||||||
|
|||||||
@@ -1,148 +1,364 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## v0.11.2 (2026-04-07)
|
||||||
|
|
||||||
|
**Changed**
|
||||||
|
- Launcher: Replaced the launcher-only fullscreen toggle with `mpv.launchMode` so SubMiner-managed mpv playback can start in normal, maximized, or fullscreen mode.
|
||||||
|
|
||||||
|
**Fixed**
|
||||||
|
- Launcher: Fixed launcher-managed mpv spawning to force an explicit X11 GPU path when Wayland trackers are unavailable.
|
||||||
|
- Launcher: Local playback now promotes a single unlabeled external subtitle sidecar to the primary slot instead of leaving mpv's embedded English auto-selection in place.
|
||||||
|
- Release: Fixed Linux AppImage startup packaging so Chromium child relaunches can resolve the bundled `libffmpeg.so` instead of crash-looping on startup.
|
||||||
|
|
||||||
## v0.11.1 (2026-04-04)
|
## v0.11.1 (2026-04-04)
|
||||||
|
|
||||||
- Fixed Linux packaged builds to expose the canonical `SubMiner` app identity to Electron's startup metadata so native Wayland compositors stop reporting the window class/app-id as lowercase `subminer`.
|
**Fixed**
|
||||||
- Fixed Linux to restore the runtime options, Jimaku, and Subsync shortcuts after the Electron 39 regression by routing those actions through the overlay's mpv/IPC shortcut path.
|
- Release: Linux packaged builds now expose the canonical `SubMiner` app identity to Electron's startup metadata so native Wayland compositors stop reporting the window class/app-id as lowercase `subminer`.
|
||||||
|
- Linux: Linux now restores the runtime options, Jimaku, and Subsync shortcuts after the Electron 39 regression by routing those actions through the overlay's mpv/IPC shortcut path.
|
||||||
|
|
||||||
## v0.11.0 (2026-04-03)
|
## v0.11.0 (2026-04-03)
|
||||||
|
|
||||||
- Added a playlist browser overlay modal for browsing sibling video files and the live mpv queue during playback, with a default `Ctrl+Alt+P` keybinding.
|
**Added**
|
||||||
- Made mpv plugin installation mandatory in first-run setup (removed skip path); Finish stays disabled until the plugin is installed.
|
- Overlay: Added a playlist browser overlay modal for browsing sibling video files and the live mpv queue during playback.
|
||||||
- Fixed the Windows `SubMiner mpv` shortcut to launch mpv with required default args directly instead of requiring an `mpv.conf` profile named `subminer`.
|
- Overlay: Added the default `Ctrl+Alt+P` keybinding to open the playlist browser and manage queue order without leaving playback.
|
||||||
- Fixed the Windows mpv idle launch so loading a video after opening the shortcut keeps mpv in the SubMiner-managed session and auto-starts the overlay.
|
|
||||||
- Added a blank-by-default `mpv.executablePath` config override for Windows playback when mpv is not on `PATH`, exposed in first-run setup.
|
|
||||||
- Fixed Kiku duplicate grouping to reuse duplicate note IDs from both sentence-card creation and Yomitan popup mining, with background card addition and proper merge-modal sequencing.
|
|
||||||
- Fixed configured subtitle-jump keybindings to keep playback paused when invoked from a paused state.
|
|
||||||
- Fixed managed local subtitle auto-selection to reuse configured language priorities instead of staying on mpv's initial `sid=auto` guess.
|
|
||||||
- Kept tracked macOS visible overlays click-through by default so subtitle sidebar passthrough works immediately.
|
|
||||||
- Stopped AniList post-watch from sending duplicate progress updates when already satisfied by a retry item.
|
|
||||||
- Kept integrated `--start --texthooker` launches on the full app-ready startup path.
|
|
||||||
- Honored `SUBMINER_YTDLP_BIN` consistently across all YouTube flows (playback URL resolution, track probing, subtitle downloads, metadata probing).
|
|
||||||
- Added `windows` as a recognized launcher backend option and auto-detection target.
|
|
||||||
- Added a dedicated Subtitle Sidebar guide to the docs site with links from homepage and configuration docs.
|
|
||||||
|
|
||||||
## v0.10.0 (2026-03-29)
|
**Changed**
|
||||||
|
- Setup: Made mpv plugin installation mandatory in the first-run setup flow, removed the skip path, and kept Finish disabled until the plugin is installed.
|
||||||
|
- Setup: Clarified that the mpv plugin requirement applies to setup on every platform, while the optional `SubMiner mpv` shortcut remains the recommended Windows playback entry point.
|
||||||
|
- Launcher: Streamlined Windows setup and config by making the `SubMiner mpv` shortcut self-contained and keeping `mpv.executablePath` as the simple fallback when `mpv.exe` is not on `PATH`.
|
||||||
|
- Overlay: Changed fresh-install default config to keep texthooker and stats from auto-opening browser tabs.
|
||||||
|
- Overlay: Changed fresh-install default config to enable AnkiConnect, Discord Rich Presence, subtitle-sidebar, and Yomitan-popup auto-pause by default, while disabling controller input by default.
|
||||||
|
|
||||||
- Fixed stats startup so the immersion tracker can run when `Bun.serve` is unavailable.
|
**Fixed**
|
||||||
- Added a Node `http` fallback for Electron/runtime paths that do not expose Bun, so stats keeps working there too.
|
- Main: Resolve the YouTube playback socket path lazily so startup honors CLI and config overrides.
|
||||||
- Updated Discord Rich Presence to the maintained `@xhayper/discord-rpc` wrapper.
|
- Main: Add regression coverage for the lazy socket-path lookup during Windows mpv startup.
|
||||||
- Fixed the macOS visible-overlay toggle path so manual hides stay hidden and the plugin uses the explicit visible-overlay toggle command.
|
- Main: Keep integrated `--start --texthooker` launches on the full app-ready startup path so the texthooker page and websocket servers start together during normal playback startup.
|
||||||
- Restored macOS mpv passthrough while the overlay subtitle sidebar is open so clicks outside the sidebar can refocus mpv and keep native keybindings working.
|
- Main: Stop the mpv/plugin auto-start flow from spawning a separate standalone texthooker helper during normal `subminer <video>` launches.
|
||||||
|
- Overlay: Keep tracked macOS visible overlays click-through by default so subtitle sidebar passthrough works immediately without requiring a subtitle hover cycle first.
|
||||||
|
- Overlay: Add regression coverage for the macOS visible-overlay passthrough default.
|
||||||
|
- Anilist: Stop AniList post-watch from sending a second progress update when the current episode was already satisfied by a ready retry item in the same watch-completion pass.
|
||||||
|
- Anilist: Add regression coverage for the retry-queue plus live-update duplicate path.
|
||||||
|
- Overlay: Fixed Kiku duplicate grouping to reuse duplicate note IDs from both generic sentence-card creation and Yomitan popup mining instead of running extra duplicate scans after add.
|
||||||
|
- Overlay: Fixed the Yomitan popup mining flow to add cards in the background while keeping the stock popup progress feedback, then pause playback and close the lookup popup before the Kiku merge modal opens.
|
||||||
|
- Overlay: Fixed configured subtitle-jump keybindings so backward and forward subtitle seeks keep playback paused when invoked from a paused state.
|
||||||
|
- Launcher: Fixed the Windows `SubMiner mpv` shortcut and `SubMiner.exe --launch-mpv` flow to launch mpv with SubMiner's required default args directly instead of requiring an `mpv.conf` profile named `subminer`.
|
||||||
|
- Launcher: Clarified the Windows install and usage docs so the shortcut path is documented as self-contained, while the optional `subminer` mpv profile remains available for manual mpv launches.
|
||||||
|
- Launcher: Hardened the first-run setup blocker copy and stale custom-scheme handling so setup messages stay aligned with config, plugin, and dictionary readiness.
|
||||||
|
- Launcher: Fixed the Windows `SubMiner mpv` shortcut idle launch so loading a video after opening the shortcut keeps mpv in the expected SubMiner-managed session, auto-starts the overlay, and re-arms subtitle auto-selection for the newly opened file.
|
||||||
|
- Launcher: Removed the redundant `.` subtitle search path from the Windows shortcut launch args and deduped repeated subtitle source tracks in the manual sync picker so duplicate external subtitle entries no longer appear from the shortcut path.
|
||||||
|
- Playback: Fixed managed local playback so duplicate startup-ready retries no longer unpause media after a later manual pause on the same file.
|
||||||
|
- Playback: Fixed managed local subtitle auto-selection so local files reuse configured primary and secondary subtitle language priorities instead of staying on mpv's initial `sid=auto` guess.
|
||||||
|
- Launcher: Added a blank-by-default `mpv.executablePath` override for Windows playback so users can point SubMiner at `mpv.exe` when it is not on `PATH`.
|
||||||
|
- Launcher: Kept the Windows shortcut and `--launch-mpv` flow simple by preserving PATH auto-discovery as the default and exposing the override in first-run setup.
|
||||||
|
- Launcher: Added `windows` as a recognized launcher backend option and auto-detection target on Windows.
|
||||||
|
- Launcher: Honored `SUBMINER_YTDLP_BIN` consistently across YouTube playback URL resolution, track probing, subtitle downloads, and metadata probing.
|
||||||
|
- Launcher: Kept the first-run setup window from navigating away on unexpected URLs.
|
||||||
|
- Launcher: Made Windows mpv honor an explicitly configured executable path instead of silently falling back to PATH.
|
||||||
|
- Launcher: Hardened `--launch-mpv` parsing and Windows binary resolution so valueless flags do not swallow media targets and symlinked launcher installs do not short-circuit PATH lookup.
|
||||||
|
- Launcher: Fixed first-run setup blocking playback on macOS when the SubMiner mpv plugin was already installed at the canonical `~/.config/mpv` path.
|
||||||
|
- Launcher: Fixed setup gating so stale cancelled setup state no longer prevents playback when the canonical mpv plugin entrypoint already exists.
|
||||||
|
- Playback: Prevented stale async playlist-browser subtitle rearm callbacks from overriding newer subtitle selections during rapid file changes.
|
||||||
|
|
||||||
## v0.9.3 (2026-03-25)
|
**Docs**
|
||||||
|
- Docs Site: Added a dedicated Subtitle Sidebar guide and linked it from the homepage and configuration docs.
|
||||||
|
- Docs Site: Linked Jimaku integration from the homepage to its dedicated docs page.
|
||||||
|
- Docs Site: Refreshed docs-site theme tokens and hover/selection styling for the updated pages.
|
||||||
|
|
||||||
- Moved YouTube primary subtitle language defaults to `youtube.primarySubLanguages`.
|
**Internal**
|
||||||
- Removed the placeholder YouTube subtitle retime step; downloaded primary subtitle tracks are now used directly.
|
- Release: Retried AUR clone and push operations in the tagged release workflow.
|
||||||
- Removed the old internal YouTube retime helper and its tests.
|
- Release: Kept GitHub Releases green when AUR publish flakes and needs manual follow-up.
|
||||||
- Clarified optional `alass` / `ffsubsync` subtitle-sync setup and fallback behavior in the docs.
|
- Release: Updated Electron to 39.8.6 and pinned patched transitive build dependencies to clear the reported high-severity audit findings.
|
||||||
- Removed the legacy `youtubeSubgen.primarySubLanguages` config path from generated config and docs.
|
|
||||||
|
|
||||||
## v0.9.2 (2026-03-25)
|
## Previous Versions
|
||||||
|
|
||||||
- Fixed overlay pointer tracking so Windows click-through toggles immediately when the cursor enters or leaves subtitle regions.
|
<details>
|
||||||
- Fixed Windows overlay window tracking on scaled displays by converting native tracked window bounds to Electron DIP coordinates.
|
<summary>v0.10.x</summary>
|
||||||
- Fixed Windows direct `--youtube-play` startup so MPV boots reliably, stays paused until the app-owned subtitle flow is ready, and reuses an already-running SubMiner instance.
|
|
||||||
- Fixed standalone Windows `--youtube-play` sessions so closing MPV fully exits SubMiner instead of leaving hidden overlay windows behind.
|
|
||||||
- Fixed `subminer <youtube-url>` on Linux so the YouTube playback flow waits for Yomitan to load before creating the overlay window.
|
|
||||||
|
|
||||||
## v0.9.1 (2026-03-24)
|
<h2>v0.10.0 (2026-03-29)</h2>
|
||||||
|
|
||||||
- Reduced packaged release size by excluding duplicate `extraResources` payload and pruning docs, tests, sourcemaps, and other source-only files from Electron bundles.
|
**Changed**
|
||||||
- Restored controller navigation and lookup/mining controls while the subtitle sidebar is open, while keeping true modal dialogs blocking controller actions.
|
- Integrations: Replaced the deprecated Discord Rich Presence wrapper with the maintained `@xhayper/discord-rpc` package.
|
||||||
- Fixed subtitle annotation clearing so explanatory contrast endings like `んですけど` are excluded consistently across the shared tokenizer filter and annotation stage.
|
|
||||||
|
|
||||||
## v0.9.0 (2026-03-23)
|
**Fixed**
|
||||||
|
- Stats: Fixed stats startup so the immersion tracker can run when `Bun.serve` is unavailable.
|
||||||
|
- Stats: Stats server now falls back to a Node `http` listener in Electron/runtime paths that do not expose Bun.
|
||||||
|
- Overlay: Fixed the macOS visible-overlay toggle path so manual hides stay hidden and the plugin uses the explicit visible-overlay toggle command.
|
||||||
|
- Subtitle Sidebar: Restored macOS mpv passthrough while the overlay subtitle sidebar is open so clicks outside the sidebar can refocus mpv and keep native keybindings working.
|
||||||
|
|
||||||
- Added an app-owned YouTube subtitle flow with absPlayer-style timedtext parsing that auto-loads the default primary subtitle plus a best-effort secondary at startup and resumes once the primary is ready.
|
**Internal**
|
||||||
- Added a manual YouTube subtitle picker on `Ctrl+Alt+C` so subtitle selection can be retried on demand during active YouTube playback.
|
- Release: Added a maintained source coverage lane that shards Bun coverage one test file at a time and merges LCOV output into `coverage/test-src/lcov.info`.
|
||||||
- Added yt-dlp metadata probing so YouTube playback and immersion tracking record canonical video title and channel metadata.
|
- Release: CI and release quality-gate now upload the merged source-lane LCOV artifact for inspection.
|
||||||
- Disabled conflicting mpv native subtitle auto-selection for the app-owned flow so injected explicit tracks stay authoritative.
|
- Runtime: Extracted remaining inline runtime logic from `src/main.ts` into dedicated runtime modules and composer helpers.
|
||||||
- Added OSD status updates covering YouTube playback startup, subtitle acquisition, and subtitle loading.
|
- Runtime: Added focused regression tests for the extracted runtime/composer boundaries.
|
||||||
- Stopped forcing `--ytdl-raw-options=` before user-provided mpv options so existing YouTube cookie integrations are preserved.
|
- Runtime: Updated task tracking notes to mark TASK-238.6 complete and confirm follow-on boot-phase split can be deferred.
|
||||||
- Improved sidebar startup/resume behavior, scroll handling, and overlay/sidebar subtitle synchronization.
|
- Runtime: Split `src/main.ts` boot wiring into dedicated `src/main/boot/services.ts`, `src/main/boot/runtimes.ts`, and `src/main/boot/handlers.ts` modules.
|
||||||
- Stats Library tab now shows YouTube video title, channel name, and thumbnail for YouTube media entries.
|
- Runtime: Added focused tests for the new boot-phase seams and kept the startup/typecheck/build verification lanes green.
|
||||||
- Added a new WebSocket / Texthooker API integration guide covering payload formats, custom client patterns, and mpv plugin automation.
|
- Runtime: Updated internal architecture/task docs to record the boot-phase split and new ownership boundary.
|
||||||
- Fixed Anki media mining for mpv YouTube streams so audio and screenshot capture work correctly during YouTube playback sessions.
|
|
||||||
- Fixed YouTube media path handling in immersion tracking so YouTube sessions record correct media references and AniList state transitions do not fire for YouTube media.
|
|
||||||
- Reused existing authoritative YouTube subtitle tracks when present, fell back only for missing sides, and kept native mpv secondary subtitle rendering hidden so the overlay remains the visible secondary subtitle surface.
|
|
||||||
|
|
||||||
## v0.8.0 (2026-03-22)
|
</details>
|
||||||
|
|
||||||
- Added a configurable subtitle sidebar feature (`subtitleSidebar`) with overlay/embedded rendering, click-to-seek cue list, and hot-reloadable visibility and behavior controls.
|
<details>
|
||||||
- Added a rendered sidebar modal with cue list display, click-to-seek, active-cue highlighting, and embedded layout support.
|
<summary>v0.9.x</summary>
|
||||||
- Added sidebar snapshot plumbing between main and renderer for overlay/sidebar synchronization.
|
|
||||||
- Added sidebar configuration options for visibility and behavior (enabled, layout, toggle key, autoOpen, pauseOnHover, autoScroll) plus typography and sizing controls.
|
|
||||||
- Documented `subtitleSidebar` configuration and behavior in user-facing docs (configuration.md, shortcuts.md, config.example.jsonc).
|
|
||||||
- Updated subtitle prefetch/rendering flow to keep overlay and sidebar state in sync through media transitions.
|
|
||||||
- Kept sidebar cue tracking stable across playback transitions and timing edge cases.
|
|
||||||
- Fixed sidebar startup/resume positioning to jump directly to the first resolved active cue.
|
|
||||||
- Prevented stale subtitle refreshes from regressing active-cue state.
|
|
||||||
|
|
||||||
## v0.7.0 (2026-03-19)
|
<h2>v0.9.3 (2026-03-25)</h2>
|
||||||
|
|
||||||
- Added a full local immersion dashboard release line with Overview, Library, Trends, Vocabulary, and Sessions drill-down views backed by SQLite tracking data.
|
**Changed**
|
||||||
- Added browser-first stats workflows: `subminer stats`, background stats daemon controls (`-b` / `-s`), stats cleanup, and dashboard-side mining actions with media enrichment.
|
- Launcher: Moved YouTube primary subtitle language defaults to `youtube.primarySubLanguages`.
|
||||||
- Improved stats accuracy and scale handling with Yomitan token counts, full session timelines, known-word timeline fixes, cross-media vocabulary fixes, and clearer session charts.
|
- Launcher: Removed the placeholder YouTube subtitle retime step and now uses downloaded primary subtitle tracks directly, so there is no fake path rewrite before playback/sidebar loading.
|
||||||
- Improved overlay/runtime stability with quieter macOS fullscreen recovery, reduced repeated loading OSD popups, and better frequency/noise handling for subtitle annotations.
|
- YouTube: Removed the `src/core/services/youtube/retime` helper and its tests after retiring the internal retime strategy.
|
||||||
- Added launcher mpv-args passthrough plus Linux plugin wrapper-name fallback for packaged installs.
|
- Docs: Clarified optional `alass` / `ffsubsync` subtitle-sync requirements and setup steps, including fallback behavior when sync tools are absent.
|
||||||
- Added a hover-revealed ↗ button on Sessions tab rows to navigate directly to the anime media-detail view, with correct "Back to Sessions" back-navigation.
|
- Launcher: Removed the old `youtubeSubgen.primarySubLanguages` config path from the generated config and docs.
|
||||||
- Excluded auxiliary-stem `そうだ` grammar tails (MeCab POS3 `助動詞語幹`) from subtitle annotation metadata so frequency, JLPT, and N+1 styling no longer bleed onto grammar-tail tokens.
|
|
||||||
|
|
||||||
## v0.6.5 (2026-03-15)
|
<h2>v0.9.2 (2026-03-25)</h2>
|
||||||
|
|
||||||
- Seeded the AUR checkout with the repo `.SRCINFO` template before rewriting metadata so tagged releases do not depend on prior AUR state.
|
**Fixed**
|
||||||
|
- Overlay: Fixed overlay pointer tracking so Windows click-through toggles immediately when the cursor enters or leaves subtitle regions, without waiting for a later hover resync.
|
||||||
|
- Overlay: Fixed Windows overlay window tracking on scaled displays by converting native tracked window bounds to Electron DIP coordinates before applying overlay bounds.
|
||||||
|
- Launcher: Fixed Windows direct `--youtube-play` startup so MPV boots reliably, stays paused until the app-owned subtitle flow is ready, and reuses an already-running SubMiner instance when available.
|
||||||
|
- Launcher: Fixed standalone Windows `--youtube-play` sessions so closing MPV fully exits SubMiner instead of leaving hidden overlay windows or a background process behind.
|
||||||
|
- Overlay: Fixed `subminer <youtube-url>` on Linux so the YouTube playback flow waits for Yomitan to load before creating the overlay window, avoiding the broken lookup popup state that previously required a manual overlay refresh.
|
||||||
|
|
||||||
## v0.6.4 (2026-03-15)
|
<h2>v0.9.1 (2026-03-24)</h2>
|
||||||
|
|
||||||
- Reworked AUR metadata generation to update `.SRCINFO` directly instead of depending on runner `makepkg`, fixing tagged release publishing for `subminer-bin`.
|
**Changed**
|
||||||
|
- Release: Reduced packaged release size by excluding duplicate `extraResources` payload and pruning docs, tests, sourcemaps, and other source-only files from Electron bundles.
|
||||||
|
|
||||||
## v0.6.3 (2026-03-15)
|
**Fixed**
|
||||||
|
- Overlay: Restored controller navigation and lookup/mining controls while the subtitle sidebar is open, while keeping true modal dialogs blocking controller actions.
|
||||||
|
- Tokenizer: Fixed subtitle annotation clearing so explanatory contrast endings like `んですけど` are excluded consistently across the shared tokenizer filter and annotation stage.
|
||||||
|
|
||||||
- Expanded `Alt+C` into an inline controller config/remap flow with preferred-controller saving and per-action learn mode for buttons, triggers, and stick directions.
|
<h2>v0.9.0 (2026-03-23)</h2>
|
||||||
- Automated `subminer-bin` AUR package updates from the tagged release workflow.
|
|
||||||
|
|
||||||
## v0.6.2 (2026-03-12)
|
**Added**
|
||||||
|
- Docs: Added a new WebSocket / Texthooker API and integration guide covering WebSocket payloads, custom client patterns, mpv plugin automation, and webhook-style relay examples. Linked from configuration and mining workflow docs for easier discovery.
|
||||||
|
|
||||||
- Added `yomitan.externalProfilePath` so SubMiner can reuse another Electron app's Yomitan profile in read-only mode.
|
**Changed**
|
||||||
- Reused external Yomitan dictionaries/settings without writing back to that profile.
|
- Launcher: Added an app-owned YouTube subtitle flow that pauses mpv, uses absPlayer-style YouTube timedtext parsing/conversion to download subtitle tracks, and injects them as external files before playback resumes.
|
||||||
- Let launcher-managed playback honor external Yomitan config instead of forcing first-run setup.
|
- Launcher: Changed YouTube subtitle startup to auto-load the best-available primary and secondary subtitle tracks at launch instead of forcing the picker modal first. Secondary subtitle failures no longer block playback resume.
|
||||||
- Seeded `config.jsonc` even when the default config directory already exists.
|
- Launcher: Added `Ctrl+Alt+C` as the default keybinding to manually open the YouTube subtitle picker during active YouTube playback.
|
||||||
- Let first-run setup complete without internal dictionaries while external Yomitan is configured, then require an internal dictionary again only if that external profile is later removed.
|
- Launcher: Added yt-dlp metadata probing so YouTube playback and immersion tracking record canonical video title and channel metadata.
|
||||||
|
- Launcher: Stopped forcing `--ytdl-raw-options=` before user-provided mpv options so existing YouTube cookie integrations in user `--args` are no longer clobbered.
|
||||||
|
- Launcher: Disabled mpv native YouTube subtitle auto-loading for the app-owned flow so injected external subtitle files remain authoritative.
|
||||||
|
- Launcher: Added OSD status messages for YouTube playback startup, subtitle acquisition, and subtitle loading so the flow stays visible before and during the picker.
|
||||||
|
- Subtitle Sidebar: Added startup-auto-open controls and resume positioning improvements so the sidebar jumps directly to the first resolved active cue.
|
||||||
|
- Subtitle Sidebar: Improved subtitle prefetch and embedded overlay passthrough sync so sidebar and overlay subtitle states stay consistent across media transitions.
|
||||||
|
- Subtitle Sidebar: Updated scroll handling, embedded layout styling, and active-cue visual behavior.
|
||||||
|
- Stats: Stats Library tab now displays YouTube video title, channel name, and channel thumbnail for YouTube media entries, with retry logic to fill in metadata that arrives after initial load.
|
||||||
|
|
||||||
## v0.6.1 (2026-03-12)
|
**Fixed**
|
||||||
|
- Launcher: Fixed Anki media mining for mpv YouTube streams by unwrapping the stream URL so audio and screenshot capture work correctly for YouTube playback sessions.
|
||||||
|
- Immersion: Fixed YouTube media path handling in the immersion runtime and tracking so YouTube sessions record correct media references, AniList guessing skips YouTube URLs, and post-watch state transitions do not fire for YouTube media.
|
||||||
|
- Launcher: Fixed startup-launched YouTube playback so primary subtitle overlay updates continue after auto-load completes.
|
||||||
|
- Launcher: Fixed auto-loaded YouTube primary subtitles so parsed cues appear in the subtitle sidebar without needing a manual picker retry.
|
||||||
|
- Launcher: Fixed the YouTube picker to guard against duplicate subtitle submissions and tightened YouTube URL detection so follow-up runtime flows only treat real YouTube hosts as YouTube playback.
|
||||||
|
- Launcher: Fixed primary subtitle failure notifications being shown while app-owned YouTube subtitle probing and downloads are still in flight.
|
||||||
|
- Launcher: Preserved existing authoritative YouTube subtitle tracks when available; downloaded tracks are used only to fill missing sides, and native mpv secondary subtitle rendering is hidden so the overlay remains the sole secondary display.
|
||||||
|
|
||||||
- Added Chrome Gamepad API controller support for keyboard-only overlay mode.
|
</details>
|
||||||
- Added configurable controller bindings for lookup, mining, popup navigation, Yomitan audio, mpv pause, and d-pad fallback navigation.
|
|
||||||
- Added smooth, slower popup scrolling for controller navigation.
|
|
||||||
- Expanded `Alt+C` into a controller config/remap modal with preferred-controller saving, inline learn mode, and kept `Alt+Shift+C` for raw input debugging.
|
|
||||||
- Added a transient in-overlay controller-detected indicator when a controller is first found.
|
|
||||||
- Fixed cleanup of stale keyboard-only token highlights when keyboard-only mode is disabled or when the Yomitan popup closes.
|
|
||||||
- Added an enforced `verify:config-example` gate so checked-in example config artifacts cannot drift silently.
|
|
||||||
|
|
||||||
## v0.5.6 (2026-03-10)
|
<details>
|
||||||
|
<summary>v0.8.x</summary>
|
||||||
|
|
||||||
- Persisted merged character-dictionary MRU state as soon as a new retained set is built so revisits do not get dropped if later Yomitan import work fails.
|
<h2>v0.8.0 (2026-03-22)</h2>
|
||||||
- Fixed early Electron startup writing config and user data under a lowercase `~/.config/subminer` path instead of canonical `~/.config/SubMiner`.
|
|
||||||
- Kept JLPT underline colors stable during Yomitan hover and selection states, even when tokens also use known, N+1, name-match, or frequency styling.
|
|
||||||
|
|
||||||
## v0.5.1 (2026-03-09)
|
**Added**
|
||||||
|
- Overlay: Added the subtitle sidebar feature with a new `subtitleSidebar` configuration surface and rendered sidebar modal with cue list rendering, click-to-seek, active-cue highlighting, and embedded layout support.
|
||||||
|
- IPC: Added sidebar snapshot plumbing between renderer and main process for overlay/sidebar synchronization.
|
||||||
|
|
||||||
- Removed the old YouTube subtitle-generation mode switch; YouTube playback now resolves subtitles before mpv starts.
|
**Changed**
|
||||||
- Hardened YouTube AI subtitle fixing so fenced/text-only responses keep original cue timing.
|
- Config: Added hot-reloadable sidebar options for enablement, layout, visibility, typography, opacity, sizing, and interaction behavior (`autoOpen`, `pauseOnHover`, `autoScroll`, toggle key).
|
||||||
- Skipped AniSkip during URL/YouTube playback where anime metadata cannot be resolved reliably.
|
- Docs: Added full `subtitleSidebar` documentation coverage, including sample config, option table, and toggle shortcut notes.
|
||||||
- Kept the background SubMiner process warm across launcher-managed mpv exits so reconnects do not repeat startup pause/warmup work.
|
- Runtime: Improved subtitle prefetch/rendering flow so sidebar and overlay subtitle states stay in sync across media transitions.
|
||||||
- Fixed Windows single-instance reuse so overlay and video launches reuse the running background app instead of booting a second full app.
|
|
||||||
- Hardened the Windows signing/release workflow with SignPath retry handling for signed `.exe` and `.zip` artifacts.
|
|
||||||
|
|
||||||
## v0.5.0 (2026-03-08)
|
**Fixed**
|
||||||
|
- Overlay: Kept sidebar cue tracking stable across playback transitions and timing edge cases.
|
||||||
|
- Overlay: Improved sidebar resume/start behavior to jump directly to the first resolved active cue.
|
||||||
|
- Overlay: Stopped stale subtitle refreshes from regressing active-cue and text state.
|
||||||
|
|
||||||
- Added the initial packaged Windows release.
|
</details>
|
||||||
- Added Windows-native mpv window tracking, launcher/runtime plumbing, and packaged helper assets.
|
|
||||||
- Improved close behavior so ending playback hides the visible overlay while the background app stays running.
|
|
||||||
- Limited the native overlay outline/debug frame to debug mode on Windows.
|
|
||||||
|
|
||||||
## v0.3.0 (2026-03-05)
|
<details>
|
||||||
|
<summary>v0.7.x</summary>
|
||||||
|
|
||||||
|
<h2>v0.7.0 (2026-03-19)</h2>
|
||||||
|
|
||||||
|
**Added**
|
||||||
|
- Immersion: Added Mine Word, Mine Sentence, and Mine Audio buttons to word detail example lines in the stats dashboard.
|
||||||
|
- Immersion: Mine Word creates a full Yomitan card (definition, reading, pitch accent) via the hidden search page bridge, then enriches with sentence audio, screenshot, and metadata extracted from the source video.
|
||||||
|
- Immersion: Mine Sentence and Mine Audio create cards directly with appropriate Lapis/Kiku flags, sentence highlighting, and media from the source file.
|
||||||
|
- Immersion: Media generation (audio + image/AVIF) runs in parallel and respects all AnkiConnect config options.
|
||||||
|
- Immersion: Added word exclusion list to the Vocabulary tab with localStorage persistence and a management modal.
|
||||||
|
- Immersion: Fixed truncated readings in the frequency rank table (e.g. お前 now shows おまえ instead of まえ).
|
||||||
|
- Immersion: Clicking a bar in the Top Repeated Words chart now opens the word detail panel.
|
||||||
|
- Immersion: Secondary subtitle text is now stored alongside primary subtitle lines for use as translation when mining cards from the stats page.
|
||||||
|
- Stats: Added `subminer stats -b` to start or reuse a dedicated background stats server without blocking normal SubMiner instances.
|
||||||
|
- Stats: Added `subminer stats -s` to stop the dedicated background stats server without closing browser tabs.
|
||||||
|
- Stats: Stats server startup now reuses a running background stats daemon instead of trying to bind a second local server in another SubMiner instance.
|
||||||
|
- Launcher: Added launcher passthrough for `-a/--args` so mpv receives raw extra launch flags (`--fs`, `--ytdl-format`, custom audio/video settings, etc.) from the `subminer` command.
|
||||||
|
- Launcher: Added `subminer stats` to launch the local stats dashboard, force-start the stats server on demand, and open the dashboard in your browser.
|
||||||
|
- Launcher: Added `subminer stats cleanup` to backfill vocabulary metadata and prune stale or excluded immersion rows on demand.
|
||||||
|
- Launcher: Added `stats.autoOpenBrowser` so browser launch after `subminer stats` can be enabled or disabled explicitly.
|
||||||
|
- Immersion: Added a local stats dashboard for immersion tracking with Overview, Anime, Trends, Vocabulary, and Sessions views.
|
||||||
|
- Immersion: Added anime progress, episode completion, Anki card links, and occurrence drill-down across the stats dashboard.
|
||||||
|
- Immersion: Added richer session timelines with new-word activity, cumulative totals, and pause/seek/card event markers.
|
||||||
|
- Immersion: Added completed-episodes and completed-anime totals to the Overview tracking snapshot.
|
||||||
|
|
||||||
|
**Changed**
|
||||||
|
- Anki: Changed known-word cache settings to live under `ankiConnect.knownWords` instead of mixing them into `ankiConnect.nPlusOne`.
|
||||||
|
- Anki: Kept legacy `ankiConnect.nPlusOne` known-word keys and older `ankiConnect.behavior.nPlusOne*` keys as deprecated compatibility fallbacks.
|
||||||
|
- Stats: Added session deletion to the Sessions tab with the same confirmation prompt used by anime episode/session deletes, and removed all associated session rows from the stats database.
|
||||||
|
- Immersion: Kept immersion tracking history by default while preserving daily/monthly rollup maintenance.
|
||||||
|
- Immersion: Added exact lifetime summary reads for overview/anime/media stats so dashboard totals no longer depend on rescanning raw telemetry.
|
||||||
|
- Immersion: Reduced tracker storage overhead by removing duplicated subtitle text from subtitle-line event payloads.
|
||||||
|
- Immersion: Deduplicated episode cover-art blobs through a shared blob store and updated cover-art reads/writes to resolve shared images correctly.
|
||||||
|
- Immersion: Added indexes for large-history session, telemetry, vocabulary, kanji, and cover-art queries to keep dashboard reads fast as the SQLite database grows.
|
||||||
|
- Immersion: Renamed the stats dashboard's Anime tab to Library so the media browser label matches non-anime sources like YouTube and other yt-dlp-backed content.
|
||||||
|
- Anilist: Standardized episode completion threshold by introducing `DEFAULT_MIN_WATCH_RATIO` and using it for both local watched state transitions and AniList post-watch progress updates.
|
||||||
|
- Anilist: Episode auto-marking now uses the same threshold as AniList (`85%`), removing divergent completion behavior.
|
||||||
|
- Overlay: Excluded interjections and sound-effect tokens from subtitle annotation styling so they no longer inherit misleading lexical highlight treatment while still remaining visible and hoverable as plain subtitle tokens.
|
||||||
|
- Overlay: Expanded subtitle annotation noise filtering to also strip annotation metadata from standalone grammar-only helper tokens such as particles, auxiliaries, adnominals, common explanatory endings like `んです` / `のだ`, and merged trailing quote-particle forms like `...って` while keeping them tokenized for hover lookup.
|
||||||
|
|
||||||
|
**Fixed**
|
||||||
|
- Launcher: Fixed mpv Lua plugin binary auto-detection on Linux to also search `/usr/bin/subminer` and `/usr/local/bin/subminer` (lowercase), matching the conventional Unix wrapper name used by packaged installs such as the AUR package.
|
||||||
|
- Stats: Fixed the in-app stats overlay so it connects to the configured `stats.serverPort` instead of falling back to the default port.
|
||||||
|
- Overlay: Fixed subtitle frequency tagging for merged lookup-backed tokens like `陰に` by falling back to exact surface-form Yomitan frequencies when the normalized headword lookup misses.
|
||||||
|
- Overlay: Fixed MeCab merged-token position mapping across line breaks so merged content-plus-particle tokens like `陰に` keep their matched Yomitan frequency instead of inheriting shifted POS tags.
|
||||||
|
- Overlay: Fixed grouped frequency parsing in both Yomitan and fallback frequency-dictionary lookups so display values like `118,121` use the leading rank instead of collapsing the rank and occurrence count into `118121`.
|
||||||
|
- Overlay: Fixed frequency-rank ingestion to ignore Yomitan dictionaries explicitly marked `occurrence-based`, so raw occurrence counts are no longer treated as subtitle rank values.
|
||||||
|
- Overlay: Fixed inflected headword frequency tagging to prefer ranks from the selected Yomitan `termsFind` popup entry itself, ordered by configured dictionary priority, so forms like `潜み` use primary-dictionary ranks like `4073` before falling back to lower-priority raw lemma metadata such as `CC100`.
|
||||||
|
- Overlay: Fixed annotation-stage frequency filtering so exact kanji noun tokens like `者` keep their matched rank even when MeCab labels them `名詞/非自立`, instead of dropping the highlight after scan-time frequency lookup succeeds.
|
||||||
|
- Anki: Fixed repeated character-dictionary startup work by scheduling auto-sync only from mpv media-path changes instead of also re-triggering it from connection and media-title events for the same title.
|
||||||
|
- Overlay: Fixed macOS fullscreen overlay stability by keeping the passive visible overlay from stealing focus, re-raising the overlay window when reasserting its macOS topmost level, and tolerating one transient macOS tracker/helper miss before hiding the overlay.
|
||||||
|
- Overlay: Kept subtitle tokenization warmup one-shot for the lifetime of the app so later fullscreen/media churn on macOS does not replay the startup warmup gate after the first file is ready.
|
||||||
|
- Overlay: Added a bounded macOS tracker loss-grace window so fullscreen enter/leave transitions do not immediately hide and reload the overlay when the helper briefly loses the mpv window.
|
||||||
|
- Overlay: Skipped subtitle/tokenization refresh invalidation on character-dictionary auto-sync completion when the dictionary was already current, preventing startup flash/reload loops on unchanged media.
|
||||||
|
- Stats: Fixed session stats so known-word counts track real known-word occurrences without collapsing subtitle-line gaps.
|
||||||
|
- Stats: Fixed session word totals in session-facing stats views to prefer token counts when available, preventing known words from exceeding total words in the session chart.
|
||||||
|
- Stats: Fixed the stats Vocabulary tab blank-screen regression caused by a hook-order crash after vocabulary data finished loading.
|
||||||
|
- Anki: Fixed card-mine OSD feedback so the final mine result stops the Anki spinner first, then shows a single-line `✓`/`x` status without being overwritten by a later spinner tick.
|
||||||
|
- Stats: Removed the misleading `New words` series from expanded session charts; session detail now shows only the real total-word and known-word lines.
|
||||||
|
- Stats: Restored the cross-anime word table behavior in stats vocabulary surfaces so shared vocabulary entries no longer disappear or merge incorrectly across related media.
|
||||||
|
- Stats: `subminer stats -b` now runs as a standalone background stats daemon instead of reusing the main SubMiner app process, so the overlay app can still be launched separately for normal video watching.
|
||||||
|
- Stats: Dashboard word mining still works against the background daemon by using a short-lived hidden helper for the Yomitan add-note flow.
|
||||||
|
- Stats: Load full session timelines by default in stats session detail views so long sessions preserve complete telemetry history instead of being truncated by a fixed sample limit.
|
||||||
|
- Stats: Replaced heuristic stats word counts with Yomitan token counts, so session, media, anime, and trend subtitle totals now come directly from parsed subtitle tokens.
|
||||||
|
- Stats: Updated stats UI labels and lookup-rate copy to refer to tokens instead of words where those counts are shown.
|
||||||
|
- Overlay: Reduced repeated `Overlay loading...` popups on macOS when fullscreen tracker flaps briefly hide and recover the visible overlay.
|
||||||
|
- Stats: Scaled expanded session-detail known-word charts to the session's actual percentage range so small changes no longer render as a nearly flat line.
|
||||||
|
- Jlpt: Reduced JLPT dictionary startup log noise by summarizing duplicate surface-form collisions instead of logging one line per duplicate entry.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>v0.6.x</summary>
|
||||||
|
|
||||||
|
<h2>v0.6.5 (2026-03-15)</h2>
|
||||||
|
|
||||||
|
**Internal**
|
||||||
|
- Release: Seed the AUR checkout with the repo `.SRCINFO` template before rewriting metadata so tagged releases do not depend on prior AUR state.
|
||||||
|
|
||||||
|
<h2>v0.6.4 (2026-03-15)</h2>
|
||||||
|
|
||||||
|
**Internal**
|
||||||
|
- Release: Reworked AUR metadata generation to update `.SRCINFO` directly instead of depending on runner `makepkg`, fixing tagged release publishing for `subminer-bin`.
|
||||||
|
|
||||||
|
<h2>v0.6.3 (2026-03-15)</h2>
|
||||||
|
|
||||||
|
**Changed**
|
||||||
|
- Overlay: Expanded the `Alt+C` controller modal into an inline config/remap flow with preferred-controller saving and per-action learn mode for buttons, triggers, and stick directions.
|
||||||
|
|
||||||
|
**Internal**
|
||||||
|
- Workflow: Hardened the `subminer-scrum-master` skill to explicitly answer whether docs updates and changelog fragments are required before handoff.
|
||||||
|
- Release: Automate `subminer-bin` AUR package updates from the tagged release workflow.
|
||||||
|
|
||||||
|
<h2>v0.6.2 (2026-03-12)</h2>
|
||||||
|
|
||||||
|
**Changed**
|
||||||
|
- Config: Added `yomitan.externalProfilePath` to reuse another Electron app's Yomitan profile in read-only mode.
|
||||||
|
- Config: SubMiner now reuses external Yomitan dictionaries/settings without writing back to that profile.
|
||||||
|
- Config: Launcher-managed playback now respects `yomitan.externalProfilePath` and no longer forces first-run setup when external Yomitan is configured.
|
||||||
|
- Config: SubMiner now seeds `config.jsonc` even when the default config directory already exists.
|
||||||
|
- Config: First-run setup now allows zero internal dictionaries when `yomitan.externalProfilePath` is configured, and falls back to requiring at least one internal dictionary if that external profile is later removed.
|
||||||
|
|
||||||
|
<h2>v0.6.1 (2026-03-12)</h2>
|
||||||
|
|
||||||
|
**Added**
|
||||||
|
- Overlay: Added Chrome Gamepad API controller support for keyboard-only overlay mode, including configurable logical bindings for lookup, mining, popup navigation, Yomitan audio, mpv pause, d-pad fallback navigation, and slower smooth popup scrolling.
|
||||||
|
- Overlay: Added `Alt+C` controller selection and `Alt+Shift+C` controller debug modals, with preferred controller persistence and live raw input inspection.
|
||||||
|
- Overlay: Added a transient in-overlay controller-detected indicator when a controller is first found.
|
||||||
|
- Overlay: Fixed stale keyboard-only token highlight cleanup when keyboard-only mode turns off or the Yomitan popup closes.
|
||||||
|
|
||||||
|
**Docs**
|
||||||
|
- Install: Added Arch Linux AUR install docs for `subminer-bin` in the README and installation guide.
|
||||||
|
|
||||||
|
**Internal**
|
||||||
|
- Config: add an enforced `verify:config-example` gate so checked-in example config artifacts cannot drift silently
|
||||||
|
- Release: Fixed the release workflow token permissions so tagged builds can download `oven-sh/setup-bun` and publish artifacts again.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>v0.5.x</summary>
|
||||||
|
|
||||||
|
<h2>v0.5.6 (2026-03-10)</h2>
|
||||||
|
|
||||||
|
**Fixed**
|
||||||
|
|
||||||
|
- Dictionary: Persist merged character-dictionary MRU state as soon as a new retained set is built so revisits do not get dropped if later Yomitan import work fails, and skip merged dictionary rebuilds for reorder-only revisits when the retained anime set itself has not changed.
|
||||||
|
- Startup: Fixed early Electron startup writing config and user data under a lowercase `~/.config/subminer` path instead of the canonical `~/.config/SubMiner` directory.
|
||||||
|
- Overlay: Kept JLPT underline colors stable during Yomitan hover and selection states, even when tokens also use known, N+1, name-match, or frequency styling.
|
||||||
|
|
||||||
|
<h2>v0.5.5 (2026-03-09)</h2>
|
||||||
|
|
||||||
|
**Changed**
|
||||||
|
|
||||||
|
- Overlay: Added `f` as the default overlay fullscreen toggle and changed the default AniSkip intro-jump key to `Tab`.
|
||||||
|
- Dictionary: Aligned AniList character dictionary generation more closely with the upstream reference by preserving duplicate shared names across characters, skipping characters without native Japanese names, restoring richer character info fields, and using upstream-style role mapping plus hint-aware kanji readings.
|
||||||
|
- Startup: Ordered startup OSD messages so tokenization loads first, annotation loading appears next if still pending, and character dictionary sync progress waits until annotation loading finishes.
|
||||||
|
- Dictionary: Added a visible startup OSD step for merged character-dictionary building so long rebuilds show progress before the later import/upload phase.
|
||||||
|
|
||||||
|
**Fixed**
|
||||||
|
|
||||||
|
- Dictionary: Fixed AniList media guessing for character dictionary auto-sync by using filename-only `guessit` input and preserving multi-part guessit titles instead of truncating them to the first segment.
|
||||||
|
- Dictionary: Refresh the current subtitle after character dictionary auto-sync completes so newly imported character names highlight on the active line instead of waiting for the next subtitle change.
|
||||||
|
- Dictionary: Show character dictionary auto-sync progress on the mpv OSD without sending desktop notifications.
|
||||||
|
- Dictionary: Keep character dictionary auto-sync non-blocking during startup by letting snapshot/build work run in parallel and delaying only the Yomitan import/settings phase until current-media tokenization is already ready.
|
||||||
|
- Overlay: Fixed visible overlay keyboard handling so pressing `Tab` still reaches mpv and triggers the default AniSkip skip-intro binding while the overlay has focus.
|
||||||
|
- Plugin: Fix Windows mpv plugin binary override lookup so `SUBMINER_BINARY_PATH` still resolves to `SubMiner.exe` when no AppImage override is set.
|
||||||
|
|
||||||
|
<h2>v0.5.3 (2026-03-09)</h2>
|
||||||
|
|
||||||
|
**Changed**
|
||||||
|
|
||||||
|
- Release: Publish unsigned Windows `.exe` and `.zip` artifacts directly from release CI instead of routing them through SignPath.
|
||||||
|
- Release: Added `bun run build:win:unsigned` for explicit local unsigned Windows packaging.
|
||||||
|
|
||||||
|
<h2>v0.5.2 (2026-03-09)</h2>
|
||||||
|
|
||||||
|
**Internal**
|
||||||
|
|
||||||
|
- Release: Pinned the Windows SignPath submission workflow to an explicit artifact-configuration slug instead of relying on the SignPath project's default configuration.
|
||||||
|
|
||||||
|
<h2>v0.5.1 (2026-03-09)</h2>
|
||||||
|
|
||||||
|
**Changed**
|
||||||
|
|
||||||
|
- Launcher: Removed the YouTube subtitle generation mode switch so YouTube playback always preloads subtitles before mpv starts.
|
||||||
|
|
||||||
|
**Fixed**
|
||||||
|
|
||||||
|
- Launcher: Hardened YouTube AI subtitle fixing so fenced SRT output and text-only one-cue-per-block responses can still be applied without losing original cue timing.
|
||||||
|
- Launcher: Skipped AniSkip lookup during URL playback and YouTube subtitle-preload playback, limiting AniSkip to local file targets where it can actually resolve anime metadata.
|
||||||
|
- Launcher: Keep the background SubMiner process running after a launcher-managed mpv session exits so the next mpv instance can reconnect without restarting the app.
|
||||||
|
- Launcher: Reuse prior tokenization readiness after the background app is already warm so reopening a video does not pause again waiting for duplicate warmup completion.
|
||||||
|
- Windows: Acquire the app single-instance lock earlier so Windows overlay/video launches reuse the running background SubMiner process instead of booting a second full app and repeating startup warmups.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>v0.3.x</summary>
|
||||||
|
|
||||||
|
<h2>v0.3.0 (2026-03-05)</h2>
|
||||||
|
|
||||||
- Added keyboard-driven Yomitan navigation and popup controls, including optional auto-pause.
|
- Added keyboard-driven Yomitan navigation and popup controls, including optional auto-pause.
|
||||||
- Added subtitle/jump keyboard handling fixes for smoother subtitle playback control.
|
- Added subtitle/jump keyboard handling fixes for smoother subtitle playback control.
|
||||||
@@ -153,7 +369,12 @@
|
|||||||
- Added release build quality-of-life for CLI publish (`gh`-based clobber upload).
|
- Added release build quality-of-life for CLI publish (`gh`-based clobber upload).
|
||||||
- Removed docs Plausible integration and cleaned associated tracker settings.
|
- Removed docs Plausible integration and cleaned associated tracker settings.
|
||||||
|
|
||||||
## v0.2.3 (2026-03-02)
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>v0.2.x</summary>
|
||||||
|
|
||||||
|
<h2>v0.2.3 (2026-03-02)</h2>
|
||||||
|
|
||||||
- Added performance and tokenization optimizations (faster warmup, persistent MeCab usage, reduced enrichment lookups).
|
- Added performance and tokenization optimizations (faster warmup, persistent MeCab usage, reduced enrichment lookups).
|
||||||
- Added subtitle controls for no-jump delay shifts.
|
- Added subtitle controls for no-jump delay shifts.
|
||||||
@@ -162,38 +383,45 @@
|
|||||||
- Fixed Jellyfin remote resume behavior and improved autoplay/tokenization interaction.
|
- Fixed Jellyfin remote resume behavior and improved autoplay/tokenization interaction.
|
||||||
- Updated startup flow to load dictionaries asynchronously and unblock first tokenization sooner.
|
- Updated startup flow to load dictionaries asynchronously and unblock first tokenization sooner.
|
||||||
|
|
||||||
## v0.2.2 (2026-03-01)
|
<h2>v0.2.2 (2026-03-01)</h2>
|
||||||
|
|
||||||
- Improved subtitle highlighting reliability for frequency modes.
|
- Improved subtitle highlighting reliability for frequency modes.
|
||||||
- Fixed Jellyfin misc info formatting cleanup.
|
- Fixed Jellyfin misc info formatting cleanup.
|
||||||
- Version bump maintenance for 0.2.2.
|
- Version bump maintenance for 0.2.2.
|
||||||
|
|
||||||
## v0.2.1 (2026-03-01)
|
<h2>v0.2.1 (2026-03-01)</h2>
|
||||||
|
|
||||||
- Delivered Jellyfin and Subsync fixes from release patch cycle.
|
- Delivered Jellyfin and Subsync fixes from release patch cycle.
|
||||||
- Version bump maintenance for 0.2.1.
|
- Version bump maintenance for 0.2.1.
|
||||||
|
|
||||||
## v0.2.0 (2026-03-01)
|
<h2>v0.2.0 (2026-03-01)</h2>
|
||||||
|
|
||||||
- Added task-related release work for the overlay 2.0 cycle.
|
- Added task-related release work for the overlay 2.0 cycle.
|
||||||
- Introduced Overlay 2.0.
|
- Introduced Overlay 2.0.
|
||||||
- Improved release automation reliability.
|
- Improved release automation reliability.
|
||||||
|
|
||||||
## v0.1.2 (2026-02-24)
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>v0.1.x</summary>
|
||||||
|
|
||||||
|
<h2>v0.1.2 (2026-02-24)</h2>
|
||||||
|
|
||||||
- Added encrypted AniList token handling and default GNOME keyring support.
|
- Added encrypted AniList token handling and default GNOME keyring support.
|
||||||
- Added launcher passthrough for password-store flows (Jellyfin path).
|
- Added launcher passthrough for password-store flows (Jellyfin path).
|
||||||
- Updated docs for auth and integration behavior.
|
- Updated docs for auth and integration behavior.
|
||||||
- Version bump maintenance for 0.1.2.
|
- Version bump maintenance for 0.1.2.
|
||||||
|
|
||||||
## v0.1.1 (2026-02-23)
|
<h2>v0.1.1 (2026-02-23)</h2>
|
||||||
|
|
||||||
- Fixed overlay modal focus handling (`grab input`) behavior.
|
- Fixed overlay modal focus handling (`grab input`) behavior.
|
||||||
- Version bump maintenance for 0.1.1.
|
- Version bump maintenance for 0.1.1.
|
||||||
|
|
||||||
## v0.1.0 (2026-02-23)
|
<h2>v0.1.0 (2026-02-23)</h2>
|
||||||
|
|
||||||
- Bootstrapped Electron runtime, services, and composition model.
|
- Bootstrapped Electron runtime, services, and composition model.
|
||||||
- Added runtime asset packaging and dependency vendoring.
|
- Added runtime asset packaging and dependency vendoring.
|
||||||
- Added project docs baseline, setup guides, architecture notes, and submodule/runtime assets.
|
- Added project docs baseline, setup guides, architecture notes, and submodule/runtime assets.
|
||||||
- Added CI release job dependency ordering fixes before launcher build.
|
- Added CI release job dependency ordering fixes before launcher build.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ The configuration file includes several main sections:
|
|||||||
- [**Discord Rich Presence**](#discord-rich-presence) - Optional Discord activity card updates
|
- [**Discord Rich Presence**](#discord-rich-presence) - Optional Discord activity card updates
|
||||||
- [**Immersion Tracking**](#immersion-tracking) - Track subtitle sessions and mining activity in SQLite
|
- [**Immersion Tracking**](#immersion-tracking) - Track subtitle sessions and mining activity in SQLite
|
||||||
- [**Stats Dashboard**](#stats-dashboard) - Local dashboard and overlay for immersion progress
|
- [**Stats Dashboard**](#stats-dashboard) - Local dashboard and overlay for immersion progress
|
||||||
|
- [**MPV Launcher**](#mpv-launcher) - mpv executable path and window launch mode
|
||||||
- [**YouTube Playback Settings**](#youtube-playback-settings) - Defaults for YouTube subtitle loading
|
- [**YouTube Playback Settings**](#youtube-playback-settings) - Defaults for YouTube subtitle loading
|
||||||
|
|
||||||
## Core Settings
|
## Core Settings
|
||||||
@@ -237,10 +238,10 @@ This stream includes subtitle text plus token metadata (N+1, known-word, frequen
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
| Option | Values | Description |
|
| Option | Values | Description |
|
||||||
| --------- | ------------------ | -------------------------------------------------------- |
|
| --------- | --------------- | -------------------------------------------------------------- |
|
||||||
| `enabled` | `true`, `false` | Toggle annotated websocket stream (independent of `websocket`) |
|
| `enabled` | `true`, `false` | Toggle annotated websocket stream (independent of `websocket`) |
|
||||||
| `port` | number | Annotation websocket port (default: 6678) |
|
| `port` | number | Annotation websocket port (default: 6678) |
|
||||||
|
|
||||||
### Texthooker
|
### Texthooker
|
||||||
|
|
||||||
@@ -257,10 +258,10 @@ See `config.example.jsonc` for detailed configuration options.
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
| Option | Values | Description |
|
| Option | Values | Description |
|
||||||
| ---------------- | --------------- | ------------------------------------------------------------------------------------------------ |
|
| ----------------- | --------------- | ---------------------------------------------------------------------- |
|
||||||
| `launchAtStartup`| `true`, `false` | Start texthooker automatically with SubMiner startup (default: `true`) |
|
| `launchAtStartup` | `true`, `false` | Start texthooker automatically with SubMiner startup (default: `true`) |
|
||||||
| `openBrowser` | `true`, `false` | Open browser tab when texthooker starts (default: `false`) |
|
| `openBrowser` | `true`, `false` | Open browser tab when texthooker starts (default: `false`) |
|
||||||
|
|
||||||
## Subtitle Display
|
## Subtitle Display
|
||||||
|
|
||||||
@@ -365,24 +366,24 @@ Configure the parsed-subtitle sidebar modal.
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
| Option | Values | Description |
|
| Option | Values | Description |
|
||||||
| --------------------------- | ---------------- | -------------------------------------------------------------------------------- |
|
| --------------------------- | --------- | ------------------------------------------------------------------------------------------------------- |
|
||||||
| `enabled` | boolean | Enable subtitle sidebar support (`true` by default) |
|
| `enabled` | boolean | Enable subtitle sidebar support (`true` by default) |
|
||||||
| `autoOpen` | boolean | Open sidebar automatically on overlay startup (`false` by default) |
|
| `autoOpen` | boolean | Open sidebar automatically on overlay startup (`false` by default) |
|
||||||
| `layout` | string | `"overlay"` floats over mpv; `"embedded"` reserves right-side player space to mimic browser-like layout |
|
| `layout` | string | `"overlay"` floats over mpv; `"embedded"` reserves right-side player space to mimic browser-like layout |
|
||||||
| `toggleKey` | string | `KeyboardEvent.code` used to open/close the sidebar (default: `"Backslash"`) |
|
| `toggleKey` | string | `KeyboardEvent.code` used to open/close the sidebar (default: `"Backslash"`) |
|
||||||
| `pauseVideoOnHover` | boolean | Pause playback while hovering the sidebar cue list |
|
| `pauseVideoOnHover` | boolean | Pause playback while hovering the sidebar cue list |
|
||||||
| `autoScroll` | boolean | Keep the active cue in view while playback advances |
|
| `autoScroll` | boolean | Keep the active cue in view while playback advances |
|
||||||
| `maxWidth` | number | Maximum sidebar width in CSS pixels (default: `420`) |
|
| `maxWidth` | number | Maximum sidebar width in CSS pixels (default: `420`) |
|
||||||
| `opacity` | number | Sidebar opacity between `0` and `1` (default: `0.95`) |
|
| `opacity` | number | Sidebar opacity between `0` and `1` (default: `0.95`) |
|
||||||
| `backgroundColor` | string | Sidebar shell background color |
|
| `backgroundColor` | string | Sidebar shell background color |
|
||||||
| `textColor` | hex color | Default cue text color |
|
| `textColor` | hex color | Default cue text color |
|
||||||
| `fontFamily` | string | CSS `font-family` value applied to sidebar cue text |
|
| `fontFamily` | string | CSS `font-family` value applied to sidebar cue text |
|
||||||
| `fontSize` | number | Base sidebar cue font size in CSS pixels (default: `16`) |
|
| `fontSize` | number | Base sidebar cue font size in CSS pixels (default: `16`) |
|
||||||
| `timestampColor` | hex color | Cue timestamp color |
|
| `timestampColor` | hex color | Cue timestamp color |
|
||||||
| `activeLineColor` | hex color | Active cue text color |
|
| `activeLineColor` | hex color | Active cue text color |
|
||||||
| `activeLineBackgroundColor` | string | Active cue background color |
|
| `activeLineBackgroundColor` | string | Active cue background color |
|
||||||
| `hoverLineBackgroundColor` | string | Hovered cue background color |
|
| `hoverLineBackgroundColor` | string | Hovered cue background color |
|
||||||
|
|
||||||
The sidebar is only available when the active subtitle source has been parsed into a cue list. Default colors use Catppuccin Macchiato with a semi-transparent shell so the panel stays readable without feeling like an opaque settings dialog.
|
The sidebar is only available when the active subtitle source has been parsed into a cue list. Default colors use Catppuccin Macchiato with a semi-transparent shell so the panel stays readable without feeling like an opaque settings dialog.
|
||||||
|
|
||||||
@@ -466,25 +467,25 @@ See `config.example.jsonc` for detailed configuration options and more examples.
|
|||||||
|
|
||||||
**Default keybindings:**
|
**Default keybindings:**
|
||||||
|
|
||||||
| Key | Command | Description |
|
| Key | Command | Description |
|
||||||
| -------------------- | ---------------------------- | ------------------------------------- |
|
| -------------------- | ----------------------------- | --------------------------------------- |
|
||||||
| `Space` | `["cycle", "pause"]` | Toggle pause |
|
| `Space` | `["cycle", "pause"]` | Toggle pause |
|
||||||
| `KeyJ` | `["cycle", "sid"]` | Cycle primary subtitle track |
|
| `KeyJ` | `["cycle", "sid"]` | Cycle primary subtitle track |
|
||||||
| `Shift+KeyJ` | `["cycle", "secondary-sid"]` | Cycle secondary subtitle track |
|
| `Shift+KeyJ` | `["cycle", "secondary-sid"]` | Cycle secondary subtitle track |
|
||||||
| `Ctrl+Alt+KeyP` | `["__playlist-browser-open"]` | Open playlist browser |
|
| `Ctrl+Alt+KeyP` | `["__playlist-browser-open"]` | Open playlist browser |
|
||||||
| `Ctrl+Alt+KeyC` | `["__youtube-picker-open"]` | Open the manual YouTube subtitle picker |
|
| `Ctrl+Alt+KeyC` | `["__youtube-picker-open"]` | Open the manual YouTube subtitle picker |
|
||||||
| `ArrowRight` | `["seek", 5]` | Seek forward 5 seconds |
|
| `ArrowRight` | `["seek", 5]` | Seek forward 5 seconds |
|
||||||
| `ArrowLeft` | `["seek", -5]` | Seek backward 5 seconds |
|
| `ArrowLeft` | `["seek", -5]` | Seek backward 5 seconds |
|
||||||
| `ArrowUp` | `["seek", 60]` | Seek forward 60 seconds |
|
| `ArrowUp` | `["seek", 60]` | Seek forward 60 seconds |
|
||||||
| `ArrowDown` | `["seek", -60]` | Seek backward 60 seconds |
|
| `ArrowDown` | `["seek", -60]` | Seek backward 60 seconds |
|
||||||
| `Shift+KeyH` | `["sub-seek", -1]` | Jump to previous subtitle |
|
| `Shift+KeyH` | `["sub-seek", -1]` | Jump to previous subtitle |
|
||||||
| `Shift+KeyL` | `["sub-seek", 1]` | Jump to next subtitle |
|
| `Shift+KeyL` | `["sub-seek", 1]` | Jump to next subtitle |
|
||||||
| `Shift+BracketLeft` | `["__sub-delay-prev-line"]` | Shift subtitle delay to previous cue |
|
| `Shift+BracketLeft` | `["__sub-delay-prev-line"]` | Shift subtitle delay to previous cue |
|
||||||
| `Shift+BracketRight` | `["__sub-delay-next-line"]` | Shift subtitle delay to next cue |
|
| `Shift+BracketRight` | `["__sub-delay-next-line"]` | Shift subtitle delay to next cue |
|
||||||
| `Ctrl+Shift+KeyH` | `["__replay-subtitle"]` | Replay current subtitle, pause at end |
|
| `Ctrl+Shift+KeyH` | `["__replay-subtitle"]` | Replay current subtitle, pause at end |
|
||||||
| `Ctrl+Shift+KeyL` | `["__play-next-subtitle"]` | Play next subtitle, pause at end |
|
| `Ctrl+Shift+KeyL` | `["__play-next-subtitle"]` | Play next subtitle, pause at end |
|
||||||
| `KeyQ` | `["quit"]` | Quit mpv |
|
| `KeyQ` | `["quit"]` | Quit mpv |
|
||||||
| `Ctrl+KeyW` | `["quit"]` | Quit mpv |
|
| `Ctrl+KeyW` | `["quit"]` | Quit mpv |
|
||||||
|
|
||||||
**Custom keybindings example:**
|
**Custom keybindings example:**
|
||||||
|
|
||||||
@@ -604,7 +605,7 @@ Important behavior:
|
|||||||
"leftStickPress": 9,
|
"leftStickPress": 9,
|
||||||
"rightStickPress": 10,
|
"rightStickPress": 10,
|
||||||
"leftTrigger": 6,
|
"leftTrigger": 6,
|
||||||
"rightTrigger": 7
|
"rightTrigger": 7,
|
||||||
},
|
},
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"toggleLookup": { "kind": "button", "buttonIndex": 0 },
|
"toggleLookup": { "kind": "button", "buttonIndex": 0 },
|
||||||
@@ -619,9 +620,9 @@ Important behavior:
|
|||||||
"leftStickHorizontal": { "kind": "axis", "axisIndex": 0, "dpadFallback": "horizontal" },
|
"leftStickHorizontal": { "kind": "axis", "axisIndex": 0, "dpadFallback": "horizontal" },
|
||||||
"leftStickVertical": { "kind": "axis", "axisIndex": 1, "dpadFallback": "vertical" },
|
"leftStickVertical": { "kind": "axis", "axisIndex": 1, "dpadFallback": "vertical" },
|
||||||
"rightStickHorizontal": { "kind": "axis", "axisIndex": 3, "dpadFallback": "none" },
|
"rightStickHorizontal": { "kind": "axis", "axisIndex": 3, "dpadFallback": "none" },
|
||||||
"rightStickVertical": { "kind": "axis", "axisIndex": 4, "dpadFallback": "none" }
|
"rightStickVertical": { "kind": "axis", "axisIndex": 4, "dpadFallback": "none" },
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -649,9 +650,9 @@ If you bind a discrete action to an axis manually, include `direction`:
|
|||||||
{
|
{
|
||||||
"controller": {
|
"controller": {
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"toggleLookup": { "kind": "axis", "axisIndex": 5, "direction": "positive" }
|
"toggleLookup": { "kind": "axis", "axisIndex": 5, "direction": "positive" },
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -758,15 +759,15 @@ Anki reads this provider directly. Legacy subtitle fallback keeps the same provi
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
| Option | Values | Description |
|
| Option | Values | Description |
|
||||||
| ------------------ | --------------------- | ---------------------------------------------------- |
|
| ------------------ | -------------------- | ------------------------------------------------------------- |
|
||||||
| `enabled` | `true`, `false` | Enable shared AI provider features |
|
| `enabled` | `true`, `false` | Enable shared AI provider features |
|
||||||
| `apiKey` | string | Static API key for the shared provider |
|
| `apiKey` | string | Static API key for the shared provider |
|
||||||
| `apiKeyCommand` | string | Shell command used to resolve the API key |
|
| `apiKeyCommand` | string | Shell command used to resolve the API key |
|
||||||
| `baseUrl` | string (URL) | OpenAI-compatible base URL |
|
| `baseUrl` | string (URL) | OpenAI-compatible base URL |
|
||||||
| `model` | string | Optional model override for shared provider workflows |
|
| `model` | string | Optional model override for shared provider workflows |
|
||||||
| `systemPrompt` | string | Optional system prompt override for shared provider workflows |
|
| `systemPrompt` | string | Optional system prompt override for shared provider workflows |
|
||||||
| `requestTimeoutMs` | integer milliseconds | Shared request timeout (default: `15000`) |
|
| `requestTimeoutMs` | integer milliseconds | Shared request timeout (default: `15000`) |
|
||||||
|
|
||||||
SubMiner uses the shared provider for:
|
SubMiner uses the shared provider for:
|
||||||
|
|
||||||
@@ -844,59 +845,59 @@ This example is intentionally compact. The option table below documents availabl
|
|||||||
|
|
||||||
**Requirements:** [AnkiConnect](https://github.com/FooSoft/anki-connect) plugin must be installed and running in Anki. ffmpeg must be installed for media generation.
|
**Requirements:** [AnkiConnect](https://github.com/FooSoft/anki-connect) plugin must be installed and running in Anki. ffmpeg must be installed for media generation.
|
||||||
|
|
||||||
| Option | Values | Description |
|
| Option | Values | Description |
|
||||||
| --------------------------------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `enabled` | `true`, `false` | Enable AnkiConnect integration (default: `true`) |
|
| `enabled` | `true`, `false` | Enable AnkiConnect integration (default: `true`) |
|
||||||
| `url` | string (URL) | AnkiConnect API URL (default: `http://127.0.0.1:8765`) |
|
| `url` | string (URL) | AnkiConnect API URL (default: `http://127.0.0.1:8765`) |
|
||||||
| `pollingRate` | number (ms) | How often to check for new cards in polling mode (default: `3000`; ignored for direct proxy `addNote`/`addNotes` updates) |
|
| `pollingRate` | number (ms) | How often to check for new cards in polling mode (default: `3000`; ignored for direct proxy `addNote`/`addNotes` updates) |
|
||||||
| `proxy.enabled` | `true`, `false` | Enable local AnkiConnect-compatible proxy for push-based auto-enrichment (default: `true`) |
|
| `proxy.enabled` | `true`, `false` | Enable local AnkiConnect-compatible proxy for push-based auto-enrichment (default: `true`) |
|
||||||
| `proxy.host` | string | Bind host for local AnkiConnect proxy (default: `127.0.0.1`) |
|
| `proxy.host` | string | Bind host for local AnkiConnect proxy (default: `127.0.0.1`) |
|
||||||
| `proxy.port` | number | Bind port for local AnkiConnect proxy (default: `8766`) |
|
| `proxy.port` | number | Bind port for local AnkiConnect proxy (default: `8766`) |
|
||||||
| `proxy.upstreamUrl` | string (URL) | Upstream AnkiConnect URL that proxy forwards to (default: `http://127.0.0.1:8765`) |
|
| `proxy.upstreamUrl` | string (URL) | Upstream AnkiConnect URL that proxy forwards to (default: `http://127.0.0.1:8765`) |
|
||||||
| `tags` | array of strings | Tags automatically added to cards mined/updated by SubMiner (default: `['SubMiner']`; set `[]` to disable automatic tagging). |
|
| `tags` | array of strings | Tags automatically added to cards mined/updated by SubMiner (default: `['SubMiner']`; set `[]` to disable automatic tagging). |
|
||||||
| `ankiConnect.deck` | string | Legacy Anki polling/compatibility scope. Newer known-word cache scoping should use `ankiConnect.knownWords.decks`. |
|
| `ankiConnect.deck` | string | Legacy Anki polling/compatibility scope. Newer known-word cache scoping should use `ankiConnect.knownWords.decks`. |
|
||||||
| `ankiConnect.knownWords.decks` | object | Deck→fields mapping for known-word cache queries (for example `{ "Kaishi 1.5k": ["Word", "Word Reading"] }`). |
|
| `ankiConnect.knownWords.decks` | object | Deck→fields mapping for known-word cache queries (for example `{ "Kaishi 1.5k": ["Word", "Word Reading"] }`). |
|
||||||
| `fields.word` | string | Card field for mined word / expression text (default: `Expression`) |
|
| `fields.word` | string | Card field for mined word / expression text (default: `Expression`) |
|
||||||
| `fields.audio` | string | Card field for audio files (default: `ExpressionAudio`) |
|
| `fields.audio` | string | Card field for audio files (default: `ExpressionAudio`) |
|
||||||
| `fields.image` | string | Card field for images (default: `Picture`) |
|
| `fields.image` | string | Card field for images (default: `Picture`) |
|
||||||
| `fields.sentence` | string | Card field for sentences (default: `Sentence`) |
|
| `fields.sentence` | string | Card field for sentences (default: `Sentence`) |
|
||||||
| `fields.miscInfo` | string | Card field for metadata (default: `"MiscInfo"`, set to `null` to disable) |
|
| `fields.miscInfo` | string | Card field for metadata (default: `"MiscInfo"`, set to `null` to disable) |
|
||||||
| `fields.translation` | string | Card field for sentence-card translation/back text (default: `SelectionText`) |
|
| `fields.translation` | string | Card field for sentence-card translation/back text (default: `SelectionText`) |
|
||||||
| `ankiConnect.ai.enabled` | `true`, `false` | Use AI translation for sentence cards. Also auto-attempted when secondary subtitle is missing. |
|
| `ankiConnect.ai.enabled` | `true`, `false` | Use AI translation for sentence cards. Also auto-attempted when secondary subtitle is missing. |
|
||||||
| `ankiConnect.ai.model` | string | Optional model override for Anki AI translation/enrichment flows. |
|
| `ankiConnect.ai.model` | string | Optional model override for Anki AI translation/enrichment flows. |
|
||||||
| `ankiConnect.ai.systemPrompt` | string | Optional system prompt override for Anki AI translation/enrichment flows. |
|
| `ankiConnect.ai.systemPrompt` | string | Optional system prompt override for Anki AI translation/enrichment flows. |
|
||||||
| `media.generateAudio` | `true`, `false` | Generate audio clips from video (default: `true`) |
|
| `media.generateAudio` | `true`, `false` | Generate audio clips from video (default: `true`) |
|
||||||
| `media.generateImage` | `true`, `false` | Generate image/animation screenshots (default: `true`) |
|
| `media.generateImage` | `true`, `false` | Generate image/animation screenshots (default: `true`) |
|
||||||
| `media.imageType` | `"static"`, `"avif"` | Image type: static screenshot or animated AVIF (default: `"static"`) |
|
| `media.imageType` | `"static"`, `"avif"` | Image type: static screenshot or animated AVIF (default: `"static"`) |
|
||||||
| `media.imageFormat` | `"jpg"`, `"png"`, `"webp"` | Image format (default: `"jpg"`) |
|
| `media.imageFormat` | `"jpg"`, `"png"`, `"webp"` | Image format (default: `"jpg"`) |
|
||||||
| `media.imageQuality` | number (1-100) | Image quality for JPG/WebP; PNG ignores this (default: `92`) |
|
| `media.imageQuality` | number (1-100) | Image quality for JPG/WebP; PNG ignores this (default: `92`) |
|
||||||
| `media.imageMaxWidth` | number (px) | Optional max width for static screenshots. Unset keeps source width. |
|
| `media.imageMaxWidth` | number (px) | Optional max width for static screenshots. Unset keeps source width. |
|
||||||
| `media.imageMaxHeight` | number (px) | Optional max height for static screenshots. Unset keeps source height. |
|
| `media.imageMaxHeight` | number (px) | Optional max height for static screenshots. Unset keeps source height. |
|
||||||
| `media.animatedFps` | number (1-60) | FPS for animated AVIF (default: `10`) |
|
| `media.animatedFps` | number (1-60) | FPS for animated AVIF (default: `10`) |
|
||||||
| `media.animatedMaxWidth` | number (px) | Max width for animated AVIF (default: `640`) |
|
| `media.animatedMaxWidth` | number (px) | Max width for animated AVIF (default: `640`) |
|
||||||
| `media.animatedMaxHeight` | number (px) | Optional max height for animated AVIF. Unset keeps source aspect-constrained height. |
|
| `media.animatedMaxHeight` | number (px) | Optional max height for animated AVIF. Unset keeps source aspect-constrained height. |
|
||||||
| `media.animatedCrf` | number (0-63) | CRF quality for AVIF; lower = higher quality (default: `35`) |
|
| `media.animatedCrf` | number (0-63) | CRF quality for AVIF; lower = higher quality (default: `35`) |
|
||||||
| `media.syncAnimatedImageToWordAudio` | `true`, `false` | Whether animated AVIF includes an opening frame synced to sentence word-audio timing (default: `true`). |
|
| `media.syncAnimatedImageToWordAudio` | `true`, `false` | Whether animated AVIF includes an opening frame synced to sentence word-audio timing (default: `true`). |
|
||||||
| `media.audioPadding` | number (seconds) | Padding around audio clip timing (default: `0.5`) |
|
| `media.audioPadding` | number (seconds) | Padding around audio clip timing (default: `0.5`) |
|
||||||
| `media.fallbackDuration` | number (seconds) | Default duration if timing unavailable (default: `3.0`) |
|
| `media.fallbackDuration` | number (seconds) | Default duration if timing unavailable (default: `3.0`) |
|
||||||
| `media.maxMediaDuration` | number (seconds) | Max duration for generated media from multi-line copy (default: `30`, `0` to disable) |
|
| `media.maxMediaDuration` | number (seconds) | Max duration for generated media from multi-line copy (default: `30`, `0` to disable) |
|
||||||
| `behavior.overwriteAudio` | `true`, `false` | Replace existing audio on updates; when `false`, new audio is appended/prepended per `behavior.mediaInsertMode` (default: `true`) |
|
| `behavior.overwriteAudio` | `true`, `false` | Replace existing audio on updates; when `false`, new audio is appended/prepended per `behavior.mediaInsertMode` (default: `true`) |
|
||||||
| `behavior.overwriteImage` | `true`, `false` | Replace existing images on updates; when `false`, new images are appended/prepended per `behavior.mediaInsertMode` (default: `true`) |
|
| `behavior.overwriteImage` | `true`, `false` | Replace existing images on updates; when `false`, new images are appended/prepended per `behavior.mediaInsertMode` (default: `true`) |
|
||||||
| `behavior.mediaInsertMode` | `"append"`, `"prepend"` | Where to insert new media when overwrite is off (default: `"append"`) |
|
| `behavior.mediaInsertMode` | `"append"`, `"prepend"` | Where to insert new media when overwrite is off (default: `"append"`) |
|
||||||
| `behavior.highlightWord` | `true`, `false` | Highlight the word in sentence context (default: `true`) |
|
| `behavior.highlightWord` | `true`, `false` | Highlight the word in sentence context (default: `true`) |
|
||||||
| `ankiConnect.knownWords.highlightEnabled` | `true`, `false` | Enable fast local highlighting for words already known in Anki (default: `false`) |
|
| `ankiConnect.knownWords.highlightEnabled` | `true`, `false` | Enable fast local highlighting for words already known in Anki (default: `false`) |
|
||||||
| `ankiConnect.knownWords.addMinedWordsImmediately` | `true`, `false` | Add words from successful mines into the local known-word cache immediately (default: `true`) |
|
| `ankiConnect.knownWords.addMinedWordsImmediately` | `true`, `false` | Add words from successful mines into the local known-word cache immediately (default: `true`) |
|
||||||
| `ankiConnect.knownWords.color` | hex color string | Text color for tokens already found in the local known-word cache (default: `"#a6da95"`). |
|
| `ankiConnect.knownWords.color` | hex color string | Text color for tokens already found in the local known-word cache (default: `"#a6da95"`). |
|
||||||
| `ankiConnect.knownWords.matchMode` | `"headword"`, `"surface"` | Matching strategy for known-word highlighting (default: `"headword"`). `headword` uses token headwords; `surface` uses visible subtitle text. |
|
| `ankiConnect.knownWords.matchMode` | `"headword"`, `"surface"` | Matching strategy for known-word highlighting (default: `"headword"`). `headword` uses token headwords; `surface` uses visible subtitle text. |
|
||||||
| `ankiConnect.knownWords.refreshMinutes` | number | Minutes between known-word cache refreshes (default: `1440`) |
|
| `ankiConnect.knownWords.refreshMinutes` | number | Minutes between known-word cache refreshes (default: `1440`) |
|
||||||
| `ankiConnect.knownWords.decks` | object | Deck→fields mapping used for known-word cache query scope (e.g. `{ "Kaishi 1.5k": ["Word", "Word Reading"] }`). |
|
| `ankiConnect.knownWords.decks` | object | Deck→fields mapping used for known-word cache query scope (e.g. `{ "Kaishi 1.5k": ["Word", "Word Reading"] }`). |
|
||||||
| `ankiConnect.nPlusOne.nPlusOne` | hex color string | Text color for the single target token to study when exactly one unknown candidate exists in a sentence (default: `"#c6a0f6"`). |
|
| `ankiConnect.nPlusOne.nPlusOne` | hex color string | Text color for the single target token to study when exactly one unknown candidate exists in a sentence (default: `"#c6a0f6"`). |
|
||||||
| `ankiConnect.nPlusOne.minSentenceWords` | number | Minimum number of words required in a sentence before single unknown-word N+1 highlighting can trigger (default: `3`). |
|
| `ankiConnect.nPlusOne.minSentenceWords` | number | Minimum number of words required in a sentence before single unknown-word N+1 highlighting can trigger (default: `3`). |
|
||||||
| `behavior.notificationType` | `"osd"`, `"system"`, `"both"`, `"none"` | Notification type on card update (default: `"osd"`) |
|
| `behavior.notificationType` | `"osd"`, `"system"`, `"both"`, `"none"` | Notification type on card update (default: `"osd"`) |
|
||||||
| `behavior.autoUpdateNewCards` | `true`, `false` | Automatically update cards on creation (default: `true`) |
|
| `behavior.autoUpdateNewCards` | `true`, `false` | Automatically update cards on creation (default: `true`) |
|
||||||
| `metadata.pattern` | string | Format pattern for metadata: `%f`=filename, `%F`=filename+ext, `%t`=time |
|
| `metadata.pattern` | string | Format pattern for metadata: `%f`=filename, `%F`=filename+ext, `%t`=time |
|
||||||
| `isLapis` | object | Lapis/shared sentence-card config: `{ enabled, sentenceCardModel }`. Sentence/audio field names are fixed to `Sentence` and `SentenceAudio`. |
|
| `isLapis` | object | Lapis/shared sentence-card config: `{ enabled, sentenceCardModel }`. Sentence/audio field names are fixed to `Sentence` and `SentenceAudio`. |
|
||||||
| `isKiku` | object | Kiku-only config: `{ enabled, fieldGrouping, deleteDuplicateInAuto }` (shared sentence/audio/model settings are inherited from `isLapis`) |
|
| `isKiku` | object | Kiku-only config: `{ enabled, fieldGrouping, deleteDuplicateInAuto }` (shared sentence/audio/model settings are inherited from `isLapis`) |
|
||||||
|
|
||||||
`ankiConnect.ai` only controls feature-local enablement plus optional `model` / `systemPrompt` overrides.
|
`ankiConnect.ai` only controls feature-local enablement plus optional `model` / `systemPrompt` overrides.
|
||||||
API key resolution, base URL, and timeout live under the shared top-level [`ai`](#shared-ai-provider) config.
|
API key resolution, base URL, and timeout live under the shared top-level [`ai`](#shared-ai-provider) config.
|
||||||
@@ -1022,8 +1023,8 @@ Sync the active subtitle track using `alass` (preferred) or `ffsubsync`. Both ar
|
|||||||
| Option | Values | Description |
|
| Option | Values | Description |
|
||||||
| ---------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------- |
|
| ---------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `defaultMode` | `"auto"`, `"manual"` | `auto`: try `alass` against secondary subtitle, then fallback to `ffsubsync`; `manual`: open overlay picker |
|
| `defaultMode` | `"auto"`, `"manual"` | `auto`: try `alass` against secondary subtitle, then fallback to `ffsubsync`; `manual`: open overlay picker |
|
||||||
| `alass_path` | string path | Path to `alass` executable. Empty or `null` resolves from `PATH`. `alass` must be installed separately. |
|
| `alass_path` | string path | Path to `alass` executable. Empty or `null` resolves from `PATH`. `alass` must be installed separately. |
|
||||||
| `ffsubsync_path` | string path | Path to `ffsubsync` executable. Empty or `null` resolves from `PATH`. `ffsubsync` must be installed separately. |
|
| `ffsubsync_path` | string path | Path to `ffsubsync` executable. Empty or `null` resolves from `PATH`. `ffsubsync` must be installed separately. |
|
||||||
| `ffmpeg_path` | string path | Path to `ffmpeg` (used for internal subtitle extraction). Empty or `null` falls back to `/usr/bin/ffmpeg`. |
|
| `ffmpeg_path` | string path | Path to `ffmpeg` (used for internal subtitle extraction). Empty or `null` falls back to `/usr/bin/ffmpeg`. |
|
||||||
| `replace` | `true`, `false` | When `true` (default), overwrite the active subtitle file on successful sync. When `false`, write `<name>_retimed.<ext>`. |
|
| `replace` | `true`, `false` | When `true` (default), overwrite the active subtitle file on successful sync. When `false`, write `<name>_retimed.<ext>`. |
|
||||||
|
|
||||||
@@ -1055,18 +1056,18 @@ AniList integration is opt-in and disabled by default. Enable it to allow SubMin
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
| Option | Values | Description |
|
| Option | Values | Description |
|
||||||
| ------------------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------ |
|
| -------------------------------------------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||||
| `enabled` | `true`, `false` | Enable AniList post-watch progress updates (default: `false`) |
|
| `enabled` | `true`, `false` | Enable AniList post-watch progress updates (default: `false`) |
|
||||||
| `accessToken` | string | Optional explicit AniList access token override (default: empty string) |
|
| `accessToken` | string | Optional explicit AniList access token override (default: empty string) |
|
||||||
| `characterDictionary.enabled` | `true`, `false` | Enable automatic import/update of the merged SubMiner character dictionary for recent AniList media |
|
| `characterDictionary.enabled` | `true`, `false` | Enable automatic import/update of the merged SubMiner character dictionary for recent AniList media |
|
||||||
| `characterDictionary.refreshTtlHours` | number | Legacy compatibility setting. Parsed and preserved, but merged dictionary retention is now usage-based |
|
| `characterDictionary.refreshTtlHours` | number | Legacy compatibility setting. Parsed and preserved, but merged dictionary retention is now usage-based |
|
||||||
| `characterDictionary.maxLoaded` | number | Maximum number of most-recently-used AniList media snapshots included in the merged dictionary (default: `3`) |
|
| `characterDictionary.maxLoaded` | number | Maximum number of most-recently-used AniList media snapshots included in the merged dictionary (default: `3`) |
|
||||||
| `characterDictionary.evictionPolicy` | `"delete"`, `"disable"` | Legacy compatibility setting. Parsed and preserved, but merged dictionary eviction is now usage-based |
|
| `characterDictionary.evictionPolicy` | `"delete"`, `"disable"` | Legacy compatibility setting. Parsed and preserved, but merged dictionary eviction is now usage-based |
|
||||||
| `characterDictionary.collapsibleSections.description` | `true`, `false` | Open the Description section by default in generated dictionary entries |
|
| `characterDictionary.collapsibleSections.description` | `true`, `false` | Open the Description section by default in generated dictionary entries |
|
||||||
| `characterDictionary.collapsibleSections.characterInformation` | `true`, `false` | Open the Character Information section by default in generated dictionary entries |
|
| `characterDictionary.collapsibleSections.characterInformation` | `true`, `false` | Open the Character Information section by default in generated dictionary entries |
|
||||||
| `characterDictionary.collapsibleSections.voicedBy` | `true`, `false` | Open the Voiced by section by default in generated dictionary entries |
|
| `characterDictionary.collapsibleSections.voicedBy` | `true`, `false` | Open the Voiced by section by default in generated dictionary entries |
|
||||||
| `characterDictionary.profileScope` | `"all"`, `"active"` | Apply dictionary settings updates to all Yomitan profiles or only active profile |
|
| `characterDictionary.profileScope` | `"all"`, `"active"` | Apply dictionary settings updates to all Yomitan profiles or only active profile |
|
||||||
|
|
||||||
When `enabled` is `true` and `accessToken` is empty, SubMiner opens an AniList setup helper window. Keep `enabled` as `false` to disable all AniList setup/update behavior.
|
When `enabled` is `true` and `accessToken` is empty, SubMiner opens an AniList setup helper window. Keep `enabled` as `false` to disable all AniList setup/update behavior.
|
||||||
|
|
||||||
@@ -1122,8 +1123,8 @@ For GameSentenceMiner on Linux, the default overlay profile path is typically `~
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
| Option | Values | Description |
|
| Option | Values | Description |
|
||||||
| --------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `externalProfilePath` | string path | Optional absolute path, or a path beginning with `~` (expanded to your home directory), to another app's Yomitan Electron profile. SubMiner loads that profile read-only and reuses its dictionaries/settings. |
|
| `externalProfilePath` | string path | Optional absolute path, or a path beginning with `~` (expanded to your home directory), to another app's Yomitan Electron profile. SubMiner loads that profile read-only and reuses its dictionaries/settings. |
|
||||||
|
|
||||||
External-profile mode behavior:
|
External-profile mode behavior:
|
||||||
@@ -1208,12 +1209,12 @@ Discord Rich Presence is enabled by default. SubMiner publishes a polished activ
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
| Option | Values | Description |
|
| Option | Values | Description |
|
||||||
| ------------------ | ------------------------------------------------- | ---------------------------------------------------------- |
|
| ------------------ | ------------------------------------------------ | ---------------------------------------------------------- |
|
||||||
| `enabled` | `true`, `false` | Enable Discord Rich Presence updates (default: `true`) |
|
| `enabled` | `true`, `false` | Enable Discord Rich Presence updates (default: `true`) |
|
||||||
| `presenceStyle` | `"default"`, `"meme"`, `"japanese"`, `"minimal"` | Card text preset (default: `"default"`) |
|
| `presenceStyle` | `"default"`, `"meme"`, `"japanese"`, `"minimal"` | Card text preset (default: `"default"`) |
|
||||||
| `updateIntervalMs` | number | Minimum interval between activity updates in milliseconds |
|
| `updateIntervalMs` | number | Minimum interval between activity updates in milliseconds |
|
||||||
| `debounceMs` | number | Debounce window for bursty playback events in milliseconds |
|
| `debounceMs` | number | Debounce window for bursty playback events in milliseconds |
|
||||||
|
|
||||||
Setup steps:
|
Setup steps:
|
||||||
|
|
||||||
@@ -1225,12 +1226,12 @@ Setup steps:
|
|||||||
|
|
||||||
While playing media, the **Details** line always shows the current media title and **State** shows `Playing mm:ss / mm:ss` or `Paused mm:ss / mm:ss`. The preset controls what appears when idle and the tooltip text on images.
|
While playing media, the **Details** line always shows the current media title and **State** shows `Playing mm:ss / mm:ss` or `Paused mm:ss / mm:ss`. The preset controls what appears when idle and the tooltip text on images.
|
||||||
|
|
||||||
| Preset | Idle details | Small image text | Vibe |
|
| Preset | Idle details | Small image text | Vibe |
|
||||||
| ------------ | ----------------------------------- | ------------------ | --------------------------------------- |
|
| ------------- | ---------------------------------- | ------------------ | --------------------------------------- |
|
||||||
| **`default`**| `Sentence Mining` | `日本語学習中` | Clean, bilingual flair |
|
| **`default`** | `Sentence Mining` | `日本語学習中` | Clean, bilingual flair |
|
||||||
| `meme` | `Mining and crafting (Anki cards)` | `Sentence Mining` | Minecraft-inspired joke |
|
| `meme` | `Mining and crafting (Anki cards)` | `Sentence Mining` | Minecraft-inspired joke |
|
||||||
| `japanese` | `文の採掘中` | `イマージョン学習` | Fully Japanese |
|
| `japanese` | `文の採掘中` | `イマージョン学習` | Fully Japanese |
|
||||||
| `minimal` | `SubMiner` | *(none)* | Bare essentials, no small image overlay |
|
| `minimal` | `SubMiner` | _(none)_ | Bare essentials, no small image overlay |
|
||||||
|
|
||||||
All presets use the `subminer-logo` large image with `SubMiner` tooltip. No activity button is shown by default.
|
All presets use the `subminer-logo` large image with `SubMiner` tooltip. No activity button is shown by default.
|
||||||
|
|
||||||
@@ -1273,23 +1274,23 @@ Enable or disable local immersion analytics stored in SQLite for mined subtitles
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
| Option | Values | Description |
|
| Option | Values | Description |
|
||||||
| ------------------------------ | ----------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
| ------------------------------ | ----------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||||
| `enabled` | `true`, `false` | Enable immersion tracking. Defaults to `true`. |
|
| `enabled` | `true`, `false` | Enable immersion tracking. Defaults to `true`. |
|
||||||
| `dbPath` | string | Optional SQLite database path. Leave empty to use default app-data path at `<config dir>/immersion.sqlite`. |
|
| `dbPath` | string | Optional SQLite database path. Leave empty to use default app-data path at `<config dir>/immersion.sqlite`. |
|
||||||
| `batchSize` | integer (`1`-`10000`) | Buffered writes per transaction. Default `25`. |
|
| `batchSize` | integer (`1`-`10000`) | Buffered writes per transaction. Default `25`. |
|
||||||
| `flushIntervalMs` | integer (`50`-`60000`) | Maximum queue delay before flush. Default `500ms`. |
|
| `flushIntervalMs` | integer (`50`-`60000`) | Maximum queue delay before flush. Default `500ms`. |
|
||||||
| `queueCap` | integer (`100`-`100000`) | In-memory queue cap. Overflow drops oldest writes. Default `1000`. |
|
| `queueCap` | integer (`100`-`100000`) | In-memory queue cap. Overflow drops oldest writes. Default `1000`. |
|
||||||
| `payloadCapBytes` | integer (`64`-`8192`) | Event payload byte cap before truncation marker. Default `256`. |
|
| `payloadCapBytes` | integer (`64`-`8192`) | Event payload byte cap before truncation marker. Default `256`. |
|
||||||
| `maintenanceIntervalMs` | integer (`60000`-`604800000`) | Prune + rollup maintenance cadence. Default `86400000` (24h). |
|
| `maintenanceIntervalMs` | integer (`60000`-`604800000`) | Prune + rollup maintenance cadence. Default `86400000` (24h). |
|
||||||
| `retentionMode` | `preset`,`advanced` | Retention mode. `preset` applies `retentionPreset`, `advanced` uses explicit values only. Default `preset`. |
|
| `retentionMode` | `preset`,`advanced` | Retention mode. `preset` applies `retentionPreset`, `advanced` uses explicit values only. Default `preset`. |
|
||||||
| `retentionPreset` | `minimal`,`balanced`,`deep-history` | Retention preset used when `retentionMode = "preset"`. Default `balanced`. |
|
| `retentionPreset` | `minimal`,`balanced`,`deep-history` | Retention preset used when `retentionMode = "preset"`. Default `balanced`. |
|
||||||
| `retention.eventsDays` | integer (`0`-`3650`) | Raw event retention window in days. Default `0` (keep all). |
|
| `retention.eventsDays` | integer (`0`-`3650`) | Raw event retention window in days. Default `0` (keep all). |
|
||||||
| `retention.telemetryDays` | integer (`0`-`3650`) | Telemetry retention window in days. Default `0` (keep all). |
|
| `retention.telemetryDays` | integer (`0`-`3650`) | Telemetry retention window in days. Default `0` (keep all). |
|
||||||
| `retention.sessionsDays` | integer (`0`-`3650`) | Session retention window in days. Default `0` (keep all). |
|
| `retention.sessionsDays` | integer (`0`-`3650`) | Session retention window in days. Default `0` (keep all). |
|
||||||
| `retention.dailyRollupsDays` | integer (`0`-`36500`) | Daily rollup retention window. Default `0` (keep all). |
|
| `retention.dailyRollupsDays` | integer (`0`-`36500`) | Daily rollup retention window. Default `0` (keep all). |
|
||||||
| `retention.monthlyRollupsDays` | integer (`0`-`36500`) | Monthly rollup retention window. Default `0` (keep all). |
|
| `retention.monthlyRollupsDays` | integer (`0`-`36500`) | Monthly rollup retention window. Default `0` (keep all). |
|
||||||
| `retention.vacuumIntervalDays` | integer (`0`-`3650`) | Minimum spacing between `VACUUM` passes. `0` disables vacuum. Default `0` (disabled). |
|
| `retention.vacuumIntervalDays` | integer (`0`-`3650`) | Minimum spacing between `VACUUM` passes. `0` disables vacuum. Default `0` (disabled). |
|
||||||
|
|
||||||
You can also disable immersion tracking for a single session using:
|
You can also disable immersion tracking for a single session using:
|
||||||
|
|
||||||
@@ -1326,11 +1327,11 @@ Configure the local stats UI served from SubMiner and the in-app stats overlay t
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
| Option | Values | Description |
|
| Option | Values | Description |
|
||||||
| ----------------- | ----------------- | --------------------------------------------------------------------------- |
|
| ----------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `toggleKey` | Electron key code | Overlay-local key code used to toggle the stats overlay. Default `Backquote`. |
|
| `toggleKey` | Electron key code | Overlay-local key code used to toggle the stats overlay. Default `Backquote`. |
|
||||||
| `serverPort` | integer | Localhost port for the browser stats UI. Default `6969`. |
|
| `serverPort` | integer | Localhost port for the browser stats UI. Default `6969`. |
|
||||||
| `autoStartServer` | `true`, `false` | Start the local stats HTTP server automatically once immersion tracking is active. Default `true`. |
|
| `autoStartServer` | `true`, `false` | Start the local stats HTTP server automatically once immersion tracking is active. Default `true`. |
|
||||||
| `autoOpenBrowser` | `true`, `false` | When `subminer stats` starts the server on demand, also open the dashboard in your default browser. Default `false`. |
|
| `autoOpenBrowser` | `true`, `false` | When `subminer stats` starts the server on demand, also open the dashboard in your default browser. Default `false`. |
|
||||||
|
|
||||||
Usage notes:
|
Usage notes:
|
||||||
@@ -1340,6 +1341,30 @@ Usage notes:
|
|||||||
- The dashboard reads from the same immersion-tracking database, so keep `immersionTracking.enabled` on if you want data to appear.
|
- The dashboard reads from the same immersion-tracking database, so keep `immersionTracking.enabled` on if you want data to appear.
|
||||||
- The UI includes Overview, Library, Trends, Vocabulary, and Sessions tabs.
|
- The UI includes Overview, Library, Trends, Vocabulary, and Sessions tabs.
|
||||||
|
|
||||||
|
### MPV Launcher
|
||||||
|
|
||||||
|
Configure the mpv executable and window state for SubMiner-managed mpv launches (launcher playback, Windows `--launch-mpv`, and Jellyfin idle mpv startup):
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"mpv": {
|
||||||
|
"executablePath": "",
|
||||||
|
"launchMode": "normal"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
| Option | Values | Description |
|
||||||
|
| ---------------- | --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `executablePath` | string | Absolute path to `mpv.exe` for Windows launch flows. Leave empty to auto-discover from `SUBMINER_MPV_PATH` or `PATH` (default `""`) |
|
||||||
|
| `launchMode` | `"normal"` \| `"maximized"` \| `"fullscreen"` | Window state when SubMiner spawns mpv (default `"normal"`) |
|
||||||
|
|
||||||
|
Launch mode behavior:
|
||||||
|
|
||||||
|
- **`normal`** — mpv opens at its default window size with no extra flags.
|
||||||
|
- **`maximized`** — mpv starts maximized via `--window-maximized=yes`, keeping taskbar access.
|
||||||
|
- **`fullscreen`** — mpv starts in true fullscreen via `--fullscreen`.
|
||||||
|
|
||||||
### YouTube Playback Settings
|
### YouTube Playback Settings
|
||||||
|
|
||||||
Set defaults used by managed subtitle auto-selection and the `subminer` launcher YouTube flow:
|
Set defaults used by managed subtitle auto-selection and the `subminer` launcher YouTube flow:
|
||||||
@@ -1352,9 +1377,9 @@ Set defaults used by managed subtitle auto-selection and the `subminer` launcher
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
| Option | Values | Description |
|
| Option | Values | Description |
|
||||||
| --------------------- | -------------------- | ---------------------------------------------------------------------------------------------- |
|
| --------------------- | -------- | ------------------------------------------------------------------------------------------------ |
|
||||||
| `primarySubLanguages` | string[] | Primary subtitle language priority for managed subtitle auto-selection (default `["ja", "jpn"]`) |
|
| `primarySubLanguages` | string[] | Primary subtitle language priority for managed subtitle auto-selection (default `["ja", "jpn"]`) |
|
||||||
|
|
||||||
Current launcher behavior:
|
Current launcher behavior:
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,10 @@ const installationContents = readFileSync(new URL('./installation.md', import.me
|
|||||||
const mpvPluginContents = readFileSync(new URL('./mpv-plugin.md', import.meta.url), 'utf8');
|
const mpvPluginContents = readFileSync(new URL('./mpv-plugin.md', import.meta.url), 'utf8');
|
||||||
const developmentContents = readFileSync(new URL('./development.md', import.meta.url), 'utf8');
|
const developmentContents = readFileSync(new URL('./development.md', import.meta.url), 'utf8');
|
||||||
const changelogContents = readFileSync(new URL('./changelog.md', import.meta.url), 'utf8');
|
const changelogContents = readFileSync(new URL('./changelog.md', import.meta.url), 'utf8');
|
||||||
const ankiIntegrationContents = readFileSync(new URL('./anki-integration.md', import.meta.url), 'utf8');
|
const ankiIntegrationContents = readFileSync(
|
||||||
|
new URL('./anki-integration.md', import.meta.url),
|
||||||
|
'utf8',
|
||||||
|
);
|
||||||
const configurationContents = readFileSync(new URL('./configuration.md', import.meta.url), 'utf8');
|
const configurationContents = readFileSync(new URL('./configuration.md', import.meta.url), 'utf8');
|
||||||
|
|
||||||
function extractReleaseHeadings(content: string, count: number): string[] {
|
function extractReleaseHeadings(content: string, count: number): string[] {
|
||||||
@@ -17,6 +20,13 @@ function extractReleaseHeadings(content: string, count: number): string[] {
|
|||||||
.slice(0, count);
|
.slice(0, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function extractCurrentMinorHeadings(content: string): string[] {
|
||||||
|
const allHeadings = Array.from(content.matchAll(/^## v(\d+\.\d+)\.\d+[^\n]*$/gm));
|
||||||
|
if (allHeadings.length === 0) return [];
|
||||||
|
const currentMinor = allHeadings[0]![1];
|
||||||
|
return allHeadings.filter(([, minor]) => minor === currentMinor).map(([heading]) => heading);
|
||||||
|
}
|
||||||
|
|
||||||
test('docs reflect current launcher and release surfaces', () => {
|
test('docs reflect current launcher and release surfaces', () => {
|
||||||
expect(usageContents).not.toContain('--mode preprocess');
|
expect(usageContents).not.toContain('--mode preprocess');
|
||||||
expect(usageContents).not.toContain('"automatic" (default)');
|
expect(usageContents).not.toContain('"automatic" (default)');
|
||||||
@@ -44,9 +54,11 @@ test('docs reflect current launcher and release surfaces', () => {
|
|||||||
expect(configurationContents).toContain('youtube.primarySubLanguages');
|
expect(configurationContents).toContain('youtube.primarySubLanguages');
|
||||||
expect(configurationContents).toContain('### Shared AI Provider');
|
expect(configurationContents).toContain('### Shared AI Provider');
|
||||||
|
|
||||||
expect(changelogContents).toContain('## v0.5.1 (2026-03-09)');
|
expect(changelogContents).toContain('v0.5.1 (2026-03-09)');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('docs changelog keeps the newest release headings aligned with the root changelog', () => {
|
test('docs changelog keeps the current minor release headings aligned with the root changelog', () => {
|
||||||
expect(extractReleaseHeadings(changelogContents, 3)).toEqual(extractReleaseHeadings(rootChangelogContents, 3));
|
const docsHeadings = extractCurrentMinorHeadings(changelogContents);
|
||||||
|
expect(docsHeadings.length).toBeGreaterThan(0);
|
||||||
|
expect(docsHeadings).toEqual(extractReleaseHeadings(rootChangelogContents, docsHeadings.length));
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -461,10 +461,12 @@
|
|||||||
// ==========================================
|
// ==========================================
|
||||||
// MPV Launcher
|
// MPV Launcher
|
||||||
// Optional mpv.exe override for Windows playback entry points.
|
// Optional mpv.exe override for Windows playback entry points.
|
||||||
|
// Set mpv.launchMode to choose normal, maximized, or fullscreen SubMiner-managed mpv playback.
|
||||||
// Leave mpv.executablePath blank to auto-discover mpv.exe from SUBMINER_MPV_PATH or PATH.
|
// Leave mpv.executablePath blank to auto-discover mpv.exe from SUBMINER_MPV_PATH or PATH.
|
||||||
// ==========================================
|
// ==========================================
|
||||||
"mpv": {
|
"mpv": {
|
||||||
"executablePath": "" // Optional absolute path to mpv.exe for Windows launch flows. Leave empty to auto-discover from SUBMINER_MPV_PATH or PATH.
|
"executablePath": "", // Optional absolute path to mpv.exe for Windows launch flows. Leave empty to auto-discover from SUBMINER_MPV_PATH or PATH.
|
||||||
|
"launchMode": "normal" // Default window state for SubMiner-managed mpv launches. Values: normal | maximized | fullscreen
|
||||||
}, // Optional mpv.exe override for Windows playback entry points.
|
}, // Optional mpv.exe override for Windows playback entry points.
|
||||||
|
|
||||||
// ==========================================
|
// ==========================================
|
||||||
|
|||||||
@@ -125,10 +125,7 @@ function titleOverlapScore(expectedTitle: string, candidateTitle: string): numbe
|
|||||||
if (!expected || !candidate) return 0;
|
if (!expected || !candidate) return 0;
|
||||||
|
|
||||||
if (candidate.includes(expected)) return 120;
|
if (candidate.includes(expected)) return 120;
|
||||||
if (
|
if (candidate.split(' ').length >= 2 && ` ${expected} `.includes(` ${candidate} `)) {
|
||||||
candidate.split(' ').length >= 2 &&
|
|
||||||
` ${expected} `.includes(` ${candidate} `)
|
|
||||||
) {
|
|
||||||
return 90;
|
return 90;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ function createContext(): LauncherCommandContext {
|
|||||||
jellyfinServer: '',
|
jellyfinServer: '',
|
||||||
jellyfinUsername: '',
|
jellyfinUsername: '',
|
||||||
jellyfinPassword: '',
|
jellyfinPassword: '',
|
||||||
|
launchMode: 'normal',
|
||||||
},
|
},
|
||||||
scriptPath: '/tmp/subminer',
|
scriptPath: '/tmp/subminer',
|
||||||
scriptName: 'subminer',
|
scriptName: 'subminer',
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import test from 'node:test';
|
|||||||
import assert from 'node:assert/strict';
|
import assert from 'node:assert/strict';
|
||||||
import { parseLauncherYoutubeSubgenConfig } from './config/youtube-subgen-config.js';
|
import { parseLauncherYoutubeSubgenConfig } from './config/youtube-subgen-config.js';
|
||||||
import { parseLauncherJellyfinConfig } from './config/jellyfin-config.js';
|
import { parseLauncherJellyfinConfig } from './config/jellyfin-config.js';
|
||||||
|
import { parseLauncherMpvConfig } from './config/mpv-config.js';
|
||||||
import { readExternalYomitanProfilePath } from './config.js';
|
import { readExternalYomitanProfilePath } from './config.js';
|
||||||
import {
|
import {
|
||||||
getPluginConfigCandidates,
|
getPluginConfigCandidates,
|
||||||
@@ -80,6 +81,27 @@ test('parseLauncherJellyfinConfig omits legacy token and user id fields', () =>
|
|||||||
assert.equal('userId' in parsed, false);
|
assert.equal('userId' in parsed, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('parseLauncherMpvConfig reads launch mode preference', () => {
|
||||||
|
const parsed = parseLauncherMpvConfig({
|
||||||
|
mpv: {
|
||||||
|
launchMode: ' maximized ',
|
||||||
|
executablePath: 'ignored-here',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
assert.equal(parsed.launchMode, 'maximized');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('parseLauncherMpvConfig ignores invalid launch mode values', () => {
|
||||||
|
const parsed = parseLauncherMpvConfig({
|
||||||
|
mpv: {
|
||||||
|
launchMode: 'wide',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
assert.equal(parsed.launchMode, undefined);
|
||||||
|
});
|
||||||
|
|
||||||
test('parsePluginRuntimeConfigContent reads socket path and startup gate options', () => {
|
test('parsePluginRuntimeConfigContent reads socket path and startup gate options', () => {
|
||||||
const parsed = parsePluginRuntimeConfigContent(`
|
const parsed = parsePluginRuntimeConfigContent(`
|
||||||
# comment
|
# comment
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { fail } from './log.js';
|
|||||||
import type {
|
import type {
|
||||||
Args,
|
Args,
|
||||||
LauncherJellyfinConfig,
|
LauncherJellyfinConfig,
|
||||||
|
LauncherMpvConfig,
|
||||||
LauncherYoutubeSubgenConfig,
|
LauncherYoutubeSubgenConfig,
|
||||||
LogLevel,
|
LogLevel,
|
||||||
PluginRuntimeConfig,
|
PluginRuntimeConfig,
|
||||||
@@ -13,6 +14,7 @@ import {
|
|||||||
} from './config/args-normalizer.js';
|
} from './config/args-normalizer.js';
|
||||||
import { parseCliPrograms, resolveTopLevelCommand } from './config/cli-parser-builder.js';
|
import { parseCliPrograms, resolveTopLevelCommand } from './config/cli-parser-builder.js';
|
||||||
import { parseLauncherJellyfinConfig } from './config/jellyfin-config.js';
|
import { parseLauncherJellyfinConfig } from './config/jellyfin-config.js';
|
||||||
|
import { parseLauncherMpvConfig } from './config/mpv-config.js';
|
||||||
import { readPluginRuntimeConfig as readPluginRuntimeConfigValue } from './config/plugin-runtime-config.js';
|
import { readPluginRuntimeConfig as readPluginRuntimeConfigValue } from './config/plugin-runtime-config.js';
|
||||||
import { readLauncherMainConfigObject } from './config/shared-config-reader.js';
|
import { readLauncherMainConfigObject } from './config/shared-config-reader.js';
|
||||||
import { parseLauncherYoutubeSubgenConfig } from './config/youtube-subgen-config.js';
|
import { parseLauncherYoutubeSubgenConfig } from './config/youtube-subgen-config.js';
|
||||||
@@ -44,6 +46,12 @@ export function loadLauncherJellyfinConfig(): LauncherJellyfinConfig {
|
|||||||
return parseLauncherJellyfinConfig(root);
|
return parseLauncherJellyfinConfig(root);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function loadLauncherMpvConfig(): LauncherMpvConfig {
|
||||||
|
const root = readLauncherMainConfigObject();
|
||||||
|
if (!root) return {};
|
||||||
|
return parseLauncherMpvConfig(root);
|
||||||
|
}
|
||||||
|
|
||||||
export function hasLauncherExternalYomitanProfileConfig(): boolean {
|
export function hasLauncherExternalYomitanProfileConfig(): boolean {
|
||||||
return readExternalYomitanProfilePath(readLauncherMainConfigObject()) !== null;
|
return readExternalYomitanProfilePath(readLauncherMainConfigObject()) !== null;
|
||||||
}
|
}
|
||||||
@@ -56,9 +64,10 @@ export function parseArgs(
|
|||||||
argv: string[],
|
argv: string[],
|
||||||
scriptName: string,
|
scriptName: string,
|
||||||
launcherConfig: LauncherYoutubeSubgenConfig,
|
launcherConfig: LauncherYoutubeSubgenConfig,
|
||||||
|
launcherMpvConfig: LauncherMpvConfig = {},
|
||||||
): Args {
|
): Args {
|
||||||
const topLevelCommand = resolveTopLevelCommand(argv);
|
const topLevelCommand = resolveTopLevelCommand(argv);
|
||||||
const parsed = createDefaultArgs(launcherConfig);
|
const parsed = createDefaultArgs(launcherConfig, launcherMpvConfig);
|
||||||
|
|
||||||
if (topLevelCommand && (topLevelCommand.name === 'app' || topLevelCommand.name === 'bin')) {
|
if (topLevelCommand && (topLevelCommand.name === 'app' || topLevelCommand.name === 'bin')) {
|
||||||
parsed.appPassthrough = true;
|
parsed.appPassthrough = true;
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
import fs from 'node:fs';
|
import fs from 'node:fs';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import { fail } from '../log.js';
|
import { fail } from '../log.js';
|
||||||
import type { Args, Backend, LauncherYoutubeSubgenConfig, LogLevel } from '../types.js';
|
import type {
|
||||||
|
Args,
|
||||||
|
Backend,
|
||||||
|
LauncherMpvConfig,
|
||||||
|
LauncherYoutubeSubgenConfig,
|
||||||
|
LogLevel,
|
||||||
|
} from '../types.js';
|
||||||
import {
|
import {
|
||||||
DEFAULT_JIMAKU_API_BASE_URL,
|
DEFAULT_JIMAKU_API_BASE_URL,
|
||||||
DEFAULT_YOUTUBE_PRIMARY_SUB_LANGS,
|
DEFAULT_YOUTUBE_PRIMARY_SUB_LANGS,
|
||||||
@@ -83,7 +89,10 @@ function parseDictionaryTarget(value: string): string {
|
|||||||
return resolved;
|
return resolved;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createDefaultArgs(launcherConfig: LauncherYoutubeSubgenConfig): Args {
|
export function createDefaultArgs(
|
||||||
|
launcherConfig: LauncherYoutubeSubgenConfig,
|
||||||
|
mpvConfig: LauncherMpvConfig = {},
|
||||||
|
): Args {
|
||||||
const configuredSecondaryLangs = uniqueNormalizedLangCodes(
|
const configuredSecondaryLangs = uniqueNormalizedLangCodes(
|
||||||
launcherConfig.secondarySubLanguages ?? [],
|
launcherConfig.secondarySubLanguages ?? [],
|
||||||
);
|
);
|
||||||
@@ -148,6 +157,7 @@ export function createDefaultArgs(launcherConfig: LauncherYoutubeSubgenConfig):
|
|||||||
jellyfinServer: '',
|
jellyfinServer: '',
|
||||||
jellyfinUsername: '',
|
jellyfinUsername: '',
|
||||||
jellyfinPassword: '',
|
jellyfinPassword: '',
|
||||||
|
launchMode: mpvConfig.launchMode ?? 'normal',
|
||||||
youtubePrimarySubLangs: primarySubLangs,
|
youtubePrimarySubLangs: primarySubLangs,
|
||||||
youtubeSecondarySubLangs: secondarySubLangs,
|
youtubeSecondarySubLangs: secondarySubLangs,
|
||||||
youtubeAudioLangs,
|
youtubeAudioLangs,
|
||||||
|
|||||||
12
launcher/config/mpv-config.ts
Normal file
12
launcher/config/mpv-config.ts
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import { parseMpvLaunchMode } from '../../src/shared/mpv-launch-mode.js';
|
||||||
|
import type { LauncherMpvConfig } from '../types.js';
|
||||||
|
|
||||||
|
export function parseLauncherMpvConfig(root: Record<string, unknown>): LauncherMpvConfig {
|
||||||
|
const mpvRaw = root.mpv;
|
||||||
|
if (!mpvRaw || typeof mpvRaw !== 'object') return {};
|
||||||
|
const mpv = mpvRaw as Record<string, unknown>;
|
||||||
|
|
||||||
|
return {
|
||||||
|
launchMode: parseMpvLaunchMode(mpv.launchMode),
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import {
|
import {
|
||||||
loadLauncherJellyfinConfig,
|
loadLauncherJellyfinConfig,
|
||||||
|
loadLauncherMpvConfig,
|
||||||
loadLauncherYoutubeSubgenConfig,
|
loadLauncherYoutubeSubgenConfig,
|
||||||
parseArgs,
|
parseArgs,
|
||||||
readPluginRuntimeConfig,
|
readPluginRuntimeConfig,
|
||||||
@@ -52,7 +53,8 @@ async function main(): Promise<void> {
|
|||||||
const scriptPath = process.argv[1] || 'subminer';
|
const scriptPath = process.argv[1] || 'subminer';
|
||||||
const scriptName = path.basename(scriptPath);
|
const scriptName = path.basename(scriptPath);
|
||||||
const launcherConfig = loadLauncherYoutubeSubgenConfig();
|
const launcherConfig = loadLauncherYoutubeSubgenConfig();
|
||||||
const args = parseArgs(process.argv.slice(2), scriptName, launcherConfig);
|
const launcherMpvConfig = loadLauncherMpvConfig();
|
||||||
|
const args = parseArgs(process.argv.slice(2), scriptName, launcherConfig, launcherMpvConfig);
|
||||||
const pluginRuntimeConfig = readPluginRuntimeConfig(args.logLevel);
|
const pluginRuntimeConfig = readPluginRuntimeConfig(args.logLevel);
|
||||||
const appPath = findAppBinary(scriptPath);
|
const appPath = findAppBinary(scriptPath);
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import net from 'node:net';
|
|||||||
import { EventEmitter } from 'node:events';
|
import { EventEmitter } from 'node:events';
|
||||||
import type { Args } from './types';
|
import type { Args } from './types';
|
||||||
import {
|
import {
|
||||||
|
buildConfiguredMpvDefaultArgs,
|
||||||
buildMpvBackendArgs,
|
buildMpvBackendArgs,
|
||||||
buildMpvEnv,
|
buildMpvEnv,
|
||||||
cleanupPlaybackSession,
|
cleanupPlaybackSession,
|
||||||
@@ -234,6 +235,33 @@ test('buildMpvBackendArgs keeps supported Hyprland and Sway auto backends unchan
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('buildConfiguredMpvDefaultArgs appends maximized launch mode to configured defaults', () => {
|
||||||
|
withPlatform('linux', () => {
|
||||||
|
assert.deepEqual(
|
||||||
|
buildConfiguredMpvDefaultArgs(makeArgs({ launchMode: 'maximized' }), {
|
||||||
|
DISPLAY: ':1',
|
||||||
|
WAYLAND_DISPLAY: 'wayland-0',
|
||||||
|
XDG_SESSION_TYPE: 'wayland',
|
||||||
|
XDG_CURRENT_DESKTOP: 'KDE',
|
||||||
|
XDG_SESSION_DESKTOP: 'plasma',
|
||||||
|
}),
|
||||||
|
[
|
||||||
|
'--sub-auto=fuzzy',
|
||||||
|
'--sub-file-paths=.;subs;subtitles',
|
||||||
|
'--sid=auto',
|
||||||
|
'--secondary-sid=auto',
|
||||||
|
'--secondary-sub-visibility=no',
|
||||||
|
'--alang=ja,jp,jpn,japanese,en,eng,english,enus,en-us',
|
||||||
|
'--slang=ja,jp,jpn,japanese,en,eng,english,enus,en-us',
|
||||||
|
'--vo=gpu',
|
||||||
|
'--gpu-api=opengl',
|
||||||
|
'--gpu-context=x11egl,x11',
|
||||||
|
'--window-maximized=yes',
|
||||||
|
],
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
test('launchTexthookerOnly exits non-zero when app binary cannot be spawned', () => {
|
test('launchTexthookerOnly exits non-zero when app binary cannot be spawned', () => {
|
||||||
const error = withProcessExitIntercept(() => {
|
const error = withProcessExitIntercept(() => {
|
||||||
launchTexthookerOnly('/definitely-missing-subminer-binary', makeArgs());
|
launchTexthookerOnly('/definitely-missing-subminer-binary', makeArgs());
|
||||||
@@ -401,6 +429,7 @@ function makeArgs(overrides: Partial<Args> = {}): Args {
|
|||||||
jellyfinServer: '',
|
jellyfinServer: '',
|
||||||
jellyfinUsername: '',
|
jellyfinUsername: '',
|
||||||
jellyfinPassword: '',
|
jellyfinPassword: '',
|
||||||
|
launchMode: 'normal',
|
||||||
...overrides,
|
...overrides,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -686,18 +715,18 @@ function runFindAppBinaryWindowsInstallDirCase(): void {
|
|||||||
process.env.SUBMINER_BINARY_PATH = installDir;
|
process.env.SUBMINER_BINARY_PATH = installDir;
|
||||||
|
|
||||||
withPlatform('win32', () => {
|
withPlatform('win32', () => {
|
||||||
withExistsAndStatSyncStubs(
|
withExistsAndStatSyncStubs({ existingPaths: [appExe], directoryPaths: [installDir] }, () => {
|
||||||
{ existingPaths: [appExe], directoryPaths: [installDir] },
|
withAccessSyncStub(
|
||||||
() => {
|
(filePath) => filePath === appExe,
|
||||||
withAccessSyncStub(
|
() => {
|
||||||
(filePath) => filePath === appExe,
|
const result = findAppBinary(
|
||||||
() => {
|
path.win32.join(baseDir, 'launcher', 'SubMiner.exe'),
|
||||||
const result = findAppBinary(path.win32.join(baseDir, 'launcher', 'SubMiner.exe'), path.win32);
|
path.win32,
|
||||||
assert.equal(result, appExe);
|
);
|
||||||
},
|
assert.equal(result, appExe);
|
||||||
);
|
},
|
||||||
},
|
);
|
||||||
);
|
});
|
||||||
});
|
});
|
||||||
} finally {
|
} finally {
|
||||||
os.homedir = originalHomedir;
|
os.homedir = originalHomedir;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import path from 'node:path';
|
|||||||
import os from 'node:os';
|
import os from 'node:os';
|
||||||
import net from 'node:net';
|
import net from 'node:net';
|
||||||
import { spawn, spawnSync } from 'node:child_process';
|
import { spawn, spawnSync } from 'node:child_process';
|
||||||
|
import { buildMpvLaunchModeArgs } from '../src/shared/mpv-launch-mode.js';
|
||||||
import type { LogLevel, Backend, Args, MpvTrack } from './types.js';
|
import type { LogLevel, Backend, Args, MpvTrack } from './types.js';
|
||||||
import { DEFAULT_MPV_SUBMINER_ARGS, DEFAULT_YOUTUBE_YTDL_FORMAT } from './types.js';
|
import { DEFAULT_MPV_SUBMINER_ARGS, DEFAULT_YOUTUBE_YTDL_FORMAT } from './types.js';
|
||||||
import { appendToAppLog, getAppLogPath, log, fail, getMpvLogPath } from './log.js';
|
import { appendToAppLog, getAppLogPath, log, fail, getMpvLogPath } from './log.js';
|
||||||
@@ -263,10 +264,7 @@ function getLinuxDesktopEnv(env: NodeJS.ProcessEnv): LinuxDesktopEnv {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function shouldForceX11MpvBackend(
|
function shouldForceX11MpvBackend(args: Pick<Args, 'backend'>, env: NodeJS.ProcessEnv): boolean {
|
||||||
args: Pick<Args, 'backend'>,
|
|
||||||
env: NodeJS.ProcessEnv,
|
|
||||||
): boolean {
|
|
||||||
if (process.platform !== 'linux' || !env.DISPLAY?.trim()) {
|
if (process.platform !== 'linux' || !env.DISPLAY?.trim()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -673,9 +671,7 @@ export async function startMpv(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const mpvArgs: string[] = [];
|
const mpvArgs: string[] = [];
|
||||||
if (args.profile) mpvArgs.push(`--profile=${args.profile}`);
|
mpvArgs.push(...buildConfiguredMpvDefaultArgs(args));
|
||||||
mpvArgs.push(...DEFAULT_MPV_SUBMINER_ARGS);
|
|
||||||
mpvArgs.push(...buildMpvBackendArgs(args));
|
|
||||||
if (targetKind === 'url' && isYoutubeTarget(target)) {
|
if (targetKind === 'url' && isYoutubeTarget(target)) {
|
||||||
log('info', args.logLevel, 'Applying URL playback options');
|
log('info', args.logLevel, 'Applying URL playback options');
|
||||||
mpvArgs.push('--ytdl=yes');
|
mpvArgs.push('--ytdl=yes');
|
||||||
@@ -703,7 +699,6 @@ export async function startMpv(
|
|||||||
if (args.mpvArgs) {
|
if (args.mpvArgs) {
|
||||||
mpvArgs.push(...parseMpvArgString(args.mpvArgs));
|
mpvArgs.push(...parseMpvArgString(args.mpvArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (preloadedSubtitles?.primaryPath) {
|
if (preloadedSubtitles?.primaryPath) {
|
||||||
mpvArgs.push(`--sub-file=${preloadedSubtitles.primaryPath}`);
|
mpvArgs.push(`--sub-file=${preloadedSubtitles.primaryPath}`);
|
||||||
}
|
}
|
||||||
@@ -979,6 +974,18 @@ export function buildMpvBackendArgs(
|
|||||||
return ['--vo=gpu', '--gpu-api=opengl', '--gpu-context=x11egl,x11'];
|
return ['--vo=gpu', '--gpu-api=opengl', '--gpu-context=x11egl,x11'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function buildConfiguredMpvDefaultArgs(
|
||||||
|
args: Pick<Args, 'profile' | 'backend' | 'launchMode'>,
|
||||||
|
baseEnv: NodeJS.ProcessEnv = process.env,
|
||||||
|
): string[] {
|
||||||
|
const mpvArgs: string[] = [];
|
||||||
|
if (args.profile) mpvArgs.push(`--profile=${args.profile}`);
|
||||||
|
mpvArgs.push(...DEFAULT_MPV_SUBMINER_ARGS);
|
||||||
|
mpvArgs.push(...buildMpvBackendArgs(args, baseEnv));
|
||||||
|
mpvArgs.push(...buildMpvLaunchModeArgs(args.launchMode));
|
||||||
|
return mpvArgs;
|
||||||
|
}
|
||||||
|
|
||||||
function appendCapturedAppOutput(kind: 'STDOUT' | 'STDERR', chunk: string): void {
|
function appendCapturedAppOutput(kind: 'STDOUT' | 'STDERR', chunk: string): void {
|
||||||
const normalized = chunk.replace(/\r\n/g, '\n');
|
const normalized = chunk.replace(/\r\n/g, '\n');
|
||||||
for (const line of normalized.split('\n')) {
|
for (const line of normalized.split('\n')) {
|
||||||
@@ -1209,10 +1216,7 @@ export function launchMpvIdleDetached(
|
|||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
|
|
||||||
const mpvArgs: string[] = [];
|
const mpvArgs: string[] = buildConfiguredMpvDefaultArgs(args);
|
||||||
if (args.profile) mpvArgs.push(`--profile=${args.profile}`);
|
|
||||||
mpvArgs.push(...DEFAULT_MPV_SUBMINER_ARGS);
|
|
||||||
mpvArgs.push(...buildMpvBackendArgs(args));
|
|
||||||
if (args.mpvArgs) {
|
if (args.mpvArgs) {
|
||||||
mpvArgs.push(...parseMpvArgString(args.mpvArgs));
|
mpvArgs.push(...parseMpvArgString(args.mpvArgs));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,6 +85,12 @@ test('parseArgs maps mpv idle action', () => {
|
|||||||
assert.equal(parsed.mpvStatus, false);
|
assert.equal(parsed.mpvStatus, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('parseArgs applies configured mpv launch mode default', () => {
|
||||||
|
const parsed = parseArgs([], 'subminer', {}, { launchMode: 'maximized' });
|
||||||
|
|
||||||
|
assert.equal(parsed.launchMode, 'maximized');
|
||||||
|
});
|
||||||
|
|
||||||
test('parseArgs maps dictionary command and log-level override', () => {
|
test('parseArgs maps dictionary command and log-level override', () => {
|
||||||
const parsed = parseArgs(['dictionary', '.', '--log-level', 'debug'], 'subminer', {});
|
const parsed = parseArgs(['dictionary', '.', '--log-level', 'debug'], 'subminer', {});
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import os from 'node:os';
|
import os from 'node:os';
|
||||||
|
import type { MpvLaunchMode } from '../src/types/config.js';
|
||||||
import { resolveDefaultLogFilePath } from '../src/shared/log-files.js';
|
import { resolveDefaultLogFilePath } from '../src/shared/log-files.js';
|
||||||
export { VIDEO_EXTENSIONS } from '../src/shared/video-extensions.js';
|
export { VIDEO_EXTENSIONS } from '../src/shared/video-extensions.js';
|
||||||
|
|
||||||
@@ -140,6 +141,7 @@ export interface Args {
|
|||||||
jellyfinServer: string;
|
jellyfinServer: string;
|
||||||
jellyfinUsername: string;
|
jellyfinUsername: string;
|
||||||
jellyfinPassword: string;
|
jellyfinPassword: string;
|
||||||
|
launchMode: MpvLaunchMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LauncherYoutubeSubgenConfig {
|
export interface LauncherYoutubeSubgenConfig {
|
||||||
@@ -167,6 +169,10 @@ export interface LauncherJellyfinConfig {
|
|||||||
iconCacheDir?: string;
|
iconCacheDir?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface LauncherMpvConfig {
|
||||||
|
launchMode?: MpvLaunchMode;
|
||||||
|
}
|
||||||
|
|
||||||
export interface PluginRuntimeConfig {
|
export interface PluginRuntimeConfig {
|
||||||
socketPath: string;
|
socketPath: string;
|
||||||
autoStart: boolean;
|
autoStart: boolean;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "subminer",
|
"name": "subminer",
|
||||||
"productName": "SubMiner",
|
"productName": "SubMiner",
|
||||||
"desktopName": "SubMiner.desktop",
|
"desktopName": "SubMiner.desktop",
|
||||||
"version": "0.11.1",
|
"version": "0.11.2",
|
||||||
"description": "All-in-one sentence mining overlay with AnkiConnect and dictionary integration",
|
"description": "All-in-one sentence mining overlay with AnkiConnect and dictionary integration",
|
||||||
"packageManager": "bun@1.3.5",
|
"packageManager": "bun@1.3.5",
|
||||||
"main": "dist/main-entry.js",
|
"main": "dist/main-entry.js",
|
||||||
@@ -20,8 +20,9 @@
|
|||||||
"dev:stats": "cd stats && bun run dev",
|
"dev:stats": "cd stats && bun run dev",
|
||||||
"build": "bun run build:yomitan && bun run build:stats && tsc -p tsconfig.json && bun run build:renderer && bun run build:launcher && bun run build:assets",
|
"build": "bun run build:yomitan && bun run build:stats && tsc -p tsconfig.json && bun run build:renderer && bun run build:launcher && bun run build:assets",
|
||||||
"build:renderer": "esbuild src/renderer/renderer.ts --bundle --platform=browser --format=esm --target=es2022 --outfile=dist/renderer/renderer.js --sourcemap",
|
"build:renderer": "esbuild src/renderer/renderer.ts --bundle --platform=browser --format=esm --target=es2022 --outfile=dist/renderer/renderer.js --sourcemap",
|
||||||
"changelog:build": "bun run scripts/build-changelog.ts build",
|
"changelog:build": "bun run scripts/build-changelog.ts build && bun run changelog:docs",
|
||||||
"changelog:check": "bun run scripts/build-changelog.ts check",
|
"changelog:check": "bun run scripts/build-changelog.ts check",
|
||||||
|
"changelog:docs": "bun run scripts/build-changelog.ts docs",
|
||||||
"changelog:lint": "bun run scripts/build-changelog.ts lint",
|
"changelog:lint": "bun run scripts/build-changelog.ts lint",
|
||||||
"changelog:pr-check": "bun run scripts/build-changelog.ts pr-check",
|
"changelog:pr-check": "bun run scripts/build-changelog.ts pr-check",
|
||||||
"changelog:release-notes": "bun run scripts/build-changelog.ts release-notes",
|
"changelog:release-notes": "bun run scripts/build-changelog.ts release-notes",
|
||||||
|
|||||||
@@ -197,6 +197,49 @@ test('verifyChangelogReadyForRelease rejects explicit release versions that do n
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('writeChangelogArtifacts renders breaking changes section above type sections', async () => {
|
||||||
|
const { writeChangelogArtifacts } = await loadModule();
|
||||||
|
const workspace = createWorkspace('breaking-changes');
|
||||||
|
const projectRoot = path.join(workspace, 'SubMiner');
|
||||||
|
|
||||||
|
fs.mkdirSync(projectRoot, { recursive: true });
|
||||||
|
fs.mkdirSync(path.join(projectRoot, 'changes'), { recursive: true });
|
||||||
|
fs.writeFileSync(path.join(projectRoot, 'CHANGELOG.md'), '# Changelog\n', 'utf8');
|
||||||
|
fs.writeFileSync(
|
||||||
|
path.join(projectRoot, 'changes', '001.md'),
|
||||||
|
['type: changed', 'area: config', 'breaking: true', '', '- Renamed `foo` to `bar`.'].join('\n'),
|
||||||
|
'utf8',
|
||||||
|
);
|
||||||
|
fs.writeFileSync(
|
||||||
|
path.join(projectRoot, 'changes', '002.md'),
|
||||||
|
['type: fixed', 'area: overlay', '', '- Fixed subtitle rendering.'].join('\n'),
|
||||||
|
'utf8',
|
||||||
|
);
|
||||||
|
|
||||||
|
try {
|
||||||
|
writeChangelogArtifacts({
|
||||||
|
cwd: projectRoot,
|
||||||
|
version: '0.5.0',
|
||||||
|
date: '2026-04-06',
|
||||||
|
});
|
||||||
|
|
||||||
|
const changelog = fs.readFileSync(path.join(projectRoot, 'CHANGELOG.md'), 'utf8');
|
||||||
|
const breakingIndex = changelog.indexOf('### Breaking Changes');
|
||||||
|
const changedIndex = changelog.indexOf('### Changed');
|
||||||
|
const fixedIndex = changelog.indexOf('### Fixed');
|
||||||
|
|
||||||
|
assert.notEqual(breakingIndex, -1, 'Breaking Changes section should exist');
|
||||||
|
assert.notEqual(changedIndex, -1, 'Changed section should exist');
|
||||||
|
assert.notEqual(fixedIndex, -1, 'Fixed section should exist');
|
||||||
|
assert.ok(breakingIndex < changedIndex, 'Breaking Changes should appear before Changed');
|
||||||
|
assert.ok(changedIndex < fixedIndex, 'Changed should appear before Fixed');
|
||||||
|
assert.match(changelog, /### Breaking Changes\n- Config: Renamed `foo` to `bar`\./);
|
||||||
|
assert.match(changelog, /### Changed\n- Config: Renamed `foo` to `bar`\./);
|
||||||
|
} finally {
|
||||||
|
fs.rmSync(workspace, { recursive: true, force: true });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
test('verifyChangelogFragments rejects invalid metadata', async () => {
|
test('verifyChangelogFragments rejects invalid metadata', async () => {
|
||||||
const { verifyChangelogFragments } = await loadModule();
|
const { verifyChangelogFragments } = await loadModule();
|
||||||
const workspace = createWorkspace('lint-invalid');
|
const workspace = createWorkspace('lint-invalid');
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ type FragmentType = 'added' | 'changed' | 'fixed' | 'docs' | 'internal';
|
|||||||
|
|
||||||
type ChangeFragment = {
|
type ChangeFragment = {
|
||||||
area: string;
|
area: string;
|
||||||
|
breaking: boolean;
|
||||||
bullets: string[];
|
bullets: string[];
|
||||||
path: string;
|
path: string;
|
||||||
type: FragmentType;
|
type: FragmentType;
|
||||||
@@ -144,6 +145,7 @@ function parseFragmentMetadata(
|
|||||||
): {
|
): {
|
||||||
area: string;
|
area: string;
|
||||||
body: string;
|
body: string;
|
||||||
|
breaking: boolean;
|
||||||
type: FragmentType;
|
type: FragmentType;
|
||||||
} {
|
} {
|
||||||
const lines = content.split(/\r?\n/);
|
const lines = content.split(/\r?\n/);
|
||||||
@@ -186,9 +188,12 @@ function parseFragmentMetadata(
|
|||||||
throw new Error(`${fragmentPath} must include at least one changelog bullet.`);
|
throw new Error(`${fragmentPath} must include at least one changelog bullet.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const breaking = metadata.get('breaking')?.toLowerCase() === 'true';
|
||||||
|
|
||||||
return {
|
return {
|
||||||
area,
|
area,
|
||||||
body,
|
body,
|
||||||
|
breaking,
|
||||||
type: type as FragmentType,
|
type: type as FragmentType,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -199,6 +204,7 @@ function readChangeFragments(cwd: string, deps?: ChangelogFsDeps): ChangeFragmen
|
|||||||
const parsed = parseFragmentMetadata(readFileSync(fragmentPath, 'utf8'), fragmentPath);
|
const parsed = parseFragmentMetadata(readFileSync(fragmentPath, 'utf8'), fragmentPath);
|
||||||
return {
|
return {
|
||||||
area: parsed.area,
|
area: parsed.area,
|
||||||
|
breaking: parsed.breaking,
|
||||||
bullets: normalizeFragmentBullets(parsed.body),
|
bullets: normalizeFragmentBullets(parsed.body),
|
||||||
path: fragmentPath,
|
path: fragmentPath,
|
||||||
type: parsed.type,
|
type: parsed.type,
|
||||||
@@ -219,10 +225,22 @@ function renderFragmentBullet(fragment: ChangeFragment, bullet: string): string
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderGroupedChanges(fragments: ChangeFragment[]): string {
|
function renderGroupedChanges(fragments: ChangeFragment[]): string {
|
||||||
const sections = CHANGE_TYPES.flatMap((type) => {
|
const sections: string[] = [];
|
||||||
|
|
||||||
|
const breakingFragments = fragments.filter((fragment) => fragment.breaking);
|
||||||
|
if (breakingFragments.length > 0) {
|
||||||
|
const bullets = breakingFragments
|
||||||
|
.flatMap((fragment) =>
|
||||||
|
fragment.bullets.map((bullet) => renderFragmentBullet(fragment, bullet)),
|
||||||
|
)
|
||||||
|
.join('\n');
|
||||||
|
sections.push(`### Breaking Changes\n${bullets}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const type of CHANGE_TYPES) {
|
||||||
const typeFragments = fragments.filter((fragment) => fragment.type === type);
|
const typeFragments = fragments.filter((fragment) => fragment.type === type);
|
||||||
if (typeFragments.length === 0) {
|
if (typeFragments.length === 0) {
|
||||||
return [];
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bullets = typeFragments
|
const bullets = typeFragments
|
||||||
@@ -230,8 +248,8 @@ function renderGroupedChanges(fragments: ChangeFragment[]): string {
|
|||||||
fragment.bullets.map((bullet) => renderFragmentBullet(fragment, bullet)),
|
fragment.bullets.map((bullet) => renderFragmentBullet(fragment, bullet)),
|
||||||
)
|
)
|
||||||
.join('\n');
|
.join('\n');
|
||||||
return [`### ${CHANGE_TYPE_HEADINGS[type]}\n${bullets}`];
|
sections.push(`### ${CHANGE_TYPE_HEADINGS[type]}\n${bullets}`);
|
||||||
});
|
}
|
||||||
|
|
||||||
return sections.join('\n\n');
|
return sections.join('\n\n');
|
||||||
}
|
}
|
||||||
@@ -487,6 +505,99 @@ function resolveChangedPathsFromGit(
|
|||||||
.filter((entry) => entry.path);
|
.filter((entry) => entry.path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const DOCS_CHANGELOG_PATH = path.join('docs-site', 'changelog.md');
|
||||||
|
|
||||||
|
type VersionSection = {
|
||||||
|
version: string;
|
||||||
|
date: string;
|
||||||
|
minor: string;
|
||||||
|
body: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
function parseVersionSections(changelog: string): VersionSection[] {
|
||||||
|
const sectionPattern = /^## v(\d+\.\d+\.\d+) \((\d{4}-\d{2}-\d{2})\)$/gm;
|
||||||
|
const sections: VersionSection[] = [];
|
||||||
|
let match: RegExpExecArray | null;
|
||||||
|
|
||||||
|
while ((match = sectionPattern.exec(changelog)) !== null) {
|
||||||
|
const version = match[1]!;
|
||||||
|
const date = match[2]!;
|
||||||
|
const minor = version.replace(/\.\d+$/, '');
|
||||||
|
const headingEnd = match.index + match[0].length;
|
||||||
|
sections.push({ version, date, minor, body: '' });
|
||||||
|
|
||||||
|
if (sections.length > 1) {
|
||||||
|
const prev = sections[sections.length - 2]!;
|
||||||
|
prev.body = changelog.slice(prev.body as unknown as number, match.index).trim();
|
||||||
|
}
|
||||||
|
(sections[sections.length - 1] as { body: unknown }).body = headingEnd;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sections.length > 0) {
|
||||||
|
const last = sections[sections.length - 1]!;
|
||||||
|
last.body = changelog.slice(last.body as unknown as number).trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
return sections;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function generateDocsChangelog(options?: Pick<ChangelogOptions, 'cwd' | 'deps'>): string {
|
||||||
|
const cwd = options?.cwd ?? process.cwd();
|
||||||
|
const readFileSync = options?.deps?.readFileSync ?? fs.readFileSync;
|
||||||
|
const writeFileSync = options?.deps?.writeFileSync ?? fs.writeFileSync;
|
||||||
|
const log = options?.deps?.log ?? console.log;
|
||||||
|
|
||||||
|
const changelogPath = path.join(cwd, 'CHANGELOG.md');
|
||||||
|
const changelog = readFileSync(changelogPath, 'utf8');
|
||||||
|
const sections = parseVersionSections(changelog);
|
||||||
|
|
||||||
|
if (sections.length === 0) {
|
||||||
|
throw new Error('No version sections found in CHANGELOG.md');
|
||||||
|
}
|
||||||
|
|
||||||
|
const currentMinor = sections[0]!.minor;
|
||||||
|
const currentSections = sections.filter((s) => s.minor === currentMinor);
|
||||||
|
const olderSections = sections.filter((s) => s.minor !== currentMinor);
|
||||||
|
|
||||||
|
const lines: string[] = ['# Changelog', ''];
|
||||||
|
|
||||||
|
for (const section of currentSections) {
|
||||||
|
const body = section.body.replace(/^### (.+)$/gm, '**$1**');
|
||||||
|
lines.push(`## v${section.version} (${section.date})`, '', body, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (olderSections.length > 0) {
|
||||||
|
lines.push('## Previous Versions', '');
|
||||||
|
|
||||||
|
const minorGroups = new Map<string, VersionSection[]>();
|
||||||
|
for (const section of olderSections) {
|
||||||
|
const group = minorGroups.get(section.minor) ?? [];
|
||||||
|
group.push(section);
|
||||||
|
minorGroups.set(section.minor, group);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const [minor, group] of minorGroups) {
|
||||||
|
lines.push('<details>', `<summary>v${minor}.x</summary>`, '');
|
||||||
|
for (const section of group) {
|
||||||
|
const htmlBody = section.body.replace(/^### (.+)$/gm, '**$1**');
|
||||||
|
lines.push(`<h2>v${section.version} (${section.date})</h2>`, '', htmlBody, '');
|
||||||
|
}
|
||||||
|
lines.push('</details>', '');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const output =
|
||||||
|
lines
|
||||||
|
.join('\n')
|
||||||
|
.replace(/\n{3,}/g, '\n\n')
|
||||||
|
.trimEnd() + '\n';
|
||||||
|
const outputPath = path.join(cwd, DOCS_CHANGELOG_PATH);
|
||||||
|
writeFileSync(outputPath, output, 'utf8');
|
||||||
|
log(`Generated ${outputPath}`);
|
||||||
|
|
||||||
|
return outputPath;
|
||||||
|
}
|
||||||
|
|
||||||
export function writeReleaseNotesForVersion(options?: ChangelogOptions): string {
|
export function writeReleaseNotesForVersion(options?: ChangelogOptions): string {
|
||||||
const cwd = options?.cwd ?? process.cwd();
|
const cwd = options?.cwd ?? process.cwd();
|
||||||
const readFileSync = options?.deps?.readFileSync ?? fs.readFileSync;
|
const readFileSync = options?.deps?.readFileSync ?? fs.readFileSync;
|
||||||
@@ -599,6 +710,11 @@ function main(): void {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (command === 'docs') {
|
||||||
|
generateDocsChangelog(options);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
throw new Error(`Unknown changelog command: ${command}`);
|
throw new Error(`Unknown changelog command: ${command}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2125,10 +2125,7 @@ test('template generator includes known keys', () => {
|
|||||||
/"dpadFallback": "horizontal",? \/\/ Optional D-pad fallback used when this analog controller action should also read D-pad input\. Values: none \| horizontal \| vertical/,
|
/"dpadFallback": "horizontal",? \/\/ Optional D-pad fallback used when this analog controller action should also read D-pad input\. Values: none \| horizontal \| vertical/,
|
||||||
);
|
);
|
||||||
assert.match(output, /"port": 6678,? \/\/ Annotated subtitle websocket server port\./);
|
assert.match(output, /"port": 6678,? \/\/ Annotated subtitle websocket server port\./);
|
||||||
assert.match(
|
assert.match(output, /"openBrowser": false,? \/\/ Open browser setting\. Values: true \| false/);
|
||||||
output,
|
|
||||||
/"openBrowser": false,? \/\/ Open browser setting\. Values: true \| false/,
|
|
||||||
);
|
|
||||||
assert.match(
|
assert.match(
|
||||||
output,
|
output,
|
||||||
/"enabled": false,? \/\/ Enable overlay controller support through the Chrome Gamepad API\. Values: true \| false/,
|
/"enabled": false,? \/\/ Enable overlay controller support through the Chrome Gamepad API\. Values: true \| false/,
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ export const INTEGRATIONS_DEFAULT_CONFIG: Pick<
|
|||||||
},
|
},
|
||||||
mpv: {
|
mpv: {
|
||||||
executablePath: '',
|
executablePath: '',
|
||||||
|
launchMode: 'normal',
|
||||||
},
|
},
|
||||||
anilist: {
|
anilist: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ test('config option registry includes critical paths and has unique entries', ()
|
|||||||
'anilist.characterDictionary.enabled',
|
'anilist.characterDictionary.enabled',
|
||||||
'anilist.characterDictionary.collapsibleSections.description',
|
'anilist.characterDictionary.collapsibleSections.description',
|
||||||
'mpv.executablePath',
|
'mpv.executablePath',
|
||||||
|
'mpv.launchMode',
|
||||||
'yomitan.externalProfilePath',
|
'yomitan.externalProfilePath',
|
||||||
'immersionTracking.enabled',
|
'immersionTracking.enabled',
|
||||||
]) {
|
]) {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { ResolvedConfig } from '../../types/config';
|
import { ResolvedConfig } from '../../types/config';
|
||||||
|
import { MPV_LAUNCH_MODE_VALUES } from '../../shared/mpv-launch-mode';
|
||||||
import { ConfigOptionRegistryEntry, RuntimeOptionRegistryEntry } from './shared';
|
import { ConfigOptionRegistryEntry, RuntimeOptionRegistryEntry } from './shared';
|
||||||
|
|
||||||
export function buildIntegrationConfigOptionRegistry(
|
export function buildIntegrationConfigOptionRegistry(
|
||||||
@@ -245,6 +246,13 @@ export function buildIntegrationConfigOptionRegistry(
|
|||||||
description:
|
description:
|
||||||
'Optional absolute path to mpv.exe for Windows launch flows. Leave empty to auto-discover from SUBMINER_MPV_PATH or PATH.',
|
'Optional absolute path to mpv.exe for Windows launch flows. Leave empty to auto-discover from SUBMINER_MPV_PATH or PATH.',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'mpv.launchMode',
|
||||||
|
kind: 'enum',
|
||||||
|
enumValues: MPV_LAUNCH_MODE_VALUES,
|
||||||
|
defaultValue: defaultConfig.mpv.launchMode,
|
||||||
|
description: 'Default window state for SubMiner-managed mpv launches.',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'jellyfin.enabled',
|
path: 'jellyfin.enabled',
|
||||||
kind: 'boolean',
|
kind: 'boolean',
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ const INTEGRATION_TEMPLATE_SECTIONS: ConfigTemplateSection[] = [
|
|||||||
title: 'MPV Launcher',
|
title: 'MPV Launcher',
|
||||||
description: [
|
description: [
|
||||||
'Optional mpv.exe override for Windows playback entry points.',
|
'Optional mpv.exe override for Windows playback entry points.',
|
||||||
|
'Set mpv.launchMode to choose normal, maximized, or fullscreen SubMiner-managed mpv playback.',
|
||||||
'Leave mpv.executablePath blank to auto-discover mpv.exe from SUBMINER_MPV_PATH or PATH.',
|
'Leave mpv.executablePath blank to auto-discover mpv.exe from SUBMINER_MPV_PATH or PATH.',
|
||||||
],
|
],
|
||||||
key: 'mpv',
|
key: 'mpv',
|
||||||
|
|||||||
@@ -13,6 +13,17 @@ test('resolveConfig trims configured mpv executable path', () => {
|
|||||||
assert.deepEqual(warnings, []);
|
assert.deepEqual(warnings, []);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('resolveConfig parses configured mpv launch mode', () => {
|
||||||
|
const { resolved, warnings } = resolveConfig({
|
||||||
|
mpv: {
|
||||||
|
launchMode: 'maximized',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
assert.equal(resolved.mpv.launchMode, 'maximized');
|
||||||
|
assert.deepEqual(warnings, []);
|
||||||
|
});
|
||||||
|
|
||||||
test('resolveConfig warns for invalid mpv executable path type', () => {
|
test('resolveConfig warns for invalid mpv executable path type', () => {
|
||||||
const { resolved, warnings } = resolveConfig({
|
const { resolved, warnings } = resolveConfig({
|
||||||
mpv: {
|
mpv: {
|
||||||
@@ -29,3 +40,20 @@ test('resolveConfig warns for invalid mpv executable path type', () => {
|
|||||||
message: 'Expected string.',
|
message: 'Expected string.',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('resolveConfig warns for invalid mpv launch mode', () => {
|
||||||
|
const { resolved, warnings } = resolveConfig({
|
||||||
|
mpv: {
|
||||||
|
launchMode: 'cinema' as never,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
assert.equal(resolved.mpv.launchMode, 'normal');
|
||||||
|
assert.equal(warnings.length, 1);
|
||||||
|
assert.deepEqual(warnings[0], {
|
||||||
|
path: 'mpv.launchMode',
|
||||||
|
value: 'cinema',
|
||||||
|
fallback: 'normal',
|
||||||
|
message: "Expected one of: 'normal', 'maximized', 'fullscreen'.",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import * as os from 'node:os';
|
import * as os from 'node:os';
|
||||||
import * as path from 'node:path';
|
import * as path from 'node:path';
|
||||||
|
import { MPV_LAUNCH_MODE_VALUES, parseMpvLaunchMode } from '../../shared/mpv-launch-mode';
|
||||||
import { ResolveContext } from './context';
|
import { ResolveContext } from './context';
|
||||||
import { asBoolean, asNumber, asString, isObject } from './shared';
|
import { asBoolean, asNumber, asString, isObject } from './shared';
|
||||||
|
|
||||||
@@ -240,6 +241,18 @@ export function applyIntegrationConfig(context: ResolveContext): void {
|
|||||||
'Expected string.',
|
'Expected string.',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const launchMode = parseMpvLaunchMode(src.mpv.launchMode);
|
||||||
|
if (launchMode !== undefined) {
|
||||||
|
resolved.mpv.launchMode = launchMode;
|
||||||
|
} else if (src.mpv.launchMode !== undefined) {
|
||||||
|
warn(
|
||||||
|
'mpv.launchMode',
|
||||||
|
src.mpv.launchMode,
|
||||||
|
resolved.mpv.launchMode,
|
||||||
|
`Expected one of: ${MPV_LAUNCH_MODE_VALUES.map((value) => `'${value}'`).join(', ')}.`,
|
||||||
|
);
|
||||||
|
}
|
||||||
} else if (src.mpv !== undefined) {
|
} else if (src.mpv !== undefined) {
|
||||||
warn('mpv', src.mpv, resolved.mpv, 'Expected object.');
|
warn('mpv', src.mpv, resolved.mpv, 'Expected object.');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import {
|
|||||||
import { requestSingleInstanceLockEarly } from './main/early-single-instance';
|
import { requestSingleInstanceLockEarly } from './main/early-single-instance';
|
||||||
import { resolvePackagedFirstRunPluginAssets } from './main/runtime/first-run-setup-plugin';
|
import { resolvePackagedFirstRunPluginAssets } from './main/runtime/first-run-setup-plugin';
|
||||||
import { createWindowsMpvLaunchDeps, launchWindowsMpv } from './main/runtime/windows-mpv-launch';
|
import { createWindowsMpvLaunchDeps, launchWindowsMpv } from './main/runtime/windows-mpv-launch';
|
||||||
|
import { parseMpvLaunchMode } from './shared/mpv-launch-mode';
|
||||||
import { runStatsDaemonControlFromProcess } from './stats-daemon-entry';
|
import { runStatsDaemonControlFromProcess } from './stats-daemon-entry';
|
||||||
|
|
||||||
const DEFAULT_TEXTHOOKER_PORT = 5174;
|
const DEFAULT_TEXTHOOKER_PORT = 5174;
|
||||||
@@ -36,21 +37,6 @@ function applySanitizedEnv(sanitizedEnv: NodeJS.ProcessEnv): void {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function readConfiguredWindowsMpvExecutablePath(configDir: string): string {
|
|
||||||
const loadResult = loadRawConfigStrict({
|
|
||||||
configDir,
|
|
||||||
configFileJsonc: path.join(configDir, 'config.jsonc'),
|
|
||||||
configFileJson: path.join(configDir, 'config.json'),
|
|
||||||
});
|
|
||||||
if (!loadResult.ok) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
return typeof loadResult.config.mpv?.executablePath === 'string'
|
|
||||||
? loadResult.config.mpv.executablePath.trim()
|
|
||||||
: '';
|
|
||||||
}
|
|
||||||
|
|
||||||
function resolveBundledWindowsMpvPluginEntrypoint(): string | undefined {
|
function resolveBundledWindowsMpvPluginEntrypoint(): string | undefined {
|
||||||
const assets = resolvePackagedFirstRunPluginAssets({
|
const assets = resolvePackagedFirstRunPluginAssets({
|
||||||
dirname: __dirname,
|
dirname: __dirname,
|
||||||
@@ -64,6 +50,31 @@ function resolveBundledWindowsMpvPluginEntrypoint(): string | undefined {
|
|||||||
return path.join(assets.pluginDirSource, 'main.lua');
|
return path.join(assets.pluginDirSource, 'main.lua');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function readConfiguredWindowsMpvLaunch(configDir: string): {
|
||||||
|
executablePath: string;
|
||||||
|
launchMode: 'normal' | 'maximized' | 'fullscreen';
|
||||||
|
} {
|
||||||
|
const loadResult = loadRawConfigStrict({
|
||||||
|
configDir,
|
||||||
|
configFileJsonc: path.join(configDir, 'config.jsonc'),
|
||||||
|
configFileJson: path.join(configDir, 'config.json'),
|
||||||
|
});
|
||||||
|
if (!loadResult.ok) {
|
||||||
|
return {
|
||||||
|
executablePath: '',
|
||||||
|
launchMode: 'normal',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
executablePath:
|
||||||
|
typeof loadResult.config.mpv?.executablePath === 'string'
|
||||||
|
? loadResult.config.mpv.executablePath.trim()
|
||||||
|
: '',
|
||||||
|
launchMode: parseMpvLaunchMode(loadResult.config.mpv?.launchMode) ?? 'normal',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
process.argv = normalizeStartupArgv(process.argv, process.env);
|
process.argv = normalizeStartupArgv(process.argv, process.env);
|
||||||
applySanitizedEnv(sanitizeStartupEnv(process.env));
|
applySanitizedEnv(sanitizeStartupEnv(process.env));
|
||||||
const userDataPath = configureEarlyAppPaths(app);
|
const userDataPath = configureEarlyAppPaths(app);
|
||||||
@@ -92,6 +103,7 @@ if (shouldHandleLaunchMpvAtEntry(process.argv, process.env)) {
|
|||||||
const sanitizedEnv = sanitizeLaunchMpvEnv(process.env);
|
const sanitizedEnv = sanitizeLaunchMpvEnv(process.env);
|
||||||
applySanitizedEnv(sanitizedEnv);
|
applySanitizedEnv(sanitizedEnv);
|
||||||
void app.whenReady().then(async () => {
|
void app.whenReady().then(async () => {
|
||||||
|
const configuredMpvLaunch = readConfiguredWindowsMpvLaunch(userDataPath);
|
||||||
const result = await launchWindowsMpv(
|
const result = await launchWindowsMpv(
|
||||||
normalizeLaunchMpvTargets(process.argv),
|
normalizeLaunchMpvTargets(process.argv),
|
||||||
createWindowsMpvLaunchDeps({
|
createWindowsMpvLaunchDeps({
|
||||||
@@ -103,7 +115,8 @@ if (shouldHandleLaunchMpvAtEntry(process.argv, process.env)) {
|
|||||||
normalizeLaunchMpvExtraArgs(process.argv),
|
normalizeLaunchMpvExtraArgs(process.argv),
|
||||||
process.execPath,
|
process.execPath,
|
||||||
resolveBundledWindowsMpvPluginEntrypoint(),
|
resolveBundledWindowsMpvPluginEntrypoint(),
|
||||||
readConfiguredWindowsMpvExecutablePath(userDataPath),
|
configuredMpvLaunch.executablePath,
|
||||||
|
configuredMpvLaunch.launchMode,
|
||||||
);
|
);
|
||||||
app.exit(result.ok ? 0 : 1);
|
app.exit(result.ok ? 0 : 1);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1052,6 +1052,7 @@ const youtubePlaybackRuntime = createYoutubePlaybackRuntime({
|
|||||||
undefined,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
getResolvedConfig().mpv.executablePath,
|
getResolvedConfig().mpv.executablePath,
|
||||||
|
getResolvedConfig().mpv.launchMode,
|
||||||
),
|
),
|
||||||
waitForYoutubeMpvConnected: (timeoutMs) => waitForYoutubeMpvConnected(timeoutMs),
|
waitForYoutubeMpvConnected: (timeoutMs) => waitForYoutubeMpvConnected(timeoutMs),
|
||||||
prepareYoutubePlaybackInMpv: (request) => prepareYoutubePlaybackInMpv(request),
|
prepareYoutubePlaybackInMpv: (request) => prepareYoutubePlaybackInMpv(request),
|
||||||
@@ -2031,6 +2032,7 @@ const {
|
|||||||
},
|
},
|
||||||
launchMpvIdleForJellyfinPlaybackMainDeps: {
|
launchMpvIdleForJellyfinPlaybackMainDeps: {
|
||||||
getSocketPath: () => appState.mpvSocketPath,
|
getSocketPath: () => appState.mpvSocketPath,
|
||||||
|
getLaunchMode: () => getResolvedConfig().mpv.launchMode,
|
||||||
platform: process.platform,
|
platform: process.platform,
|
||||||
execPath: process.execPath,
|
execPath: process.execPath,
|
||||||
defaultMpvLogPath: DEFAULT_MPV_LOG_PATH,
|
defaultMpvLogPath: DEFAULT_MPV_LOG_PATH,
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ test('composeJellyfinRuntimeHandlers returns callable jellyfin runtime handlers'
|
|||||||
},
|
},
|
||||||
launchMpvIdleForJellyfinPlaybackMainDeps: {
|
launchMpvIdleForJellyfinPlaybackMainDeps: {
|
||||||
getSocketPath: () => '/tmp/test-mpv.sock',
|
getSocketPath: () => '/tmp/test-mpv.sock',
|
||||||
|
getLaunchMode: () => 'normal',
|
||||||
platform: 'linux',
|
platform: 'linux',
|
||||||
execPath: process.execPath,
|
execPath: process.execPath,
|
||||||
defaultMpvLogPath: '/tmp/test-mpv.log',
|
defaultMpvLogPath: '/tmp/test-mpv.log',
|
||||||
|
|||||||
@@ -237,10 +237,7 @@ test('detectInstalledFirstRunPlugin detects plugin installed in canonical mpv co
|
|||||||
fs.mkdirSync(path.dirname(pluginEntrypointPath), { recursive: true });
|
fs.mkdirSync(path.dirname(pluginEntrypointPath), { recursive: true });
|
||||||
fs.writeFileSync(pluginEntrypointPath, '-- plugin');
|
fs.writeFileSync(pluginEntrypointPath, '-- plugin');
|
||||||
|
|
||||||
assert.equal(
|
assert.equal(detectInstalledFirstRunPlugin(installPaths), true);
|
||||||
detectInstalledFirstRunPlugin(installPaths),
|
|
||||||
true,
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -256,10 +253,7 @@ test('detectInstalledFirstRunPlugin ignores scoped plugin layout path', () => {
|
|||||||
fs.mkdirSync(path.dirname(pluginEntrypointPath), { recursive: true });
|
fs.mkdirSync(path.dirname(pluginEntrypointPath), { recursive: true });
|
||||||
fs.writeFileSync(pluginEntrypointPath, '-- plugin');
|
fs.writeFileSync(pluginEntrypointPath, '-- plugin');
|
||||||
|
|
||||||
assert.equal(
|
assert.equal(detectInstalledFirstRunPlugin(installPaths), false);
|
||||||
detectInstalledFirstRunPlugin(installPaths),
|
|
||||||
false,
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -272,10 +266,7 @@ test('detectInstalledFirstRunPlugin ignores legacy loader file', () => {
|
|||||||
fs.mkdirSync(path.dirname(legacyLoaderPath), { recursive: true });
|
fs.mkdirSync(path.dirname(legacyLoaderPath), { recursive: true });
|
||||||
fs.writeFileSync(legacyLoaderPath, '-- plugin');
|
fs.writeFileSync(legacyLoaderPath, '-- plugin');
|
||||||
|
|
||||||
assert.equal(
|
assert.equal(detectInstalledFirstRunPlugin(installPaths), false);
|
||||||
detectInstalledFirstRunPlugin(installPaths),
|
|
||||||
false,
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -288,9 +279,6 @@ test('detectInstalledFirstRunPlugin requires main.lua in subminer directory', ()
|
|||||||
fs.mkdirSync(pluginDir, { recursive: true });
|
fs.mkdirSync(pluginDir, { recursive: true });
|
||||||
fs.writeFileSync(path.join(pluginDir, 'not_main.lua'), '-- plugin');
|
fs.writeFileSync(path.join(pluginDir, 'not_main.lua'), '-- plugin');
|
||||||
|
|
||||||
assert.equal(
|
assert.equal(detectInstalledFirstRunPlugin(installPaths), false);
|
||||||
detectInstalledFirstRunPlugin(installPaths),
|
|
||||||
false,
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ test('launch mpv for jellyfin main deps builder maps callbacks', () => {
|
|||||||
};
|
};
|
||||||
const deps = createBuildLaunchMpvIdleForJellyfinPlaybackMainDepsHandler({
|
const deps = createBuildLaunchMpvIdleForJellyfinPlaybackMainDepsHandler({
|
||||||
getSocketPath: () => '/tmp/mpv.sock',
|
getSocketPath: () => '/tmp/mpv.sock',
|
||||||
|
getLaunchMode: () => 'fullscreen',
|
||||||
platform: 'darwin',
|
platform: 'darwin',
|
||||||
execPath: '/tmp/subminer',
|
execPath: '/tmp/subminer',
|
||||||
defaultMpvLogPath: '/tmp/mpv.log',
|
defaultMpvLogPath: '/tmp/mpv.log',
|
||||||
@@ -47,6 +48,7 @@ test('launch mpv for jellyfin main deps builder maps callbacks', () => {
|
|||||||
})();
|
})();
|
||||||
|
|
||||||
assert.equal(deps.getSocketPath(), '/tmp/mpv.sock');
|
assert.equal(deps.getSocketPath(), '/tmp/mpv.sock');
|
||||||
|
assert.equal(deps.getLaunchMode(), 'fullscreen');
|
||||||
assert.equal(deps.platform, 'darwin');
|
assert.equal(deps.platform, 'darwin');
|
||||||
assert.equal(deps.execPath, '/tmp/subminer');
|
assert.equal(deps.execPath, '/tmp/subminer');
|
||||||
assert.equal(deps.defaultMpvLogPath, '/tmp/mpv.log');
|
assert.equal(deps.defaultMpvLogPath, '/tmp/mpv.log');
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ export function createBuildLaunchMpvIdleForJellyfinPlaybackMainDepsHandler(
|
|||||||
) {
|
) {
|
||||||
return (): LaunchMpvForJellyfinDeps => ({
|
return (): LaunchMpvForJellyfinDeps => ({
|
||||||
getSocketPath: () => deps.getSocketPath(),
|
getSocketPath: () => deps.getSocketPath(),
|
||||||
|
getLaunchMode: () => deps.getLaunchMode(),
|
||||||
platform: deps.platform,
|
platform: deps.platform,
|
||||||
execPath: deps.execPath,
|
execPath: deps.execPath,
|
||||||
defaultMpvLogPath: deps.defaultMpvLogPath,
|
defaultMpvLogPath: deps.defaultMpvLogPath,
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ test('createLaunchMpvIdleForJellyfinPlaybackHandler builds expected mpv args', (
|
|||||||
const logs: string[] = [];
|
const logs: string[] = [];
|
||||||
const launch = createLaunchMpvIdleForJellyfinPlaybackHandler({
|
const launch = createLaunchMpvIdleForJellyfinPlaybackHandler({
|
||||||
getSocketPath: () => '/tmp/subminer.sock',
|
getSocketPath: () => '/tmp/subminer.sock',
|
||||||
|
getLaunchMode: () => 'maximized',
|
||||||
platform: 'darwin',
|
platform: 'darwin',
|
||||||
execPath: '/Applications/SubMiner.app/Contents/MacOS/SubMiner',
|
execPath: '/Applications/SubMiner.app/Contents/MacOS/SubMiner',
|
||||||
defaultMpvLogPath: '/tmp/mp.log',
|
defaultMpvLogPath: '/tmp/mp.log',
|
||||||
@@ -49,6 +50,7 @@ test('createLaunchMpvIdleForJellyfinPlaybackHandler builds expected mpv args', (
|
|||||||
|
|
||||||
launch();
|
launch();
|
||||||
assert.equal(spawnedArgs.length, 1);
|
assert.equal(spawnedArgs.length, 1);
|
||||||
|
assert.ok(spawnedArgs[0]!.includes('--window-maximized=yes'));
|
||||||
assert.ok(spawnedArgs[0]!.includes('--idle=yes'));
|
assert.ok(spawnedArgs[0]!.includes('--idle=yes'));
|
||||||
assert.ok(spawnedArgs[0]!.some((arg) => arg.includes('--input-ipc-server=/tmp/subminer.sock')));
|
assert.ok(spawnedArgs[0]!.some((arg) => arg.includes('--input-ipc-server=/tmp/subminer.sock')));
|
||||||
assert.ok(logs.some((entry) => entry.includes('Launched mpv for Jellyfin playback')));
|
assert.ok(logs.some((entry) => entry.includes('Launched mpv for Jellyfin playback')));
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
import { buildMpvLaunchModeArgs } from '../../shared/mpv-launch-mode';
|
||||||
|
import type { MpvLaunchMode } from '../../types/config';
|
||||||
|
|
||||||
type MpvClientLike = {
|
type MpvClientLike = {
|
||||||
connected: boolean;
|
connected: boolean;
|
||||||
connect: () => void;
|
connect: () => void;
|
||||||
@@ -34,6 +37,7 @@ export function createWaitForMpvConnectedHandler(deps: WaitForMpvConnectedDeps)
|
|||||||
|
|
||||||
export type LaunchMpvForJellyfinDeps = {
|
export type LaunchMpvForJellyfinDeps = {
|
||||||
getSocketPath: () => string;
|
getSocketPath: () => string;
|
||||||
|
getLaunchMode: () => MpvLaunchMode;
|
||||||
platform: NodeJS.Platform;
|
platform: NodeJS.Platform;
|
||||||
execPath: string;
|
execPath: string;
|
||||||
defaultMpvLogPath: string;
|
defaultMpvLogPath: string;
|
||||||
@@ -58,6 +62,7 @@ export function createLaunchMpvIdleForJellyfinPlaybackHandler(deps: LaunchMpvFor
|
|||||||
const scriptOpts = `--script-opts=subminer-binary_path=${deps.execPath},subminer-socket_path=${socketPath}`;
|
const scriptOpts = `--script-opts=subminer-binary_path=${deps.execPath},subminer-socket_path=${socketPath}`;
|
||||||
const mpvArgs = [
|
const mpvArgs = [
|
||||||
...deps.defaultMpvArgs,
|
...deps.defaultMpvArgs,
|
||||||
|
...buildMpvLaunchModeArgs(deps.getLaunchMode()),
|
||||||
'--idle=yes',
|
'--idle=yes',
|
||||||
scriptOpts,
|
scriptOpts,
|
||||||
`--log-file=${deps.defaultMpvLogPath}`,
|
`--log-file=${deps.defaultMpvLogPath}`,
|
||||||
|
|||||||
@@ -80,6 +80,35 @@ test('buildWindowsMpvLaunchArgs uses explicit SubMiner defaults and targets', ()
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('buildWindowsMpvLaunchArgs inserts maximized launch mode before explicit extra args when configured', () => {
|
||||||
|
assert.deepEqual(
|
||||||
|
buildWindowsMpvLaunchArgs(
|
||||||
|
['C:\\video.mkv'],
|
||||||
|
['--window-maximized=no'],
|
||||||
|
'C:\\SubMiner\\SubMiner.exe',
|
||||||
|
'C:\\Program Files\\SubMiner\\resources\\plugin\\subminer\\main.lua',
|
||||||
|
'maximized',
|
||||||
|
),
|
||||||
|
[
|
||||||
|
'--player-operation-mode=pseudo-gui',
|
||||||
|
'--force-window=immediate',
|
||||||
|
'--script=C:\\Program Files\\SubMiner\\resources\\plugin\\subminer\\main.lua',
|
||||||
|
'--input-ipc-server=\\\\.\\pipe\\subminer-socket',
|
||||||
|
'--alang=ja,jp,jpn,japanese,en,eng,english,enus,en-us',
|
||||||
|
'--slang=ja,jp,jpn,japanese,en,eng,english,enus,en-us',
|
||||||
|
'--sub-auto=fuzzy',
|
||||||
|
'--sub-file-paths=subs;subtitles',
|
||||||
|
'--sid=auto',
|
||||||
|
'--secondary-sid=auto',
|
||||||
|
'--secondary-sub-visibility=no',
|
||||||
|
'--script-opts=subminer-binary_path=C:\\SubMiner\\SubMiner.exe,subminer-socket_path=\\\\.\\pipe\\subminer-socket',
|
||||||
|
'--window-maximized=yes',
|
||||||
|
'--window-maximized=no',
|
||||||
|
'C:\\video.mkv',
|
||||||
|
],
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
test('buildWindowsMpvLaunchArgs keeps shortcut-only launches in idle mode', () => {
|
test('buildWindowsMpvLaunchArgs keeps shortcut-only launches in idle mode', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
buildWindowsMpvLaunchArgs(
|
buildWindowsMpvLaunchArgs(
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import fs from 'node:fs';
|
import fs from 'node:fs';
|
||||||
import { spawn, spawnSync } from 'node:child_process';
|
import { spawn, spawnSync } from 'node:child_process';
|
||||||
|
import { buildMpvLaunchModeArgs } from '../../shared/mpv-launch-mode';
|
||||||
|
import type { MpvLaunchMode } from '../../types/config';
|
||||||
|
|
||||||
export interface WindowsMpvLaunchDeps {
|
export interface WindowsMpvLaunchDeps {
|
||||||
getEnv: (name: string) => string | undefined;
|
getEnv: (name: string) => string | undefined;
|
||||||
@@ -89,6 +91,7 @@ export function buildWindowsMpvLaunchArgs(
|
|||||||
extraArgs: string[] = [],
|
extraArgs: string[] = [],
|
||||||
binaryPath?: string,
|
binaryPath?: string,
|
||||||
pluginEntrypointPath?: string,
|
pluginEntrypointPath?: string,
|
||||||
|
launchMode: MpvLaunchMode = 'normal',
|
||||||
): string[] {
|
): string[] {
|
||||||
const launchIdle = targets.length === 0;
|
const launchIdle = targets.length === 0;
|
||||||
const inputIpcServer =
|
const inputIpcServer =
|
||||||
@@ -119,6 +122,7 @@ export function buildWindowsMpvLaunchArgs(
|
|||||||
'--secondary-sid=auto',
|
'--secondary-sid=auto',
|
||||||
'--secondary-sub-visibility=no',
|
'--secondary-sub-visibility=no',
|
||||||
...(scriptOpts ? [scriptOpts] : []),
|
...(scriptOpts ? [scriptOpts] : []),
|
||||||
|
...buildMpvLaunchModeArgs(launchMode),
|
||||||
...extraArgs,
|
...extraArgs,
|
||||||
...targets,
|
...targets,
|
||||||
];
|
];
|
||||||
@@ -131,6 +135,7 @@ export async function launchWindowsMpv(
|
|||||||
binaryPath?: string,
|
binaryPath?: string,
|
||||||
pluginEntrypointPath?: string,
|
pluginEntrypointPath?: string,
|
||||||
configuredMpvPath?: string,
|
configuredMpvPath?: string,
|
||||||
|
launchMode: MpvLaunchMode = 'normal',
|
||||||
): Promise<{ ok: boolean; mpvPath: string }> {
|
): Promise<{ ok: boolean; mpvPath: string }> {
|
||||||
const normalizedConfiguredPath = normalizeCandidate(configuredMpvPath);
|
const normalizedConfiguredPath = normalizeCandidate(configuredMpvPath);
|
||||||
const mpvPath = resolveWindowsMpvPath(deps, normalizedConfiguredPath);
|
const mpvPath = resolveWindowsMpvPath(deps, normalizedConfiguredPath);
|
||||||
@@ -147,7 +152,7 @@ export async function launchWindowsMpv(
|
|||||||
try {
|
try {
|
||||||
await deps.spawnDetached(
|
await deps.spawnDetached(
|
||||||
mpvPath,
|
mpvPath,
|
||||||
buildWindowsMpvLaunchArgs(targets, extraArgs, binaryPath, pluginEntrypointPath),
|
buildWindowsMpvLaunchArgs(targets, extraArgs, binaryPath, pluginEntrypointPath, launchMode),
|
||||||
);
|
);
|
||||||
return { ok: true, mpvPath };
|
return { ok: true, mpvPath };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -126,9 +126,7 @@ export function createKeyboardHandlers(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function acceleratorToKeyString(accelerator: string): string | null {
|
function acceleratorToKeyString(accelerator: string): string | null {
|
||||||
const normalized = accelerator
|
const normalized = accelerator.replace(/\s+/g, '').replace(/cmdorctrl/gi, 'CommandOrControl');
|
||||||
.replace(/\s+/g, '')
|
|
||||||
.replace(/cmdorctrl/gi, 'CommandOrControl');
|
|
||||||
if (!normalized) return null;
|
if (!normalized) return null;
|
||||||
const parts = normalized.split('+').filter(Boolean);
|
const parts = normalized.split('+').filter(Boolean);
|
||||||
const keyToken = parts.pop();
|
const keyToken = parts.pop();
|
||||||
|
|||||||
@@ -75,7 +75,10 @@ function createListStub() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
test.afterEach(() => {
|
test.afterEach(() => {
|
||||||
if (Object.prototype.hasOwnProperty.call(globalThis, 'window') && globalThis.window === undefined) {
|
if (
|
||||||
|
Object.prototype.hasOwnProperty.call(globalThis, 'window') &&
|
||||||
|
globalThis.window === undefined
|
||||||
|
) {
|
||||||
Reflect.deleteProperty(globalThis, 'window');
|
Reflect.deleteProperty(globalThis, 'window');
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
|
|||||||
@@ -22,17 +22,12 @@ function daysFromCivil(year: number, month: number, day: number): bigint {
|
|||||||
const yearOfEra = adjustedYear - era * 400;
|
const yearOfEra = adjustedYear - era * 400;
|
||||||
const monthIndex = month + (month > 2 ? -3 : 9);
|
const monthIndex = month + (month > 2 ? -3 : 9);
|
||||||
const dayOfYear = floorDiv(153 * monthIndex + 2, 5) + day - 1;
|
const dayOfYear = floorDiv(153 * monthIndex + 2, 5) + day - 1;
|
||||||
const dayOfEra =
|
const dayOfEra = yearOfEra * 365 + floorDiv(yearOfEra, 4) - floorDiv(yearOfEra, 100) + dayOfYear;
|
||||||
yearOfEra * 365 + floorDiv(yearOfEra, 4) - floorDiv(yearOfEra, 100) + dayOfYear;
|
|
||||||
return BigInt(era * 146097 + dayOfEra - 719468);
|
return BigInt(era * 146097 + dayOfEra - 719468);
|
||||||
}
|
}
|
||||||
|
|
||||||
function dateToEpochMs(date: Date): bigint {
|
function dateToEpochMs(date: Date): bigint {
|
||||||
const dayCount = daysFromCivil(
|
const dayCount = daysFromCivil(date.getUTCFullYear(), date.getUTCMonth() + 1, date.getUTCDate());
|
||||||
date.getUTCFullYear(),
|
|
||||||
date.getUTCMonth() + 1,
|
|
||||||
date.getUTCDate(),
|
|
||||||
);
|
|
||||||
const timeOfDayMs = BigInt(
|
const timeOfDayMs = BigInt(
|
||||||
((date.getUTCHours() * 60 + date.getUTCMinutes()) * 60 + date.getUTCSeconds()) * 1000 +
|
((date.getUTCHours() * 60 + date.getUTCMinutes()) * 60 + date.getUTCSeconds()) * 1000 +
|
||||||
date.getUTCMilliseconds(),
|
date.getUTCMilliseconds(),
|
||||||
|
|||||||
15
src/shared/mpv-launch-mode.test.ts
Normal file
15
src/shared/mpv-launch-mode.test.ts
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import assert from 'node:assert/strict';
|
||||||
|
import test from 'node:test';
|
||||||
|
import { buildMpvLaunchModeArgs, parseMpvLaunchMode } from './mpv-launch-mode';
|
||||||
|
|
||||||
|
test('parseMpvLaunchMode normalizes valid string values', () => {
|
||||||
|
assert.equal(parseMpvLaunchMode(' fullscreen '), 'fullscreen');
|
||||||
|
assert.equal(parseMpvLaunchMode('MAXIMIZED'), 'maximized');
|
||||||
|
assert.equal(parseMpvLaunchMode('normal'), 'normal');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('buildMpvLaunchModeArgs returns the expected mpv flags', () => {
|
||||||
|
assert.deepEqual(buildMpvLaunchModeArgs('normal'), []);
|
||||||
|
assert.deepEqual(buildMpvLaunchModeArgs('maximized'), ['--window-maximized=yes']);
|
||||||
|
assert.deepEqual(buildMpvLaunchModeArgs('fullscreen'), ['--fullscreen']);
|
||||||
|
});
|
||||||
27
src/shared/mpv-launch-mode.ts
Normal file
27
src/shared/mpv-launch-mode.ts
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import type { MpvLaunchMode } from '../types/config';
|
||||||
|
|
||||||
|
export const MPV_LAUNCH_MODE_VALUES = [
|
||||||
|
'normal',
|
||||||
|
'maximized',
|
||||||
|
'fullscreen',
|
||||||
|
] as const satisfies readonly MpvLaunchMode[];
|
||||||
|
|
||||||
|
export function parseMpvLaunchMode(value: unknown): MpvLaunchMode | undefined {
|
||||||
|
if (typeof value !== 'string') {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
const normalized = value.trim().toLowerCase();
|
||||||
|
return MPV_LAUNCH_MODE_VALUES.find((candidate) => candidate === normalized);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildMpvLaunchModeArgs(launchMode: MpvLaunchMode): string[] {
|
||||||
|
switch (launchMode) {
|
||||||
|
case 'fullscreen':
|
||||||
|
return ['--fullscreen'];
|
||||||
|
case 'maximized':
|
||||||
|
return ['--window-maximized=yes'];
|
||||||
|
default:
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -203,13 +203,7 @@ test('resolveDefaultMpvInstallPaths resolves linux, macOS, and Windows defaults'
|
|||||||
'main.lua',
|
'main.lua',
|
||||||
),
|
),
|
||||||
pluginDir: path.posix.join(macHomeDir, '.config', 'mpv', 'scripts', 'subminer'),
|
pluginDir: path.posix.join(macHomeDir, '.config', 'mpv', 'scripts', 'subminer'),
|
||||||
pluginConfigPath: path.posix.join(
|
pluginConfigPath: path.posix.join(macHomeDir, '.config', 'mpv', 'script-opts', 'subminer.conf'),
|
||||||
macHomeDir,
|
|
||||||
'.config',
|
|
||||||
'mpv',
|
|
||||||
'script-opts',
|
|
||||||
'subminer.conf',
|
|
||||||
),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.deepEqual(resolveDefaultMpvInstallPaths('win32', 'C:\\Users\\tester', undefined), {
|
assert.deepEqual(resolveDefaultMpvInstallPaths('win32', 'C:\\Users\\tester', undefined), {
|
||||||
|
|||||||
@@ -242,8 +242,8 @@ export function resolveDefaultMpvInstallPaths(
|
|||||||
const platformPath = getPlatformPath(platform);
|
const platformPath = getPlatformPath(platform);
|
||||||
const mpvConfigDir =
|
const mpvConfigDir =
|
||||||
platform === 'linux' || platform === 'darwin'
|
platform === 'linux' || platform === 'darwin'
|
||||||
? platformPath.join(xdgConfigHome?.trim() || platformPath.join(homeDir, '.config'), 'mpv')
|
? platformPath.join(xdgConfigHome?.trim() || platformPath.join(homeDir, '.config'), 'mpv')
|
||||||
: platformPath.join(homeDir, 'AppData', 'Roaming', 'mpv');
|
: platformPath.join(homeDir, 'AppData', 'Roaming', 'mpv');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
supported: platform === 'linux' || platform === 'darwin' || platform === 'win32',
|
supported: platform === 'linux' || platform === 'darwin' || platform === 'win32',
|
||||||
|
|||||||
@@ -50,8 +50,11 @@ export interface TexthookerConfig {
|
|||||||
openBrowser?: boolean;
|
openBrowser?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type MpvLaunchMode = 'normal' | 'maximized' | 'fullscreen';
|
||||||
|
|
||||||
export interface MpvConfig {
|
export interface MpvConfig {
|
||||||
executablePath?: string;
|
executablePath?: string;
|
||||||
|
launchMode?: MpvLaunchMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SubsyncMode = 'auto' | 'manual';
|
export type SubsyncMode = 'auto' | 'manual';
|
||||||
@@ -129,6 +132,7 @@ export interface ResolvedConfig {
|
|||||||
texthooker: Required<TexthookerConfig>;
|
texthooker: Required<TexthookerConfig>;
|
||||||
mpv: {
|
mpv: {
|
||||||
executablePath: string;
|
executablePath: string;
|
||||||
|
launchMode: MpvLaunchMode;
|
||||||
};
|
};
|
||||||
controller: {
|
controller: {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
|
|||||||
Reference in New Issue
Block a user