mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-10 16:46:06 -08:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ffa2bce94
|
||
|
|
88b73656a7
|
||
|
|
e77aa5c3b3 | ||
|
|
121b688afb | ||
|
|
727be5683a | ||
|
|
138bfe9759 | ||
|
|
0aba17d95b
|
No files matched your search
@@ -1,5 +1,55 @@
|
||||
# Changelog
|
||||
|
||||
## v0.20.1 (2026-10-03)
|
||||
|
||||
### Added
|
||||
- **YouTube Browser Window**:
|
||||
- Browse YouTube with your login kept across restarts. Open it with `subminer youtube`, `subminer yt`, or tray **Browse YouTube**.
|
||||
- Clicking a video plays it in mpv. Middle-click, Shift/Ctrl-click, or the right-click menu adds it to mpv's playlist.
|
||||
- Queued videos get the same Japanese subtitle setup, and the rest of the queue is kept on Windows.
|
||||
- Closing the window quits a SubMiner started by `subminer youtube`.
|
||||
- **Whisper Subtitles for YouTube**:
|
||||
- Set `youtube.subtitleSource` to `whisper` to transcribe YouTube videos with Whisper instead of using YouTube's captions.
|
||||
- The video stays paused while Whisper transcribes, and the subtitle generation modal shows progress.
|
||||
- The subtitle generation modal (`Ctrl+Shift+G`) now works on YouTube videos, including Windows stream playback.
|
||||
- **Scroll Wheel and Mouse Bindings**: `keybindings` now accepts scroll wheel keys, and the settings key editor can capture them. Mouse button and wheel bindings from mpv now work while the cursor is over the overlay, including on Hyprland.
|
||||
- **Run Commands from Session Help**: During playback, press `Enter` or double-click a row in session help to run that command.
|
||||
|
||||
### Changed
|
||||
- **Release Assets**: Releases no longer include package-size reports.
|
||||
|
||||
### Fixed
|
||||
- **Hyprland Overlay**: The overlay stays clickable after mpv goes fullscreen with `mpv.backend: x11`, and it no longer interrupts mpv while mpv enters fullscreen.
|
||||
- **mpv Key Bindings**: Bindings from mpv such as `9`/`0` for volume now work while the overlay has focus, even if the overlay loaded before mpv connected.
|
||||
- **Jellyfin**:
|
||||
- The Japanese subtitle track is selected as soon as it downloads, without waiting for the other tracks.
|
||||
- Japanese and English tracks are auto-selected on episodes whose embedded subtitles are images.
|
||||
- Timing review previews and mined card audio use the audio track you are playing.
|
||||
- **Media Timing Review**: Trim handles are now thin lines on the clip edges, and original subtitle boundaries no longer cover the waveform. The preview cursor no longer stutters on macOS with Bluetooth headphones.
|
||||
- **YouTube Subtitles**: Japanese subtitles no longer fail with "HTTP 429" on videos where YouTube also lists a machine-translated Japanese track.
|
||||
- **Stats**:
|
||||
- Mined cards are counted once in session and lifetime stats.
|
||||
- Word and kanji dates and the new-words charts stay accurate after deleting sessions. Existing data is repaired in the background.
|
||||
- Overview totals, charts, and the activity calendar refresh after deleting sessions.
|
||||
- **Yomitan Data Safety**: Electron is updated to 43.7.7. SubMiner now refuses to load your Yomitan data with an unsupported or downgraded runtime. Automatic character dictionary changes stop if Yomitan suddenly reports no dictionaries.
|
||||
- **AppImage in Sandboxes**: The AppImage now opens its window when launched in a sandbox such as `firejail --appimage`.
|
||||
- **Ctrl+C Crash**: SubMiner no longer crashes with "write EPIPE" when the terminal command that started it is stopped with Ctrl+C.
|
||||
|
||||
### Docs
|
||||
- **Docs Site**: The docs site is shorter and easier to scan, with a key and default table for each config block. Outdated pages were corrected, and the MeCab install command for Arch Linux is fixed.
|
||||
- **Stats Docs**: The docs now cover the Overview refresh after deleting sessions and how discovery dates are kept after old sessions are pruned.
|
||||
|
||||
<details>
|
||||
<summary>Internal changes</summary>
|
||||
|
||||
### Internal
|
||||
- **Release Notes**: Release notes and `CHANGELOG.md` are now generated as short items per feature or area.
|
||||
- **Dev Profile**: Development launches use a separate `SubMiner-dev` profile unless production-profile access is requested.
|
||||
- **Dependencies**: undici is updated to 7.29.1 to clear the security advisories that were blocking CI.
|
||||
- **Package Checks**: CI no longer compares package sizes. Package content checks still run.
|
||||
|
||||
</details>
|
||||
|
||||
## v0.20.0 (2026-09-23)
|
||||
|
||||
### Added
|
||||
|
||||
@@ -467,7 +467,7 @@
|
||||
|
||||
"hosted-git-info": ["hosted-git-info@4.1.0", "", { "dependencies": { "lru-cache": "^6.0.0" } }, "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA=="],
|
||||
|
||||
"http-cache-semantics": ["http-cache-semantics@4.2.0", "", {}, "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ=="],
|
||||
"http-cache-semantics": ["http-cache-semantics@4.3.0", "", {}, "sha512-M5t5LlJpS1UHMjvwRQVdFHvPISGeLAxNcrWuJkeGh0KxsqCHZ1O3NXZU/8x7cD0BDcGW8kapxMKTvwlqrNkHkA=="],
|
||||
|
||||
"http-proxy-agent": ["http-proxy-agent@7.0.2", "", { "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" } }, "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig=="],
|
||||
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ How fragments turn into a release:
|
||||
|
||||
- At release time, `bun run changelog:build` (and `bun run changelog:prerelease-notes`) pipes every pending fragment through `claude -p` to merge related items, drop noise, and rewrite into a clean user-facing release body. Write fragments as raw, informative notes — don't worry about polished prose, deduping across PRs, or line-by-line phrasing. The polish step handles all of that.
|
||||
- The polish step treats pending fragments as the final release outcome, not prerelease history. If a feature is added and then renamed or fixed before the stable cut, ship the final feature bullet instead of separate prerelease-only breaking/fix entries.
|
||||
- `CHANGELOG.md`, GitHub release notes, and prerelease notes all use short top-level items with one nested bullet per distinct change, instead of packing a release's worth of detail into a single paragraph bullet. An item with only one thing to say stays inline on the top-level bullet. Release notes and prerelease notes additionally cover user benefit and any useful action note in their nested bullets.
|
||||
- `CHANGELOG.md`, GitHub release notes, and prerelease notes all use one item per feature or area, inline by default: `- **Name**: one or two short sentences.` Items with several separate changes may use a few short nested bullets instead of a run-on sentence. Items say what changed and how to reach it; implementation details, edge cases, and step-by-step usage belong in the docs, not the release body.
|
||||
- `internal` fragments stay in `CHANGELOG.md` (inside a collapsed `<details>` block) but are dropped from the GitHub release notes entirely.
|
||||
- The polished `CHANGELOG.md` and `release/release-notes.md` are committed and reviewed before tagging — edit the Markdown by hand if Claude misses something.
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
type: fixed
|
||||
area: linux
|
||||
|
||||
- Fixed the AppImage exiting without opening a window when launched inside a sandbox that mounts the image itself, such as `firejail --appimage` (used by the AppImage catalog test). The detached background app now runs straight from the sandbox's squashfs mount instead of trying to re-mount the AppImage over FUSE.
|
||||
@@ -1,4 +0,0 @@
|
||||
type: fixed
|
||||
area: app
|
||||
|
||||
- SubMiner no longer crashes with "write EPIPE" when the terminal command that started it is stopped with Ctrl+C.
|
||||
@@ -1,7 +0,0 @@
|
||||
type: docs
|
||||
area: docs
|
||||
|
||||
- Rewrote the docs site to be shorter and easier to scan: pages lead with setup and use, reference material lives in compact tables, and internal detail was cut from user pages.
|
||||
- The configuration reference now has a short explanation and a key/default table for each config block.
|
||||
- Fixed docs that no longer matched current behavior.
|
||||
- Fixed the Arch Linux install command for MeCab, which is only in the AUR (`mecab-git`), and brought the README requirements and quick start in line with the installation guide.
|
||||
@@ -1,6 +0,0 @@
|
||||
type: fixed
|
||||
area: dictionary
|
||||
|
||||
- Upgraded the desktop runtime to Electron 43.7.7 and added profile guards that block unsupported runtimes and Electron major or minor downgrades before Yomitan storage is loaded. Patch downgrades within the same major and minor version are allowed.
|
||||
- Development launches now use a separate `SubMiner-dev` profile unless production-profile access is explicitly requested.
|
||||
- Automatic character-dictionary changes now stop when a previously non-empty Yomitan profile suddenly reports zero dictionaries.
|
||||
@@ -1,4 +0,0 @@
|
||||
type: fixed
|
||||
area: overlay
|
||||
|
||||
- Keep the subtitle overlay mapped during fullscreen transitions on Hyprland, avoiding focus changes from repeated hide/show calls that can cancel mpv fullscreen entry. Preserve the hide/show refresh on Sway.
|
||||
@@ -1,4 +0,0 @@
|
||||
type: fixed
|
||||
area: overlay
|
||||
|
||||
- Fixed the overlay (subtitles and sidebar) becoming unclickable after mpv goes fullscreen on Hyprland with `mpv.backend: x11`. The launcher no longer strips `HYPRLAND_INSTANCE_SIGNATURE` from the X11 environment, so the overlay can lift Hyprland's fullscreen input block again.
|
||||
@@ -1,5 +0,0 @@
|
||||
type: fixed
|
||||
area: jellyfin
|
||||
|
||||
- Jellyfin playback now selects the Japanese subtitle track, and starts subtitle annotations, as soon as that track downloads instead of waiting for every other subtitle track. Tracks now download in parallel, so a slow embedded track Jellyfin has to extract no longer delays the primary subtitles.
|
||||
- Jellyfin episodes with image-based embedded subtitles (PGS, DVD, DVB) now auto-select the Japanese and English tracks. SubMiner no longer requests those tracks as text, and a subtitle track that fails to download no longer cancels selection of the others.
|
||||
@@ -1,4 +0,0 @@
|
||||
type: fixed
|
||||
area: jellyfin
|
||||
|
||||
- Timing review previews and mined card audio now use the audio track you are playing on Jellyfin direct-play streams, instead of the track Jellyfin marks as default.
|
||||
@@ -1,4 +0,0 @@
|
||||
type: fixed
|
||||
area: overlay
|
||||
|
||||
- Fixed mpv key bindings (input.conf and mpv defaults, e.g. `9`/`0` volume) doing nothing while the overlay had focus when the overlay loaded before SubMiner connected to mpv, common in `mpv.backend: x11` mode. The overlay now reloads mpv's bindings once mpv connects.
|
||||
@@ -1,5 +0,0 @@
|
||||
type: added
|
||||
area: overlay
|
||||
|
||||
- Added scroll wheel keys (`WHEEL_UP`, `WHEEL_DOWN`, `WHEEL_LEFT`, `WHEEL_RIGHT`, with modifiers) to `keybindings`, including capture from the settings key editor.
|
||||
- Mouse button and scroll wheel bindings from mpv (`input.conf` and mpv defaults, e.g. double-click fullscreen, wheel volume, back/forward for playlist) now work while the cursor is over the overlay. On Hyprland, where the overlay always receives input, they previously did nothing. SubMiner bindings and the right-click pause still take priority.
|
||||
@@ -1,4 +0,0 @@
|
||||
type: fixed
|
||||
area: dependencies
|
||||
|
||||
- Updated Electron to 42.10.0 and undici to 7.29.1 to resolve the security advisories blocking CI.
|
||||
@@ -1,4 +0,0 @@
|
||||
type: changed
|
||||
area: release
|
||||
|
||||
- Removed package-size JSON reports from future releases and their CI size comparisons. Package-content validation remains enabled.
|
||||
@@ -1,4 +0,0 @@
|
||||
type: added
|
||||
area: overlay
|
||||
|
||||
- Session help can run the highlighted command during playback: press `Enter` or double-click a row. Hovering a row with the mouse makes it the `Enter` target. Help opened from the tray with no video loaded stays read-only.
|
||||
@@ -1,7 +0,0 @@
|
||||
type: fixed
|
||||
area: stats
|
||||
|
||||
- Fixed sentence mining (single and multi-line) counting each created card twice in session and lifetime stats.
|
||||
- Fixed deleting a session leaving word and kanji "last seen" dates pointing at the deleted session; affected rows are repaired once in the background on next launch.
|
||||
- Fixed re-seen words that the vocabulary filter hides still being counted in the new-words charts, so charts and the vocabulary summary now agree. Existing mismatches are repaired by the same background pass.
|
||||
- Fixed Overview totals, charts, activity calendar, and vocabulary summary staying stale after deleting sessions. Failed refreshes keep the dashboard visible and offer a retry.
|
||||
@@ -1,4 +0,0 @@
|
||||
type: docs
|
||||
area: stats
|
||||
|
||||
- Documented the automatic Overview refresh after deleting sessions or session groups and retrying failed refreshes.
|
||||
@@ -1,4 +0,0 @@
|
||||
type: fixed
|
||||
area: overlay
|
||||
|
||||
- On macOS with Bluetooth headphones such as AirPods, the timing review preview cursor now moves smoothly across the selection instead of stuttering and jumping to the end partway through. This affected Opus audio, including Jellyfin streams.
|
||||
@@ -1,5 +0,0 @@
|
||||
type: fixed
|
||||
area: overlay
|
||||
|
||||
- Media timing review trim handles are now thin lines centered on the clip edge, so it's clear where the clip starts and ends and less of the waveform is covered.
|
||||
- Original subtitle boundaries use orange bars without text tags, leaving the waveform unobstructed.
|
||||
@@ -1,7 +0,0 @@
|
||||
type: added
|
||||
area: youtube
|
||||
|
||||
- Added a YouTube browser window (`subminer youtube`/`subminer yt`, or tray **Browse YouTube**) that keeps your YouTube login across restarts.
|
||||
- Clicking a video plays it in mpv instead of the page; middle-click, Shift/Ctrl-click, or the right-click menu queues it in mpv's playlist.
|
||||
- Queued YouTube videos get the same Japanese subtitle setup when mpv reaches them.
|
||||
- Closing the YouTube window quits a SubMiner started by `subminer youtube` (after mpv closes, if a video is still playing).
|
||||
@@ -1,4 +0,0 @@
|
||||
type: fixed
|
||||
area: youtube
|
||||
|
||||
- YouTube Japanese subtitles no longer fail with "HTTP 429" on videos where YouTube also lists a machine-translated Japanese track; SubMiner now picks the real track and falls back to yt-dlp if a direct subtitle download is refused.
|
||||
@@ -1,7 +0,0 @@
|
||||
type: added
|
||||
area: youtube
|
||||
|
||||
- Added `youtube.subtitleSource`: set it to `whisper` to transcribe YouTube videos with Whisper instead of downloading YouTube's captions. The default stays `youtube`.
|
||||
- Whisper mode keeps the video paused while it transcribes, with progress in the subtitle generation modal; close the modal to keep watching, or cancel to continue without subtitles.
|
||||
- The subtitle generation modal (`Ctrl+Shift+G`) now also works on YouTube videos, whatever `youtube.subtitleSource` is set to.
|
||||
- Whisper mode downloads a small audio-only stream and deletes it once generation ends, or when you switch videos, close mpv, or quit.
|
||||
@@ -1,5 +1,55 @@
|
||||
# Changelog
|
||||
|
||||
## v0.20.1 (2026-10-03)
|
||||
|
||||
**Added**
|
||||
- **YouTube Browser Window**:
|
||||
- Browse YouTube with your login kept across restarts. Open it with `subminer youtube`, `subminer yt`, or tray **Browse YouTube**.
|
||||
- Clicking a video plays it in mpv. Middle-click, Shift/Ctrl-click, or the right-click menu adds it to mpv's playlist.
|
||||
- Queued videos get the same Japanese subtitle setup, and the rest of the queue is kept on Windows.
|
||||
- Closing the window quits a SubMiner started by `subminer youtube`.
|
||||
- **Whisper Subtitles for YouTube**:
|
||||
- Set `youtube.subtitleSource` to `whisper` to transcribe YouTube videos with Whisper instead of using YouTube's captions.
|
||||
- The video stays paused while Whisper transcribes, and the subtitle generation modal shows progress.
|
||||
- The subtitle generation modal (`Ctrl+Shift+G`) now works on YouTube videos, including Windows stream playback.
|
||||
- **Scroll Wheel and Mouse Bindings**: `keybindings` now accepts scroll wheel keys, and the settings key editor can capture them. Mouse button and wheel bindings from mpv now work while the cursor is over the overlay, including on Hyprland.
|
||||
- **Run Commands from Session Help**: During playback, press `Enter` or double-click a row in session help to run that command.
|
||||
|
||||
**Changed**
|
||||
- **Release Assets**: Releases no longer include package-size reports.
|
||||
|
||||
**Fixed**
|
||||
- **Hyprland Overlay**: The overlay stays clickable after mpv goes fullscreen with `mpv.backend: x11`, and it no longer interrupts mpv while mpv enters fullscreen.
|
||||
- **mpv Key Bindings**: Bindings from mpv such as `9`/`0` for volume now work while the overlay has focus, even if the overlay loaded before mpv connected.
|
||||
- **Jellyfin**:
|
||||
- The Japanese subtitle track is selected as soon as it downloads, without waiting for the other tracks.
|
||||
- Japanese and English tracks are auto-selected on episodes whose embedded subtitles are images.
|
||||
- Timing review previews and mined card audio use the audio track you are playing.
|
||||
- **Media Timing Review**: Trim handles are now thin lines on the clip edges, and original subtitle boundaries no longer cover the waveform. The preview cursor no longer stutters on macOS with Bluetooth headphones.
|
||||
- **YouTube Subtitles**: Japanese subtitles no longer fail with "HTTP 429" on videos where YouTube also lists a machine-translated Japanese track.
|
||||
- **Stats**:
|
||||
- Mined cards are counted once in session and lifetime stats.
|
||||
- Word and kanji dates and the new-words charts stay accurate after deleting sessions. Existing data is repaired in the background.
|
||||
- Overview totals, charts, and the activity calendar refresh after deleting sessions.
|
||||
- **Yomitan Data Safety**: Electron is updated to 43.7.7. SubMiner now refuses to load your Yomitan data with an unsupported or downgraded runtime. Automatic character dictionary changes stop if Yomitan suddenly reports no dictionaries.
|
||||
- **AppImage in Sandboxes**: The AppImage now opens its window when launched in a sandbox such as `firejail --appimage`.
|
||||
- **Ctrl+C Crash**: SubMiner no longer crashes with "write EPIPE" when the terminal command that started it is stopped with Ctrl+C.
|
||||
|
||||
**Docs**
|
||||
- **Docs Site**: The docs site is shorter and easier to scan, with a key and default table for each config block. Outdated pages were corrected, and the MeCab install command for Arch Linux is fixed.
|
||||
- **Stats Docs**: The docs now cover the Overview refresh after deleting sessions and how discovery dates are kept after old sessions are pruned.
|
||||
|
||||
<details>
|
||||
<summary>Internal changes</summary>
|
||||
|
||||
**Internal**
|
||||
- **Release Notes**: Release notes and `CHANGELOG.md` are now generated as short items per feature or area.
|
||||
- **Dev Profile**: Development launches use a separate `SubMiner-dev` profile unless production-profile access is requested.
|
||||
- **Dependencies**: undici is updated to 7.29.1 to clear the security advisories that were blocking CI.
|
||||
- **Package Checks**: CI no longer compares package sizes. Package content checks still run.
|
||||
|
||||
</details>
|
||||
|
||||
## v0.20.0 (2026-09-23)
|
||||
|
||||
**Added**
|
||||
|
||||
@@ -124,4 +124,6 @@ Leave out `--lookback-days` to scan all history. Word and kanji counts are corre
|
||||
|
||||
By default SubMiner keeps everything. To limit history, set `immersionTracking.retentionPreset` to `minimal`, `balanced`, or `deep-history`, or set the `immersionTracking.retention.*Days` values yourself (`0` keeps all). Lifetime totals and vocabulary counts are stored separately and stay exact when old sessions are pruned.
|
||||
|
||||
Deleting retained sessions preserves earlier word and kanji discovery dates from pruned history. New occurrences record observation time so deletion can update their dates exactly. Older history used write time, so an earlier discovery date is preserved when its origin cannot be determined.
|
||||
|
||||
See [Immersion tracking](/configuration#immersion-tracking) and [Stats dashboard](/configuration#stats-dashboard) in the config reference for every option and default.
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"name": "subminer",
|
||||
"productName": "SubMiner",
|
||||
"desktopName": "SubMiner.desktop",
|
||||
"version": "0.20.1-beta.1",
|
||||
"version": "0.20.1",
|
||||
"description": "All-in-one sentence mining overlay with AnkiConnect and dictionary integration",
|
||||
"packageManager": "bun@1.3.5",
|
||||
"main": "dist/main-entry.js",
|
||||
|
||||
+55
-49
@@ -1,73 +1,76 @@
|
||||
> This is a prerelease build for testing. Stable changelog and docs-site updates remain pending until the final stable release.
|
||||
|
||||
<!-- prerelease-version: 0.20.1-beta.1 -->
|
||||
<!-- prerelease-version: 0.20.1-beta.2; since: v0.20.1-beta.1 -->
|
||||
|
||||
## Changes since v0.20.1-beta.1
|
||||
|
||||
- Upgraded the desktop runtime to Electron 43.7.7.
|
||||
- SubMiner now refuses to start on an unsupported Electron runtime, or after an Electron major or minor downgrade, so your Yomitan profile data stays safe; patch downgrades are still allowed.
|
||||
- Automatic character-dictionary updates now stop if a Yomitan profile that had dictionaries suddenly reports none.
|
||||
- Development launches now use a separate `SubMiner-dev` profile unless you explicitly ask for the production profile.
|
||||
- Sentence mining (single and multi-line) no longer counts each card twice in session and lifetime stats.
|
||||
- Deleting sessions now updates word and kanji "first seen" and "last seen" dates correctly, and retention pruning keeps historical discovery dates and counts.
|
||||
- Words hidden by the vocabulary filter are no longer counted in the new-words charts, so the charts now match the vocabulary summary.
|
||||
- A one-time background repair on next launch fixes stale "last seen" dates and existing chart mismatches.
|
||||
- Overview totals, charts, the activity calendar, and the vocabulary summary now refresh after you delete sessions, and a failed refresh keeps the dashboard visible with a retry option.
|
||||
- Subtitle generation now works during Windows YouTube playback and loads the generated subtitles into the playing video.
|
||||
- On Windows, moving on to a video queued from the YouTube browser window no longer drops the rest of mpv's queue.
|
||||
- The stats docs now cover the automatic Overview refresh after deletions and how discovery dates are kept through retention pruning.
|
||||
|
||||
## Highlights
|
||||
|
||||
### Added
|
||||
|
||||
- **YouTube Browser Window**:
|
||||
- Open a YouTube browser with `subminer youtube` (or `subminer yt`), or pick **Browse YouTube** from the tray. It stays logged in to YouTube across restarts.
|
||||
- Clicking a video plays it in mpv instead of on the page.
|
||||
- Middle-click, Shift-click, Ctrl-click, or the right-click menu adds a video to mpv's playlist.
|
||||
- When a queued video starts, it gets the same Japanese subtitle setup.
|
||||
- If you started SubMiner with `subminer youtube`, closing the YouTube window quits SubMiner. If a video is still playing, SubMiner quits after mpv closes.
|
||||
- Open it with `subminer youtube` (or `subminer yt`), or pick **Browse YouTube** from the tray. It stays logged in across restarts.
|
||||
- Clicking a video plays it in mpv. Middle-click, Shift-click, Ctrl-click, or the right-click menu adds it to mpv's playlist.
|
||||
- Queued videos get the same Japanese subtitle setup when they start.
|
||||
- Closing the window quits SubMiner if you started it with `subminer youtube`. If a video is still playing, SubMiner waits until mpv closes.
|
||||
- **Whisper Subtitles for YouTube**:
|
||||
- Set `youtube.subtitleSource` to `whisper` to make subtitles with Whisper instead of downloading YouTube's captions. The default is still `youtube`.
|
||||
- The video stays paused while Whisper works, and progress shows in the subtitle generation modal. Close the modal to keep watching, or cancel to carry on without subtitles.
|
||||
- The subtitle generation modal (`Ctrl+Shift+G`) now works on YouTube videos with either `youtube.subtitleSource` setting.
|
||||
- Whisper downloads only a small audio stream and deletes it when generation ends, or when you switch videos, close mpv, or quit.
|
||||
- Set `youtube.subtitleSource` to `whisper` to make subtitles with Whisper instead of downloading YouTube's captions.
|
||||
- The video stays paused while Whisper works, and progress shows in the subtitle generation modal. You can close the modal to keep watching, or cancel.
|
||||
- The subtitle generation modal (`Ctrl+Shift+G`) now works on YouTube videos, including on Windows.
|
||||
- **Mouse and Scroll Wheel Bindings**:
|
||||
- `keybindings` now accepts scroll wheel keys (`WHEEL_UP`, `WHEEL_DOWN`, `WHEEL_LEFT`, `WHEEL_RIGHT`), with or without modifiers. You can also record them in the settings key editor.
|
||||
- Mouse button and scroll wheel bindings from mpv now work while the cursor is over the overlay. This covers your `input.conf` and mpv's defaults, such as double-click for fullscreen, the wheel for volume, and back/forward for the playlist.
|
||||
- Hyprland users benefit most: the overlay always takes input there, so these bindings did nothing before.
|
||||
- SubMiner's own bindings and right-click pause still win over mpv's.
|
||||
- **Session Help Commands**:
|
||||
- During playback, press `Enter` or double-click a row in session help to run that command.
|
||||
- Hovering over a row makes it the target for `Enter`.
|
||||
- Session help opened from the tray with no video loaded is still read-only.
|
||||
- You can now use scroll wheel keys (`WHEEL_UP`, `WHEEL_DOWN`, `WHEEL_LEFT`, `WHEEL_RIGHT`) in `keybindings` and record them in the settings key editor.
|
||||
- mpv's mouse button and wheel bindings now work while the cursor is over the overlay. This matters most on Hyprland, where these bindings did nothing before.
|
||||
- When a binding conflicts, SubMiner's own bindings and right-click pause take priority over mpv's.
|
||||
- **Session Help Commands**: During playback, press `Enter` or double-click a row in session help to run that command. Hovering over a row makes it the target for `Enter`.
|
||||
|
||||
### Changed
|
||||
|
||||
- **Release Assets**: Releases no longer include package-size JSON reports. Package contents are still validated before release.
|
||||
- **Release Assets**: Releases no longer include package-size JSON reports.
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Jellyfin Subtitles**:
|
||||
- The Japanese subtitle track is selected, and annotations start, as soon as that track downloads. SubMiner no longer waits for every other track.
|
||||
- Subtitle tracks now download in parallel, so a slow embedded track no longer holds up the main subtitles.
|
||||
- Episodes with image-based subtitles (PGS, DVD, DVB) now select the Japanese and English tracks automatically.
|
||||
- If one subtitle track fails to download, the other tracks are still selected.
|
||||
- **Jellyfin Audio Track**: On direct-play Jellyfin streams, timing review previews and mined card audio now use the audio track you're playing, not the one Jellyfin marks as default.
|
||||
- The Japanese track is selected, and annotations start, as soon as it downloads. SubMiner no longer waits for the other tracks.
|
||||
- Japanese and English tracks are now picked automatically on episodes with image-based subtitles (PGS, DVD, DVB).
|
||||
- If one track fails to download, the other tracks are still selected.
|
||||
- **Jellyfin Audio Track**: On direct-play streams, timing review previews and mined card audio now use the audio track you're playing.
|
||||
- **Media Timing Review**:
|
||||
- Trim handles are now thin lines centered on the clip edges. The start and end of the clip are easier to see, and less of the waveform is hidden.
|
||||
- The original subtitle boundaries are now plain orange bars without text labels, so the waveform stays visible.
|
||||
- On macOS with Bluetooth headphones such as AirPods, the preview cursor now moves smoothly. Before, it stuttered and jumped to the end partway through. This affected Opus audio, including Jellyfin streams.
|
||||
- **Hyprland Fullscreen**:
|
||||
- The subtitle overlay now stays visible when mpv enters or leaves fullscreen, so focus changes no longer cancel fullscreen. Sway still refreshes the overlay as before.
|
||||
- With `mpv.backend: x11`, subtitles and the sidebar no longer stop responding to clicks after mpv goes fullscreen.
|
||||
- **mpv Key Bindings in the Overlay**:
|
||||
- mpv key bindings, such as `9`/`0` for volume, now work while the overlay has focus.
|
||||
- They used to do nothing if the overlay loaded before SubMiner connected to mpv, which was common with `mpv.backend: x11`. The overlay now reloads mpv's bindings once mpv connects.
|
||||
- **YouTube Japanese Subtitles**:
|
||||
- Some videos also list a machine-translated Japanese track. On those, Japanese subtitles no longer fail with "HTTP 429", because SubMiner now picks the real Japanese track.
|
||||
- If YouTube refuses a direct subtitle download, SubMiner retries with yt-dlp.
|
||||
- **AppImage in Sandboxes**: The AppImage now opens its window when started in a sandbox that mounts the image itself, such as `firejail --appimage`. Before, it exited without opening a window.
|
||||
- **Ctrl+C Crash**: Stopping the terminal command that started SubMiner with Ctrl+C no longer crashes SubMiner with a "write EPIPE" error.
|
||||
- **Security Updates**: Electron is updated to 42.10.0 and undici to 7.29.1 to fix known security advisories.
|
||||
- Trim handles are now thin lines centered on the clip edges.
|
||||
- Original subtitle boundaries are now plain orange bars with no labels.
|
||||
- The preview cursor no longer stutters on macOS with Bluetooth headphones such as AirPods.
|
||||
- **Hyprland Fullscreen**: The overlay stays visible when mpv enters or leaves fullscreen. With `mpv.backend: x11`, subtitles and the sidebar stay clickable after going fullscreen.
|
||||
- **mpv Key Bindings in the Overlay**: mpv key bindings, such as `9`/`0` for volume, now work while the overlay has focus, even when the overlay loaded before mpv connected.
|
||||
- **YouTube Japanese Subtitles**: Some videos also list a machine-translated Japanese track. On those, Japanese subtitles no longer fail with "HTTP 429". If YouTube refuses a direct download, SubMiner retries with yt-dlp.
|
||||
- **Stats Accuracy**:
|
||||
- Sentence mining no longer counts each card twice in session and lifetime stats.
|
||||
- Overview totals, charts, the activity calendar, and the vocabulary summary now update after you delete sessions.
|
||||
- Word and kanji dates stay correct after deleting sessions. New-word charts now match the vocabulary summary.
|
||||
- **Dictionary Safety**: Automatic character dictionary changes now stop if a Yomitan profile that had dictionaries suddenly reports none. SubMiner also refuses to load Yomitan data after a downgrade to an older Electron version.
|
||||
- **AppImage in Sandboxes**: The AppImage now opens its window in sandboxes that mount the image themselves, such as `firejail --appimage`.
|
||||
- **Ctrl+C Crash**: Stopping the terminal command that started SubMiner with Ctrl+C no longer crashes it with a "write EPIPE" error.
|
||||
- **Security Updates**: Electron is updated to 43.7.7 and undici to 7.29.1, which fixes known security advisories.
|
||||
|
||||
### Docs
|
||||
|
||||
- **Docs Site Rewrite**:
|
||||
- Pages are shorter and easier to scan. Each one starts with setup and usage, and reference details are in compact tables.
|
||||
- The configuration reference now gives each config block a short explanation and a table of keys and defaults.
|
||||
- Pages that no longer matched how SubMiner works have been corrected.
|
||||
- **Arch Linux Install**:
|
||||
- The MeCab install command is fixed. MeCab is only in the AUR, as `mecab-git`.
|
||||
- The README's requirements and quick start now match the installation guide.
|
||||
- **Docs Site Rewrite**: Pages are shorter and easier to scan. The configuration reference now has a short explanation and a table of keys and defaults for each config block. Pages that no longer matched current behavior are fixed.
|
||||
- **Arch Linux Install**: The MeCab install command now uses the AUR package `mecab-git`. The README now matches the installation guide.
|
||||
- **Stats**: The docs now cover the Overview refreshing after you delete sessions, and how first-seen dates are kept when old sessions are cleaned up.
|
||||
|
||||
## What's Changed
|
||||
|
||||
- fix(storage): protect Yomitan profiles across Electron runtime changes by @ksyasuda in #211
|
||||
- fix(jellyfin): select subtitles faster and survive failed track downloads by @ksyasuda in #270
|
||||
- fix(jellyfin): use the current audio track for media generation by @ksyasuda in #271
|
||||
- feat(youtube): add YouTube browser window and Whisper subtitle source by @ksyasuda in #273
|
||||
@@ -77,14 +80,17 @@
|
||||
- fix(linux): skip AppImage mount keepalive on sandbox squashfs mounts by @ksyasuda in #277
|
||||
- fix(overlay): reload imported mpv keys after mpv connects by @ksyasuda in #278
|
||||
- feat(overlay): forward mpv mouse button and wheel bindings by @ksyasuda in #279
|
||||
- fix(stats): count mined cards once and keep lexical stats exact after deletes by @ksyasuda in #280
|
||||
- fix(youtube): keep mpv queue when advancing to a queued video on Windows by @ksyasuda in #281
|
||||
- fix(subtitles): allow Whisper generation during Windows YouTube stream playback by @ksyasuda in #282
|
||||
|
||||
## Installation
|
||||
|
||||
See the [installation guide](https://docs.subminer.moe/installation) for full setup steps.
|
||||
See the README and docs/installation guide for full setup steps.
|
||||
|
||||
## Assets
|
||||
|
||||
- Linux: `SubMiner-*.AppImage`
|
||||
- Linux: `SubMiner.AppImage`
|
||||
- macOS: `SubMiner-*.dmg` and `SubMiner-*.zip`
|
||||
- Windows: `SubMiner-*.exe` and `SubMiner-*-win.zip`
|
||||
- Optional extras: `subminer-assets.tar.gz`, the `subminer` launcher, and the Windows `subminer.cmd` launcher
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
## Highlights
|
||||
### Added
|
||||
- **YouTube Browser Window**:
|
||||
- Browse YouTube in a window that keeps your login across restarts. Open it with `subminer youtube` (or `subminer yt`), or choose **Browse YouTube** from the tray.
|
||||
- Clicking a video plays it in mpv. Middle-click, Shift/Ctrl-click, or the right-click menu adds it to mpv's playlist.
|
||||
- Queued videos get the same Japanese subtitle setup when they start playing.
|
||||
- **Whisper Subtitles for YouTube**: Set `youtube.subtitleSource` to `whisper` to transcribe YouTube videos with Whisper instead of using YouTube's captions. The subtitle generation modal (`Ctrl+Shift+G`) now also works on YouTube videos.
|
||||
- **Scroll Wheel and Mouse Bindings**: `keybindings` now accepts scroll wheel keys, and the settings key editor can capture them. Mouse button and wheel bindings from mpv now work while the cursor is over the overlay.
|
||||
- **Run Commands From Session Help**: Press `Enter` or double-click a row in session help to run that command during playback.
|
||||
|
||||
### Fixed
|
||||
- **YouTube**:
|
||||
- Japanese subtitles no longer fail with "HTTP 429" on videos that also have a machine-translated Japanese track.
|
||||
- On Windows, the subtitle generation modal now works during YouTube playback.
|
||||
- On Windows, playing a video queued from the YouTube browser window no longer clears the rest of mpv's queue.
|
||||
- **Jellyfin**:
|
||||
- The Japanese subtitle track is selected as soon as it downloads, instead of waiting for every other track.
|
||||
- Japanese and English image-based subtitles (PGS, DVD, DVB) are now selected automatically.
|
||||
- Timing review previews and mined card audio use the audio track you are playing.
|
||||
- **Hyprland Overlay**: The overlay no longer interrupts mpv when it goes fullscreen. With `mpv.backend: x11`, the overlay stays clickable after mpv goes fullscreen.
|
||||
- **mpv Key Bindings**: Keys from mpv's defaults and your `input.conf` (such as `9` and `0` for volume) now work while the overlay has focus, even when the overlay loads before SubMiner connects to mpv.
|
||||
- **Media Timing Review**: Trim handles are now thin lines on the clip edges, and the original subtitle boundaries are plain orange bars. On macOS with Bluetooth headphones such as AirPods, the preview cursor now moves smoothly.
|
||||
- **Stats**:
|
||||
- Each mined card is counted once instead of twice.
|
||||
- Overview totals, charts, the calendar, and the vocabulary summary update right after you delete sessions.
|
||||
- Word and kanji dates stay correct after deletes and pruning, and the new-words charts now agree with the vocabulary summary. Existing data is repaired in the background on the next launch.
|
||||
- **Yomitan Profile Safety**: Electron is updated to 43.7.7, and SubMiner now refuses to load your Yomitan data with an older or unsupported runtime. Automatic character-dictionary updates stop if a profile that had dictionaries suddenly reports none.
|
||||
- **Security Updates**: Updated Electron and undici to resolve security advisories.
|
||||
- **AppImage in Sandboxes**: The AppImage now opens a window when launched inside a sandbox such as `firejail --appimage`.
|
||||
- **Ctrl+C Crash**: SubMiner no longer crashes with "write EPIPE" when you stop the terminal command that started it with Ctrl+C.
|
||||
|
||||
### Docs
|
||||
- **Docs Site**: The docs site is shorter and easier to scan, and the configuration reference now has a table of keys and defaults for each section. Outdated pages were corrected, and the Arch Linux MeCab install now uses the AUR package `mecab-git`.
|
||||
- **Stats**: Added docs on how the Overview refreshes after you delete sessions and how discovery dates are kept after pruning.
|
||||
|
||||
## What's Changed
|
||||
|
||||
- fix(storage): protect Yomitan profiles across Electron runtime changes by @ksyasuda in #211
|
||||
- fix(jellyfin): select subtitles faster and survive failed track downloads by @ksyasuda in #270
|
||||
- fix(jellyfin): use the current audio track for media generation by @ksyasuda in #271
|
||||
- feat(youtube): add YouTube browser window and Whisper subtitle source by @ksyasuda in #273
|
||||
- fix(overlay): thin centered trim handles and label-free subtitle boundaries in timing review by @ksyasuda in #274
|
||||
- feat(overlay): run session help commands with Enter or double-click by @ksyasuda in #275
|
||||
- fix(overlay): keep overlay mapped during Hyprland/Sway fullscreen by @ksyasuda in #276
|
||||
- fix(linux): skip AppImage mount keepalive on sandbox squashfs mounts by @ksyasuda in #277
|
||||
- fix(overlay): reload imported mpv keys after mpv connects by @ksyasuda in #278
|
||||
- feat(overlay): forward mpv mouse button and wheel bindings by @ksyasuda in #279
|
||||
- fix(stats): count mined cards once and keep lexical stats exact after deletes by @ksyasuda in #280
|
||||
- fix(youtube): keep mpv queue when advancing to a queued video on Windows by @ksyasuda in #281
|
||||
- fix(subtitles): allow Whisper generation during Windows YouTube stream playback by @ksyasuda in #282
|
||||
|
||||
## Installation
|
||||
|
||||
See the README and docs/installation guide for full setup steps.
|
||||
|
||||
## Assets
|
||||
|
||||
- Linux: `SubMiner.AppImage`
|
||||
- macOS: `SubMiner-*.dmg` and `SubMiner-*.zip`
|
||||
- Windows: `SubMiner-*.exe` and `SubMiner-*-win.zip`
|
||||
- Optional extras: `subminer-assets.tar.gz`, the `subminer` launcher, and the Windows `subminer.cmd` launcher
|
||||
- Bun corresponding source: `bun-v1.3.5-source.tar.gz` and its `.sha256` file
|
||||
|
||||
Both launcher downloads use Bun included with the SubMiner app. Download `subminer` on Linux or macOS and `subminer.cmd` on Windows.
|
||||
|
||||
The app bundles an unmodified Bun 1.3.5 runtime. Bun is MIT licensed and statically links JavaScriptCore (LGPL 2.0) and TinyCC (LGPL 2.1). License texts and third-party notices ship inside the app under `resources/bun/licenses`, and the source archive above contains the matching Bun, WebKit, and dependency sources for relinking.
|
||||
@@ -44,20 +44,12 @@ function fragmentTypesInPrompt(input: string): string[] {
|
||||
.map((line) => line.slice('type: '.length).trim());
|
||||
}
|
||||
|
||||
function assertPromptRequestsNestedBullets(input: string): void {
|
||||
assert.match(input, /In both modes, split every item into one nested bullet per distinct change/);
|
||||
assert.match(input, /Never stack several distinct changes into one long paragraph-shaped bullet/);
|
||||
assert.match(input, /Keep nested bullets short, concrete, and readable by non-technical users/);
|
||||
assert.match(input, /Avoid paragraph-style release-note bullets/);
|
||||
}
|
||||
|
||||
function assertReleaseNotesPromptRequestsNestedBullets(input: string): void {
|
||||
assertPromptRequestsNestedBullets(input);
|
||||
assert.match(
|
||||
input,
|
||||
/In MODE: release-notes, nested bullets should also cover user benefit and any user action/,
|
||||
);
|
||||
assert.match(input, /Do not require the exact nested labels/);
|
||||
function assertPromptRequestsConciseItems(input: string): void {
|
||||
assert.match(input, /Default to inline/);
|
||||
assert.match(input, /Use nested bullets only when an item has several distinct changes/);
|
||||
assert.match(input, /Never write paragraph-length bullets/);
|
||||
assert.match(input, /Merge aggressively: one item per feature or area/);
|
||||
assert.match(input, /Release notes summarize; the docs hold the details/);
|
||||
}
|
||||
|
||||
function defaultPolishedBody(input: string): string {
|
||||
@@ -454,14 +446,13 @@ test('writeChangelogArtifacts prompts Claude to summarize the final stable outco
|
||||
prompt,
|
||||
/Multiple fixes within the same prerelease cycle should collapse into one current-state bullet/,
|
||||
);
|
||||
assertPromptRequestsNestedBullets(prompt);
|
||||
assertPromptRequestsConciseItems(prompt);
|
||||
}
|
||||
|
||||
const releaseNotesPrompt = stub.calls.find(
|
||||
(call) => modeFromPrompt(call.input) === 'release-notes',
|
||||
);
|
||||
assert.ok(releaseNotesPrompt, 'expected a release-notes Claude invocation');
|
||||
assertReleaseNotesPromptRequestsNestedBullets(releaseNotesPrompt.input);
|
||||
} finally {
|
||||
fs.rmSync(workspace, { recursive: true, force: true });
|
||||
}
|
||||
@@ -817,7 +808,11 @@ test('writePrereleaseNotesForVersion prompts Claude to revise stale prerelease b
|
||||
prompt,
|
||||
/Multiple fixes within the same prerelease cycle should collapse into one current-state bullet/,
|
||||
);
|
||||
assertReleaseNotesPromptRequestsNestedBullets(prompt);
|
||||
assert.match(
|
||||
prompt,
|
||||
/shorten long baseline bullets and collapse nested lists that do not need to be nested/,
|
||||
);
|
||||
assertPromptRequestsConciseItems(prompt);
|
||||
} finally {
|
||||
fs.rmSync(workspace, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
+24
-16
@@ -476,21 +476,29 @@ You will receive a list of FRAGMENT entries below. Each fragment has metadata (t
|
||||
|
||||
</details>
|
||||
Do not include the Internal section at all in MODE: release-notes; internal fragments will not be present in the input for that mode.
|
||||
4. Each top-level change item should:
|
||||
- Lead with a short feature/area name in title case. Pick the name from the fragment's bullet content, not the raw 'area:' slug.
|
||||
- Be written in user-facing language. Drop implementation jargon, internal class names, file paths, and PR numbers.
|
||||
- Be merged with related bullets when possible. If five fragments all touch Windows overlay z-order/focus/restore, write one or two bullets that summarize the overall improvement instead of five.
|
||||
4. Start every item with a short bold feature/area name in title case and a colon. Pick the name from the fragment's bullet content, not the raw 'area:' slug.
|
||||
- Default to inline: put one or two short sentences right after the colon. If the important details fit in two short sentences, stay inline.
|
||||
- Use nested bullets only when an item has several distinct changes a user would care about separately and inline text would turn into a long run-on sentence. Then leave the top-level bullet as just the name and indent two to four nested bullets by two spaces.
|
||||
- Each nested bullet is a single short sentence, roughly 20 words or fewer. Never write paragraph-length bullets. Cut minor details rather than adding sentences.
|
||||
5. Keep items brief. Release notes summarize; the docs hold the details.
|
||||
- Say what changed for the user and how to reach it (shortcut, command, setting, or menu). Stop there.
|
||||
- Leave out how it works internally, edge cases, precedence rules, defaults, fallbacks, tool discovery, migration mechanics, and step-by-step usage.
|
||||
- Name a config key only when users must set it to use the change or to keep their current behavior.
|
||||
- Write in user-facing language. Drop implementation jargon, internal class names, file paths, and PR numbers.
|
||||
- Merge aggressively: one item per feature or area. If five fragments touch Jellyfin subtitles, audio, and auth, write one Jellyfin item, not five. Group small unrelated fixes for the same area into one item.
|
||||
- Drop bullets that only describe PR housekeeping, CodeRabbit follow-ups, or test-only changes that don't affect users.
|
||||
- Preserve the substance of breaking changes that remain breaking after applying the Release Outcome Rules. Do not soften or omit them.
|
||||
5. In both modes, split every item into one nested bullet per distinct change. Write a short bold name on the top-level bullet, then indent the details two spaces:
|
||||
- **Playlist Browser**:
|
||||
- Saved shows now open without rescanning the library.
|
||||
- The picker remembers the last folder you browsed between launches.
|
||||
Each nested bullet covers exactly one change, behavior, or user-visible outcome. Never stack several distinct changes into one long paragraph-shaped bullet.
|
||||
Aim for two to five nested bullets per item. When an item genuinely has only one thing to say, put it inline on the top-level bullet ("- **Playlist Browser**: Saved shows now open without rescanning the library.") instead of emitting a single nested bullet.
|
||||
Keep nested bullets short, concrete, and readable by non-technical users. Avoid paragraph-style release-note bullets.
|
||||
Bullets inside the Internal section may stay single-level.
|
||||
6. In MODE: release-notes, nested bullets should also cover user benefit and any user action or compatibility note when useful. Do not require the exact nested labels; natural phrasing is fine. Omit the action bullet when no action is needed.
|
||||
- Preserve the substance of breaking changes that remain breaking after applying the Release Outcome Rules, including any action users must take. Do not soften or omit them.
|
||||
6. Match the length and density of this example:
|
||||
### Added
|
||||
- **Subtitle Selection Modal**: Optional modal for picking primary and secondary subtitle tracks. Enable it in Settings under Behavior, then press g followed by s.
|
||||
### Changed
|
||||
- **Faster Sync**: Sync between macOS and Linux machines now uses compressed, incremental rsync transfers. Windows and machines without rsync fall back to compressed scp.
|
||||
### Fixed
|
||||
- **Subtitle Sidebar**: Space keeps its playback action after clicking a cue, and the sidebar no longer jumps away from the current position during subtitle gaps.
|
||||
- **Jellyfin 12**:
|
||||
- Playback, subtitles, artwork, and "Play on SubMiner" now work on Jellyfin 12.
|
||||
- Casting no longer drops after about a minute.
|
||||
- Mined cards get the episode title again.
|
||||
7. Do not invent features. Every bullet must be grounded in the input fragments.
|
||||
8. Do not include the version heading (## v...) — that wrapper is added by the caller.
|
||||
|
||||
@@ -791,7 +799,7 @@ function polishFragmentsWithClaude(
|
||||
? [
|
||||
'## Existing Prerelease Notes',
|
||||
'',
|
||||
'The input includes EXISTING PRERELEASE NOTES before the fragment list. Existing prerelease notes are a baseline, not an immutable changelog. Reuse reviewed highlight bullets when they still describe the current outcome, but replace stale beta or RC wording when new fragments supersede it. Merge in only new or changed fragment material, and deduplicate instead of restating existing bullets. Output only the final highlights body using the section headings above; do not include the prerelease disclaimer, any "Changes since" section, or the Installation or Assets sections.',
|
||||
'The input includes EXISTING PRERELEASE NOTES before the fragment list. Existing prerelease notes are a baseline, not an immutable changelog. Reuse reviewed highlight bullets when they still describe the current outcome, but replace stale beta or RC wording when new fragments supersede it. Merge in only new or changed fragment material, and deduplicate instead of restating existing bullets. The output rules above win over the baseline format: shorten long baseline bullets and collapse nested lists that do not need to be nested. Output only the final highlights body using the section headings above; do not include the prerelease disclaimer, any "Changes since" section, or the Installation or Assets sections.',
|
||||
'',
|
||||
].join('\n')
|
||||
: '';
|
||||
@@ -814,7 +822,7 @@ Rules:
|
||||
3. ADDED fragments describe changes that are new in this build; summarize them.
|
||||
4. MODIFIED fragments include BEFORE and AFTER content. Describe only the behavioral difference between them. If the edit is editorial (rewording, deduplication, reformatting, reconciling stale phrasing) with no user-visible behavior change, omit it entirely.
|
||||
5. DELETED fragments mean the described change was removed or reverted before this build; say so explicitly.
|
||||
6. Keep bullets short and concrete. Use nested bullets sparingly.
|
||||
6. Keep each bullet to one short, concrete sentence. Use nested bullets sparingly.
|
||||
7. Do not invent changes. Every bullet must be grounded in the diffs.
|
||||
8. If no bullet survives rules 2-5, output exactly this single line:
|
||||
- No user-facing changes since PREVIOUS_TAG.
|
||||
|
||||
@@ -5,8 +5,9 @@ import path from 'node:path';
|
||||
import test from 'node:test';
|
||||
import { Database } from '../sqlite.js';
|
||||
import type { DatabaseSync } from '../sqlite.js';
|
||||
import { ensureSchema } from '../storage.js';
|
||||
import { createTrackerPreparedStatements, ensureSchema, executeQueuedWrite } from '../storage.js';
|
||||
import { deleteSession, deleteSessions, deleteVideo } from '../query-maintenance.js';
|
||||
import { pruneRawRetention } from '../maintenance.js';
|
||||
|
||||
const DAY_MS = 86_400_000;
|
||||
const BASE_MS = 1_700_000_000_000;
|
||||
@@ -232,20 +233,135 @@ for (const legacyRows of [false, true]) {
|
||||
});
|
||||
}
|
||||
|
||||
test('deleting the earliest session moves first_seen even when the stored bound predates seen_ms', () => {
|
||||
test('deleting legacy history preserves first_seen when it predates the flush timestamp', () => {
|
||||
const { db, dbPath } = createDb([
|
||||
{ session: 1, wordId: 23, dayOffset: 0, msOffset: 400 },
|
||||
{ session: 2, wordId: 23, dayOffset: 5, msOffset: 400 },
|
||||
]);
|
||||
|
||||
try {
|
||||
// first_seen is stamped when the line is queued (and older refreshes rounded
|
||||
// it down), so it sits slightly before the occurrence's flush-time seen_ms.
|
||||
// A queue delay and retention-pruned history cannot be distinguished from
|
||||
// the old flush-time timestamp. Preserve the earlier date in either case.
|
||||
db.prepare('UPDATE imm_words SET first_seen = ? WHERE id = 23').run(BASE_MS / 1000);
|
||||
|
||||
deleteSession(db, 1);
|
||||
|
||||
assert.equal(readWord(db, 23)?.firstSeen, (BASE_MS + 5 * DAY_MS + 400) / 1000);
|
||||
assert.equal(readWord(db, 23)?.firstSeen, BASE_MS / 1000);
|
||||
} finally {
|
||||
db.close();
|
||||
cleanupDbPath(dbPath);
|
||||
}
|
||||
});
|
||||
|
||||
for (const legacyRows of [false, true]) {
|
||||
for (const deletedSession of [2, 3]) {
|
||||
test(`deleting retained session ${deletedSession} preserves pruned first_seen (legacyRows=${legacyRows})`, () => {
|
||||
const { db, dbPath } = createDb(
|
||||
[
|
||||
{ session: 1, wordId: 24, dayOffset: 0 },
|
||||
{ session: 2, wordId: 24, dayOffset: 1 },
|
||||
],
|
||||
{ legacyRows },
|
||||
);
|
||||
|
||||
try {
|
||||
const latestMs = BASE_MS + 2 * DAY_MS;
|
||||
db.exec(`
|
||||
INSERT INTO imm_sessions(session_id, session_uuid, video_id, started_at_ms, ended_at_ms, status, CREATED_DATE, LAST_UPDATE_DATE)
|
||||
VALUES (3, 's3', 2, '${latestMs}', '${latestMs + 1000}', 2, ${latestMs}, ${latestMs});
|
||||
INSERT INTO imm_subtitle_lines(line_id, session_id, video_id, line_index, text, CREATED_DATE, LAST_UPDATE_DATE)
|
||||
VALUES (3, 3, 2, 3, '猫', ${latestMs}, ${latestMs});
|
||||
INSERT INTO imm_word_line_occurrences(line_id, word_id, occurrence_count, seen_ms)
|
||||
VALUES (3, 24, 1, ${legacyRows ? 'NULL' : latestMs});
|
||||
UPDATE imm_words SET frequency = 3, last_seen = ${latestMs / 1000} WHERE id = 24;
|
||||
INSERT INTO imm_kanji(id, kanji, first_seen, last_seen, frequency)
|
||||
SELECT 24, '猫', first_seen, last_seen, frequency FROM imm_words WHERE id = 24;
|
||||
INSERT INTO imm_kanji_line_occurrences(line_id, kanji_id, occurrence_count, seen_ms)
|
||||
SELECT line_id, 24, occurrence_count, seen_ms FROM imm_word_line_occurrences WHERE word_id = 24;
|
||||
`);
|
||||
pruneRawRetention(db, latestMs, {
|
||||
eventsRetentionMs: Infinity,
|
||||
telemetryRetentionMs: Infinity,
|
||||
sessionsRetentionMs: 1.5 * DAY_MS,
|
||||
});
|
||||
|
||||
deleteSession(db, deletedSession);
|
||||
|
||||
for (const table of ['imm_words', 'imm_kanji']) {
|
||||
const row = db
|
||||
.prepare(
|
||||
`SELECT frequency, first_seen AS firstSeen, last_seen AS lastSeen FROM ${table} WHERE id = 24`,
|
||||
)
|
||||
.get() as { frequency: number; firstSeen: number; lastSeen: number };
|
||||
assert.equal(row.frequency, 2);
|
||||
assert.equal(row.firstSeen, BASE_MS / 1000, `${table} keeps the pruned discovery date`);
|
||||
assert.equal(row.lastSeen, (BASE_MS + (deletedSession === 2 ? 2 : 1) * DAY_MS) / 1000);
|
||||
}
|
||||
} finally {
|
||||
db.close();
|
||||
cleanupDbPath(dbPath);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
test('deleting a queued subtitle uses observation time despite a delayed flush', () => {
|
||||
const { db, dbPath } = createDb([]);
|
||||
|
||||
try {
|
||||
const stmts = createTrackerPreparedStatements(db);
|
||||
for (const sessionId of [1, 2]) {
|
||||
const seenMs = BASE_MS + (sessionId - 1) * DAY_MS + 400;
|
||||
executeQueuedWrite(
|
||||
{
|
||||
kind: 'subtitleLine',
|
||||
sessionId,
|
||||
videoId: sessionId,
|
||||
lineIndex: 1,
|
||||
segmentStartMs: null,
|
||||
segmentEndMs: null,
|
||||
text: '猫',
|
||||
wordOccurrences: [
|
||||
{
|
||||
headword: '猫',
|
||||
word: '猫',
|
||||
reading: 'ねこ',
|
||||
partOfSpeech: 'noun',
|
||||
pos1: '名詞',
|
||||
pos2: '一般',
|
||||
pos3: '',
|
||||
occurrenceCount: 1,
|
||||
frequencyRank: null,
|
||||
},
|
||||
],
|
||||
kanjiOccurrences: [{ kanji: '猫', occurrenceCount: 1 }],
|
||||
firstSeen: seenMs / 1000,
|
||||
lastSeen: seenMs / 1000,
|
||||
},
|
||||
stmts,
|
||||
);
|
||||
for (const table of ['imm_word_line_occurrences', 'imm_kanji_line_occurrences']) {
|
||||
const row = db
|
||||
.prepare(`SELECT seen_ms AS seenMs FROM ${table} WHERE line_id = ?`)
|
||||
.get(sessionId) as { seenMs: number };
|
||||
assert.equal(row.seenMs, seenMs);
|
||||
}
|
||||
}
|
||||
|
||||
deleteSession(db, 1);
|
||||
|
||||
for (const table of ['imm_words', 'imm_kanji']) {
|
||||
const row = db
|
||||
.prepare(`SELECT frequency, first_seen AS firstSeen, last_seen AS lastSeen FROM ${table}`)
|
||||
.get() as {
|
||||
frequency: number;
|
||||
firstSeen: number;
|
||||
lastSeen: number;
|
||||
};
|
||||
assert.equal(row.frequency, 1);
|
||||
assert.equal(row.firstSeen, (BASE_MS + DAY_MS + 400) / 1000);
|
||||
assert.equal(row.lastSeen, (BASE_MS + DAY_MS + 400) / 1000);
|
||||
}
|
||||
} finally {
|
||||
db.close();
|
||||
cleanupDbPath(dbPath);
|
||||
|
||||
@@ -29,10 +29,10 @@ export function localEpochDaySql(value: string): string {
|
||||
}
|
||||
|
||||
// Session deletes once rounded removed timestamps to whole seconds, missing
|
||||
// fractional last_seen extremes that pointed at deleted history. last_seen is
|
||||
// stamped at queue time, before seen_ms is stamped at flush, and retention
|
||||
// prunes the oldest sessions first, so healthy rows never exceed their newest
|
||||
// surviving occurrence. Rows with undated occurrences are skipped.
|
||||
// fractional last_seen extremes that pointed at deleted history. New seen_ms
|
||||
// values match observation time; legacy values were stamped later at flush.
|
||||
// Retention prunes the oldest sessions first, so healthy rows never exceed
|
||||
// their newest surviving occurrence. Rows with undated occurrences are skipped.
|
||||
//
|
||||
// first_seen is deliberately not repaired: a stale bound is indistinguishable
|
||||
// from real history whose occurrences retention pruned, and frequency does not
|
||||
|
||||
@@ -322,6 +322,13 @@ export function applyLexicalRemovals(db: DatabaseSync, plan: LexicalRemovalPlan)
|
||||
applyRemovalsForEntity(db, 'kanji', plan.kanji);
|
||||
}
|
||||
|
||||
// A timestamp repair must keep subtraction-exact lifetime counts and any
|
||||
// first_seen date that the deleted occurrences cannot account for.
|
||||
type LexicalAggregateOverride = {
|
||||
frequency: number | null;
|
||||
firstSeen: number | null;
|
||||
};
|
||||
|
||||
function applyRemovalsForEntity(
|
||||
db: DatabaseSync,
|
||||
entity: LexicalEntity,
|
||||
@@ -360,7 +367,7 @@ function applyRemovalsForEntity(
|
||||
`UPDATE ${entityTable} SET frequency = ?, first_seen = ?, last_seen = ? WHERE id = ?`,
|
||||
);
|
||||
|
||||
const needsExactRefresh: number[] = [];
|
||||
const needsExactRefresh = new Map<number, LexicalAggregateOverride>();
|
||||
|
||||
for (const removal of removals) {
|
||||
const current = selectStmt.get(removal.id) as {
|
||||
@@ -371,47 +378,50 @@ function applyRemovalsForEntity(
|
||||
if (!current) continue;
|
||||
|
||||
const nextFrequency = (current.frequency ?? 0) - removal.removedFrequency;
|
||||
// Legacy occurrences use flush time, which can follow the actual observation.
|
||||
// An earlier stored date may also belong to retention-pruned history. Only
|
||||
// move it when the removed timestamps prove that its observation was deleted.
|
||||
const removedFirstSeen = toStoredSeenSeconds(removal.removedFirstSeenMs);
|
||||
const removedLastSeen = toStoredSeenSeconds(removal.removedLastSeenMs);
|
||||
const firstSeenMayHaveMoved =
|
||||
current.firstSeen === null ||
|
||||
(removedFirstSeen !== null && removedFirstSeen <= current.firstSeen);
|
||||
const lastSeenMayHaveMoved =
|
||||
current.lastSeen === null ||
|
||||
(removedLastSeen !== null && removedLastSeen >= current.lastSeen);
|
||||
const exactRefreshOverride = {
|
||||
frequency: nextFrequency > 0 ? nextFrequency : null,
|
||||
firstSeen: firstSeenMayHaveMoved ? null : current.firstSeen,
|
||||
};
|
||||
if (nextFrequency <= 0) {
|
||||
// The rows in scope are already gone by now, so anything still pointing at
|
||||
// this entity means the stored frequency was stale rather than exhausted.
|
||||
if (hasOccurrencesStmt.get(removal.id)) {
|
||||
needsExactRefresh.push(removal.id);
|
||||
needsExactRefresh.set(removal.id, exactRefreshOverride);
|
||||
} else {
|
||||
deleteStmt.run(removal.id);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// Stored bounds are stamped when a line is queued, before its seen_ms is
|
||||
// stamped at flush, and older refreshes rounded them down to whole seconds.
|
||||
// So first_seen can sit just before the occurrence that produced it; decide
|
||||
// against the surviving minimum instead. last_seen errs the safe way.
|
||||
const minSeenMs = (minSeenStmt.get(removal.id) as { value: number | null }).value;
|
||||
const removedLastSeen = toStoredSeenSeconds(removal.removedLastSeenMs);
|
||||
const firstSeenMayHaveMoved =
|
||||
current.firstSeen === null ||
|
||||
(removal.removedFirstSeenMs !== null &&
|
||||
(minSeenMs === null || Number(removal.removedFirstSeenMs) <= Number(minSeenMs)));
|
||||
const lastSeenMayHaveMoved =
|
||||
current.lastSeen === null ||
|
||||
(removedLastSeen !== null && removedLastSeen >= current.lastSeen);
|
||||
if (firstSeenMayHaveMoved || lastSeenMayHaveMoved) {
|
||||
// Undated pre-migration occurrences are invisible to the seeks below;
|
||||
// fall back to the full re-aggregate that resolves their dates.
|
||||
// resolve their dates without discarding retention-pruned aggregates.
|
||||
if (hasUndatedOccurrenceStmt.get(removal.id)) {
|
||||
needsExactRefresh.push(removal.id);
|
||||
needsExactRefresh.set(removal.id, exactRefreshOverride);
|
||||
continue;
|
||||
}
|
||||
const minSeenMs = (minSeenStmt.get(removal.id) as { value: number | null }).value;
|
||||
const maxSeenMs = (maxSeenStmt.get(removal.id) as { value: number | null }).value;
|
||||
if (minSeenMs === null || maxSeenMs === null) {
|
||||
// Frequency says occurrences remain but none exist: stale row, let the
|
||||
// exact refresh reconcile (it deletes rows with nothing left).
|
||||
needsExactRefresh.push(removal.id);
|
||||
needsExactRefresh.set(removal.id, exactRefreshOverride);
|
||||
continue;
|
||||
}
|
||||
updateAggregatesStmt.run(
|
||||
nextFrequency,
|
||||
toStoredSeenSeconds(Number(minSeenMs)),
|
||||
firstSeenMayHaveMoved ? toStoredSeenSeconds(Number(minSeenMs)) : current.firstSeen,
|
||||
toStoredSeenSeconds(Number(maxSeenMs)),
|
||||
removal.id,
|
||||
);
|
||||
@@ -422,13 +432,17 @@ function applyRemovalsForEntity(
|
||||
}
|
||||
|
||||
if (entity === 'word') {
|
||||
refreshWordAggregates(db, needsExactRefresh);
|
||||
refreshWordAggregates(db, [...needsExactRefresh.keys()], needsExactRefresh);
|
||||
} else {
|
||||
refreshKanjiAggregates(db, needsExactRefresh);
|
||||
refreshKanjiAggregates(db, [...needsExactRefresh.keys()], needsExactRefresh);
|
||||
}
|
||||
}
|
||||
|
||||
function refreshWordAggregates(db: DatabaseSync, wordIds: number[]): void {
|
||||
function refreshWordAggregates(
|
||||
db: DatabaseSync,
|
||||
wordIds: number[],
|
||||
overrides?: ReadonlyMap<number, LexicalAggregateOverride>,
|
||||
): void {
|
||||
if (wordIds.length === 0) {
|
||||
return;
|
||||
}
|
||||
@@ -476,15 +490,19 @@ function refreshWordAggregates(db: DatabaseSync, wordIds: number[]): void {
|
||||
continue;
|
||||
}
|
||||
updateStmt.run(
|
||||
row.frequency,
|
||||
toStoredSeenSeconds(row.firstSeen),
|
||||
overrides?.get(row.wordId)?.frequency ?? row.frequency,
|
||||
overrides?.get(row.wordId)?.firstSeen ?? toStoredSeenSeconds(row.firstSeen),
|
||||
toStoredSeenSeconds(row.lastSeen),
|
||||
row.wordId,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function refreshKanjiAggregates(db: DatabaseSync, kanjiIds: number[]): void {
|
||||
function refreshKanjiAggregates(
|
||||
db: DatabaseSync,
|
||||
kanjiIds: number[],
|
||||
overrides?: ReadonlyMap<number, LexicalAggregateOverride>,
|
||||
): void {
|
||||
if (kanjiIds.length === 0) {
|
||||
return;
|
||||
}
|
||||
@@ -532,8 +550,8 @@ function refreshKanjiAggregates(db: DatabaseSync, kanjiIds: number[]): void {
|
||||
continue;
|
||||
}
|
||||
updateStmt.run(
|
||||
row.frequency,
|
||||
toStoredSeenSeconds(row.firstSeen),
|
||||
overrides?.get(row.kanjiId)?.frequency ?? row.frequency,
|
||||
overrides?.get(row.kanjiId)?.firstSeen ?? toStoredSeenSeconds(row.firstSeen),
|
||||
toStoredSeenSeconds(row.lastSeen),
|
||||
row.kanjiId,
|
||||
);
|
||||
|
||||
@@ -1963,18 +1963,16 @@ export function executeQueuedWrite(write: QueuedWrite, stmts: TrackerPreparedSta
|
||||
currentMs,
|
||||
);
|
||||
const lineId = Number(lineResult.lastInsertRowid);
|
||||
// Match aggregate bounds to the observation, even if this write was queued
|
||||
// for a while. Flush time cannot identify which occurrence set first_seen.
|
||||
const seenMs = toDbTimestamp(Math.round(write.firstSeen * 1000));
|
||||
for (const occurrence of write.wordOccurrences) {
|
||||
const wordId = incrementWordAggregate(stmts, occurrence, write.firstSeen, write.lastSeen);
|
||||
stmts.wordLineOccurrenceUpsertStmt.run(lineId, wordId, occurrence.occurrenceCount, currentMs);
|
||||
stmts.wordLineOccurrenceUpsertStmt.run(lineId, wordId, occurrence.occurrenceCount, seenMs);
|
||||
}
|
||||
for (const occurrence of write.kanjiOccurrences) {
|
||||
const kanjiId = incrementKanjiAggregate(stmts, occurrence, write.firstSeen, write.lastSeen);
|
||||
stmts.kanjiLineOccurrenceUpsertStmt.run(
|
||||
lineId,
|
||||
kanjiId,
|
||||
occurrence.occurrenceCount,
|
||||
currentMs,
|
||||
);
|
||||
stmts.kanjiLineOccurrenceUpsertStmt.run(lineId, kanjiId, occurrence.occurrenceCount, seenMs);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6810,6 +6810,8 @@ const subtitleGenerationRuntime = createSubtitleGenerationRuntime({
|
||||
'youtube-whisper.ja.srt',
|
||||
),
|
||||
}),
|
||||
resolveYoutubeSourceUrl: (mediaPath) =>
|
||||
youtubePlaybackRuntime.getYoutubeSourceUrlForStream(mediaPath),
|
||||
getMpvClient: () => appState.mpvClient,
|
||||
onProgress: (progress) => {
|
||||
for (const window of [overlayManager.getMainWindow(), overlayManager.getModalWindow()]) {
|
||||
|
||||
@@ -368,7 +368,10 @@ test('cancelling a YouTube Whisper job resolves to null, and failures throw', as
|
||||
);
|
||||
});
|
||||
|
||||
function youtubeFixture(generateYoutube: SubtitleGenerationRuntimeDeps['generateYoutube']) {
|
||||
function youtubeFixture(
|
||||
generateYoutube: SubtitleGenerationRuntimeDeps['generateYoutube'],
|
||||
overrides: Partial<SubtitleGenerationRuntimeDeps> = {},
|
||||
) {
|
||||
const player = {
|
||||
path: 'https://www.youtube.com/watch?v=abcdefghijk&pp=search',
|
||||
paused: false,
|
||||
@@ -385,7 +388,7 @@ function youtubeFixture(generateYoutube: SubtitleGenerationRuntimeDeps['generate
|
||||
return { error: 'success' };
|
||||
},
|
||||
};
|
||||
const { runtime } = fixture({ getMpvClient: () => client, generateYoutube });
|
||||
const { runtime } = fixture({ getMpvClient: () => client, generateYoutube, ...overrides });
|
||||
return { runtime, player, commands };
|
||||
}
|
||||
|
||||
@@ -443,3 +446,63 @@ test('switching videos cancels a YouTube job from the modal without loading its
|
||||
false,
|
||||
);
|
||||
});
|
||||
|
||||
// Windows plays YouTube through a resolved googlevideo stream, so mpv's path is not a YouTube URL.
|
||||
const STREAM_URL = 'https://rr1---sn.example.googlevideo.com/videoplayback?expire=1777777777';
|
||||
const OTHER_STREAM_URL = 'https://rr2---sn.example.googlevideo.com/videoplayback?expire=1888888888';
|
||||
const resolveStreamSource = (mediaPath: string): string | null =>
|
||||
mediaPath === STREAM_URL
|
||||
? 'https://www.youtube.com/watch?v=abcdefghijk'
|
||||
: mediaPath === OTHER_STREAM_URL
|
||||
? 'https://www.youtube.com/watch?v=zyxwvutsrqp'
|
||||
: null;
|
||||
|
||||
test('the modal generates for a YouTube video playing through a resolved stream URL', async () => {
|
||||
let jobSignal: AbortSignal | null = null;
|
||||
const { runtime, player, commands } = youtubeFixture(
|
||||
async (input) => {
|
||||
jobSignal = input.signal;
|
||||
assert.equal(input.url, 'https://www.youtube.com/watch?v=abcdefghijk');
|
||||
// Reloading the same video's stream must not cancel the job.
|
||||
runtime.handleMediaPathChange(STREAM_URL);
|
||||
return '/tmp/subs/youtube-whisper.ja.srt';
|
||||
},
|
||||
{ resolveYoutubeSourceUrl: resolveStreamSource },
|
||||
);
|
||||
player.path = STREAM_URL;
|
||||
|
||||
assert.equal(
|
||||
(await runtime.getStatus()).mediaPath,
|
||||
'https://www.youtube.com/watch?v=abcdefghijk',
|
||||
);
|
||||
assert.deepEqual(await runtime.start(), {
|
||||
ok: true,
|
||||
outputPath: '/tmp/subs/youtube-whisper.ja.srt',
|
||||
message: 'Japanese subtitles generated and loaded.',
|
||||
});
|
||||
assert.equal((jobSignal as AbortSignal | null)?.aborted, false);
|
||||
assert.deepEqual(
|
||||
commands.find((command) => command[0] === 'sub-add'),
|
||||
['sub-add', '/tmp/subs/youtube-whisper.ja.srt', 'select', 'Generated Japanese', 'ja'],
|
||||
);
|
||||
});
|
||||
|
||||
test('switching to another resolved YouTube stream cancels the modal job', async () => {
|
||||
let jobSignal: AbortSignal | null = null;
|
||||
const { runtime, player } = youtubeFixture(
|
||||
(input) =>
|
||||
new Promise((_, reject) => {
|
||||
jobSignal = input.signal;
|
||||
input.signal.addEventListener('abort', () => reject(new Error('Aborted')), { once: true });
|
||||
}),
|
||||
{ resolveYoutubeSourceUrl: resolveStreamSource },
|
||||
);
|
||||
player.path = STREAM_URL;
|
||||
|
||||
const job = runtime.start();
|
||||
while (!jobSignal) await new Promise((resolve) => setImmediate(resolve));
|
||||
player.path = OTHER_STREAM_URL;
|
||||
runtime.handleMediaPathChange(player.path);
|
||||
|
||||
assert.deepEqual(await job, { ok: false, message: 'Cancelled.' });
|
||||
});
|
||||
@@ -51,6 +51,11 @@ export interface SubtitleGenerationRuntimeDeps {
|
||||
signal: AbortSignal;
|
||||
onProgress: (progress: SubtitleGenerationProgress) => void;
|
||||
}) => Promise<string>;
|
||||
/**
|
||||
* Maps a playing stream URL back to its YouTube page URL. Windows YouTube playback opens a
|
||||
* resolved direct stream in mpv, so mpv's path alone does not identify the video.
|
||||
*/
|
||||
resolveYoutubeSourceUrl?: (mediaPath: string) => string | null;
|
||||
}
|
||||
|
||||
async function currentLocalMedia(client: GenerationMpvClient | null): Promise<string | null> {
|
||||
@@ -62,12 +67,6 @@ async function currentLocalMedia(client: GenerationMpvClient | null): Promise<st
|
||||
return typeof directory === 'string' ? path.resolve(directory, media) : null;
|
||||
}
|
||||
|
||||
async function currentYoutubeMedia(client: GenerationMpvClient | null): Promise<string | null> {
|
||||
if (!client?.connected) return null;
|
||||
const media = await client.requestProperty('path');
|
||||
return typeof media === 'string' ? toYoutubeWatchUrl(media) : null;
|
||||
}
|
||||
|
||||
async function loadGeneratedSubtitles(client: GenerationMpvClient, outputPath: string) {
|
||||
const loaded = await client.request([
|
||||
'sub-add',
|
||||
@@ -136,6 +135,15 @@ export function createSubtitleGenerationRuntime(deps: SubtitleGenerationRuntimeD
|
||||
: '',
|
||||
};
|
||||
}
|
||||
// The YouTube page behind a resolved stream URL, or the media path itself.
|
||||
function youtubeSource(mediaPath: string | null | undefined): string | null | undefined {
|
||||
return (mediaPath && deps.resolveYoutubeSourceUrl?.(mediaPath)) || mediaPath;
|
||||
}
|
||||
async function currentYoutubeMedia(client: GenerationMpvClient | null): Promise<string | null> {
|
||||
if (!client?.connected) return null;
|
||||
const media = await client.requestProperty('path');
|
||||
return typeof media === 'string' ? toYoutubeWatchUrl(youtubeSource(media)) : null;
|
||||
}
|
||||
const report = (update: SubtitleGenerationProgress) => {
|
||||
progress = update;
|
||||
deps.onProgress(update);
|
||||
@@ -246,7 +254,7 @@ export function createSubtitleGenerationRuntime(deps: SubtitleGenerationRuntimeD
|
||||
/** Stops a YouTube job once its video is no longer playing, which also deletes its audio. */
|
||||
handleMediaPathChange(mediaPath: string | null | undefined): void {
|
||||
if (!youtubeJobUrl) return;
|
||||
if (extractYoutubeVideoId(mediaPath) !== extractYoutubeVideoId(youtubeJobUrl))
|
||||
if (extractYoutubeVideoId(youtubeSource(mediaPath)) !== extractYoutubeVideoId(youtubeJobUrl))
|
||||
controller?.abort();
|
||||
},
|
||||
async setVadEnabled(enabled: boolean): Promise<SubtitleGenerationStatus> {
|
||||
|
||||
@@ -298,3 +298,116 @@ test('prepare youtube playback accepts a fresh-start path change when the direct
|
||||
'replace',
|
||||
]);
|
||||
});
|
||||
|
||||
test('prepare youtube playback swaps a queued entry for its direct stream without clearing the playlist', async () => {
|
||||
const commands: Array<Array<string>> = [];
|
||||
const directUrl = 'https://rr16---sn.example.googlevideo.com/videoplayback?id=abc';
|
||||
const observedPaths = ['https://www.youtube.com/watch?v=queued2', directUrl];
|
||||
let requestCount = 0;
|
||||
const prepare = createPrepareYoutubePlaybackInMpvHandler({
|
||||
requestPath: async () => {
|
||||
const value = observedPaths[Math.min(requestCount, observedPaths.length - 1)] ?? null;
|
||||
requestCount += 1;
|
||||
return value;
|
||||
},
|
||||
requestProperty: async (name) => {
|
||||
if (name === 'playlist') {
|
||||
return [
|
||||
{ filename: 'https://www.youtube.com/watch?v=queued1' },
|
||||
{ filename: 'https://www.youtube.com/watch?v=queued2', current: true, playing: true },
|
||||
{ filename: 'https://www.youtube.com/watch?v=queued3' },
|
||||
];
|
||||
}
|
||||
if (name === 'track-list') return [{ type: 'video', id: 1 }];
|
||||
return null;
|
||||
},
|
||||
sendMpvCommand: (command) => commands.push(command),
|
||||
wait: createWaitStub(),
|
||||
});
|
||||
|
||||
const ok = await prepare({
|
||||
url: directUrl,
|
||||
sourceUrl: 'https://www.youtube.com/watch?v=queued2',
|
||||
timeoutMs: 1500,
|
||||
pollIntervalMs: 1,
|
||||
});
|
||||
|
||||
assert.equal(ok, true);
|
||||
assert.deepEqual(commands.slice(4), [
|
||||
['loadfile', directUrl, 'append'],
|
||||
['playlist-move', '3', '2'],
|
||||
['playlist-remove', '1'],
|
||||
]);
|
||||
});
|
||||
|
||||
test('prepare youtube playback replaces the playlist when the current entry is a different video', async () => {
|
||||
const commands: Array<Array<string>> = [];
|
||||
const directUrl = 'https://rr16---sn.example.googlevideo.com/videoplayback?id=abc';
|
||||
let nowTick = 0;
|
||||
const prepare = createPrepareYoutubePlaybackInMpvHandler({
|
||||
requestPath: async () => 'https://www.youtube.com/watch?v=other',
|
||||
requestProperty: async (name) => {
|
||||
if (name === 'playlist') {
|
||||
return [
|
||||
{ filename: 'https://www.youtube.com/watch?v=other', current: true, playing: true },
|
||||
];
|
||||
}
|
||||
return [];
|
||||
},
|
||||
sendMpvCommand: (command) => commands.push(command),
|
||||
wait: createWaitStub(),
|
||||
now: () => {
|
||||
nowTick += 100;
|
||||
return nowTick;
|
||||
},
|
||||
});
|
||||
|
||||
await prepare({
|
||||
url: directUrl,
|
||||
sourceUrl: 'https://www.youtube.com/watch?v=picked',
|
||||
timeoutMs: 200,
|
||||
pollIntervalMs: 1,
|
||||
});
|
||||
|
||||
assert.deepEqual(commands.slice(4), [['loadfile', directUrl, 'replace']]);
|
||||
});
|
||||
|
||||
test('prepare youtube playback does not touch the playlist when the playing entry is another video', async () => {
|
||||
const commands: Array<Array<string>> = [];
|
||||
const directUrl = 'https://rr16---sn.example.googlevideo.com/videoplayback?id=abc';
|
||||
let nowTick = 0;
|
||||
const prepare = createPrepareYoutubePlaybackInMpvHandler({
|
||||
// mpv's path still reports the queued video, but it is mid-advance: the selected entry moved
|
||||
// on and the playing entry is another queued video.
|
||||
requestPath: async () => 'https://www.youtube.com/watch?v=queued2',
|
||||
requestProperty: async (name) => {
|
||||
if (name === 'playlist') {
|
||||
return [
|
||||
{ filename: 'https://www.youtube.com/watch?v=queued1', playing: true },
|
||||
{ filename: 'https://www.youtube.com/watch?v=queued2', current: true },
|
||||
{ filename: 'https://www.youtube.com/watch?v=queued3' },
|
||||
];
|
||||
}
|
||||
return [];
|
||||
},
|
||||
sendMpvCommand: (command) => commands.push(command),
|
||||
wait: createWaitStub(),
|
||||
now: () => {
|
||||
nowTick += 100;
|
||||
return nowTick;
|
||||
},
|
||||
});
|
||||
|
||||
await prepare({
|
||||
url: directUrl,
|
||||
sourceUrl: 'https://www.youtube.com/watch?v=queued2',
|
||||
timeoutMs: 200,
|
||||
pollIntervalMs: 1,
|
||||
});
|
||||
|
||||
assert.equal(
|
||||
commands.some((command) => command[0] === 'playlist-remove'),
|
||||
false,
|
||||
);
|
||||
assert.deepEqual(commands.slice(4), [['loadfile', directUrl, 'replace']]);
|
||||
});
|
||||
@@ -2,6 +2,11 @@ import { isYoutubeMediaPath } from './youtube-playback';
|
||||
|
||||
type YoutubePlaybackLaunchInput = {
|
||||
url: string;
|
||||
/**
|
||||
* YouTube page URL `url` was resolved from (Windows loads a direct stream URL). Lets a playlist
|
||||
* entry for the same video be swapped in place instead of replacing the whole playlist.
|
||||
*/
|
||||
sourceUrl?: string;
|
||||
timeoutMs?: number;
|
||||
pollIntervalMs?: number;
|
||||
};
|
||||
@@ -81,6 +86,52 @@ function hasPlayableMediaTracks(trackListRaw: unknown): boolean {
|
||||
});
|
||||
}
|
||||
|
||||
/** Index of the entry mpv is actually playing, or null while it is between entries. */
|
||||
function findPlayingPlaylistEntry(playlist: unknown[]): { index: number; filename: string } | null {
|
||||
const index = playlist.findIndex(
|
||||
(entry) =>
|
||||
typeof entry === 'object' &&
|
||||
entry !== null &&
|
||||
(entry as Record<string, unknown>).playing === true,
|
||||
);
|
||||
if (index < 0) return null;
|
||||
const filename = (playlist[index] as Record<string, unknown>).filename;
|
||||
return typeof filename === 'string' ? { index, filename } : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Swaps mpv's playing playlist entry for `targetUrl` while keeping the rest of the playlist, e.g.
|
||||
* a queued YouTube watch URL replaced by its resolved direct stream on Windows. Uses only
|
||||
* long-standing playlist commands (no `loadfile insert-*`, which needs mpv 0.38+).
|
||||
* Returns false unless the playing entry is confirmed to be `sourceUrl`'s video, so the caller
|
||||
* falls back to `replace` instead of removing some other queued entry.
|
||||
*/
|
||||
async function swapCurrentPlaylistEntry(
|
||||
deps: YoutubePlaybackLaunchDeps,
|
||||
targetUrl: string,
|
||||
sourceUrl: string,
|
||||
): Promise<boolean> {
|
||||
if (!deps.requestProperty) return false;
|
||||
let playlist: unknown;
|
||||
try {
|
||||
// One snapshot so the position, count, and entry identity agree with each other.
|
||||
playlist = await deps.requestProperty('playlist');
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
if (!Array.isArray(playlist)) return false;
|
||||
const playing = findPlayingPlaylistEntry(playlist);
|
||||
if (!playing || !targetsSameYoutubeVideo(playing.filename, sourceUrl)) return false;
|
||||
|
||||
// The appended entry lands at index `count`; move it right after the playing entry, then remove
|
||||
// the playing entry so mpv advances onto it.
|
||||
const count = playlist.length;
|
||||
deps.sendMpvCommand(['loadfile', targetUrl, 'append']);
|
||||
deps.sendMpvCommand(['playlist-move', String(count), String(playing.index + 1)]);
|
||||
deps.sendMpvCommand(['playlist-remove', String(playing.index)]);
|
||||
return true;
|
||||
}
|
||||
|
||||
function sendPlaybackPrepCommands(sendMpvCommand: (command: Array<string>) => void): void {
|
||||
sendMpvCommand(['set_property', 'pause', 'yes']);
|
||||
sendMpvCommand(['set_property', 'sub-auto', 'no']);
|
||||
@@ -120,7 +171,14 @@ export function createPrepareYoutubePlaybackInMpvHandler(deps: YoutubePlaybackLa
|
||||
// Keep polling; mpv can report the target path before tracks are ready.
|
||||
}
|
||||
} else {
|
||||
deps.sendMpvCommand(['loadfile', targetUrl, 'replace']);
|
||||
const sourceUrl = input.sourceUrl?.trim() ?? '';
|
||||
const swapped =
|
||||
sourceUrl !== '' &&
|
||||
targetsSameYoutubeVideo(previousPath, sourceUrl) &&
|
||||
(await swapCurrentPlaylistEntry(deps, targetUrl, sourceUrl));
|
||||
if (!swapped) {
|
||||
deps.sendMpvCommand(['loadfile', targetUrl, 'replace']);
|
||||
}
|
||||
}
|
||||
|
||||
const deadline = now() + timeoutMs;
|
||||
|
||||
@@ -112,8 +112,8 @@ test('youtube playback runtime resolves the socket path lazily for windows start
|
||||
calls.push(`wait-connected:${timeoutMs}`);
|
||||
return true;
|
||||
},
|
||||
prepareYoutubePlaybackInMpv: async ({ url }) => {
|
||||
calls.push(`prepare:${url}`);
|
||||
prepareYoutubePlaybackInMpv: async ({ url, sourceUrl }) => {
|
||||
calls.push(`prepare:${url}:${sourceUrl}`);
|
||||
return true;
|
||||
},
|
||||
runYoutubePlaybackFlow: async ({ url }) => {
|
||||
@@ -143,6 +143,51 @@ test('youtube playback runtime resolves the socket path lazily for windows start
|
||||
});
|
||||
|
||||
assert.ok(calls.some((entry) => entry.includes('--input-ipc-server=/tmp/updated.sock')));
|
||||
// The page URL rides along so prepare can swap a queued entry for the direct stream in place.
|
||||
assert.ok(calls.includes('prepare:https://example.com/direct:https://youtu.be/demo'));
|
||||
});
|
||||
|
||||
test('youtube playback runtime maps resolved windows streams back to their page urls', async () => {
|
||||
const streamFor = (url: string) =>
|
||||
`https://rr1---sn.example.googlevideo.com/videoplayback?src=${encodeURIComponent(url)}`;
|
||||
const firstUrl = 'https://www.youtube.com/watch?v=abcdefghijk';
|
||||
const secondUrl = 'https://www.youtube.com/watch?v=bcdefghijkl';
|
||||
const runtime = createYoutubePlaybackRuntime({
|
||||
platform: 'win32',
|
||||
directPlaybackFormat: 'b',
|
||||
mpvYtdlFormat: 'bestvideo+bestaudio',
|
||||
autoLaunchTimeoutMs: 2_000,
|
||||
connectTimeoutMs: 1_000,
|
||||
getSocketPath: () => '/tmp/mpv.sock',
|
||||
getMpvConnected: () => true,
|
||||
invalidatePendingAutoplayReadyFallbacks: () => {},
|
||||
setAppOwnedFlowInFlight: () => {},
|
||||
ensureYoutubePlaybackRuntimeReady: async () => {},
|
||||
resolveYoutubePlaybackUrl: async (url) => streamFor(url),
|
||||
launchWindowsMpv: async () => ({ ok: false }),
|
||||
waitForYoutubeMpvConnected: async () => true,
|
||||
// The second video never loads, so the first stream keeps playing.
|
||||
prepareYoutubePlaybackInMpv: async ({ url }) => url === streamFor(firstUrl),
|
||||
runYoutubePlaybackFlow: async () => {},
|
||||
logInfo: () => {},
|
||||
logWarn: () => {},
|
||||
schedule: () => 1 as never,
|
||||
clearScheduled: () => {},
|
||||
});
|
||||
|
||||
assert.equal(runtime.getYoutubeSourceUrlForStream(streamFor(firstUrl)), null);
|
||||
await runtime.runYoutubePlaybackFlow({ url: firstUrl, source: 'second-instance' });
|
||||
await runtime
|
||||
.runYoutubePlaybackFlow({ url: secondUrl, source: 'second-instance' })
|
||||
.catch(() => {});
|
||||
|
||||
assert.equal(runtime.getYoutubeSourceUrlForStream(streamFor(firstUrl)), firstUrl);
|
||||
assert.equal(runtime.getYoutubeSourceUrlForStream(streamFor(secondUrl)), secondUrl);
|
||||
assert.equal(
|
||||
runtime.getYoutubeSourceUrlForStream('https://rr2---sn.example.googlevideo.com/other'),
|
||||
null,
|
||||
);
|
||||
assert.equal(runtime.getYoutubeSourceUrlForStream('/video/episode.mkv'), null);
|
||||
});
|
||||
|
||||
test('youtube playback runtime starts media cache without blocking the subtitle flow', async () => {
|
||||
|
||||
@@ -22,7 +22,7 @@ export type YoutubePlaybackRuntimeDeps = {
|
||||
resolveYoutubePlaybackUrl: (url: string, format: string) => Promise<string>;
|
||||
launchWindowsMpv: (playbackUrl: string, args: string[]) => Promise<LaunchResult>;
|
||||
waitForYoutubeMpvConnected: (timeoutMs: number) => Promise<boolean>;
|
||||
prepareYoutubePlaybackInMpv: (request: { url: string }) => Promise<boolean>;
|
||||
prepareYoutubePlaybackInMpv: (request: { url: string; sourceUrl: string }) => Promise<boolean>;
|
||||
startYoutubeMediaCache?: (url: string) => void | Promise<void>;
|
||||
runYoutubePlaybackFlow: (request: { url: string }) => Promise<void>;
|
||||
logInfo: (message: string) => void;
|
||||
@@ -35,6 +35,10 @@ export function createYoutubePlaybackRuntime(deps: YoutubePlaybackRuntimeDeps) {
|
||||
let quitOnDisconnectArmed = false;
|
||||
let quitOnDisconnectArmTimer: ReturnType<typeof setTimeout> | null = null;
|
||||
let playbackFlowGeneration = 0;
|
||||
// Windows mpv plays resolved stream URLs, so remember which YouTube page each came from. Kept for
|
||||
// every resolved stream: a later failed load must not orphan the stream still playing, and mpv
|
||||
// can return to an earlier swapped-in playlist entry.
|
||||
const directPlaybackSources = new Map<string, string>();
|
||||
|
||||
const clearYoutubePlayQuitOnDisconnectArmTimer = (): void => {
|
||||
if (quitOnDisconnectArmTimer) {
|
||||
@@ -65,6 +69,7 @@ export function createYoutubePlaybackRuntime(deps: YoutubePlaybackRuntimeDeps) {
|
||||
request.url,
|
||||
deps.directPlaybackFormat,
|
||||
);
|
||||
directPlaybackSources.set(playbackUrl, request.url);
|
||||
deps.logInfo('Resolved direct YouTube playback URL for Windows MPV startup.');
|
||||
} catch (error) {
|
||||
deps.logWarn(
|
||||
@@ -122,7 +127,10 @@ export function createYoutubePlaybackRuntime(deps: YoutubePlaybackRuntimeDeps) {
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
const mediaReady = await deps.prepareYoutubePlaybackInMpv({ url: playbackUrl });
|
||||
const mediaReady = await deps.prepareYoutubePlaybackInMpv({
|
||||
url: playbackUrl,
|
||||
sourceUrl: request.url,
|
||||
});
|
||||
if (!mediaReady) {
|
||||
throw new Error('Timed out waiting for mpv to load the requested YouTube URL.');
|
||||
}
|
||||
@@ -156,5 +164,8 @@ export function createYoutubePlaybackRuntime(deps: YoutubePlaybackRuntimeDeps) {
|
||||
clearYoutubePlayQuitOnDisconnectArmTimer,
|
||||
getQuitOnDisconnectArmed: (): boolean => quitOnDisconnectArmed,
|
||||
runYoutubePlaybackFlow,
|
||||
/** YouTube page URL for a stream URL this runtime resolved for Windows playback, else null. */
|
||||
getYoutubeSourceUrlForStream: (mediaPath: string | null | undefined): string | null =>
|
||||
directPlaybackSources.get(mediaPath?.trim() ?? '') ?? null,
|
||||
};
|
||||
}
|
||||
@@ -196,7 +196,7 @@ for (const mode of ['session', 'day', 'anime', 'failed'] as const) {
|
||||
});
|
||||
}
|
||||
|
||||
for (const failedRead of ['overview', 'sessions'] as const) {
|
||||
for (const failedRead of ['overview', 'sessions', 'calendar'] as const) {
|
||||
test(`Overview stays available during a failed ${failedRead} refresh and can retry`, async () => {
|
||||
const uninstallDom = installDom();
|
||||
const original = { ...apiClient };
|
||||
@@ -216,7 +216,10 @@ for (const failedRead of ['overview', 'sessions'] as const) {
|
||||
if (refreshing && failRefresh && failedRead === 'sessions') return pendingRefresh;
|
||||
return sessions;
|
||||
};
|
||||
apiClient.getStreakCalendar = async () => [];
|
||||
apiClient.getStreakCalendar = async () => {
|
||||
if (refreshing && failRefresh && failedRead === 'calendar') return pendingRefresh;
|
||||
return [];
|
||||
};
|
||||
apiClient.getKnownWordsSummary = async () => ({
|
||||
totalUniqueWords: 0,
|
||||
knownWordCount: 0,
|
||||
@@ -225,6 +228,8 @@ for (const failedRead of ['overview', 'sessions'] as const) {
|
||||
sessions = [];
|
||||
refreshing = true;
|
||||
};
|
||||
// A calendar-only failure still lets the overview totals refresh.
|
||||
const staleCards = failedRead === 'calendar' ? '0' : '2';
|
||||
const container = document.createElement('div');
|
||||
document.body.append(container);
|
||||
const root = createRoot(container);
|
||||
@@ -240,12 +245,12 @@ for (const failedRead of ['overview', 'sessions'] as const) {
|
||||
assert.ok(deleteButton);
|
||||
await act(async () => deleteButton.click());
|
||||
assert.match(container.textContent ?? '', /Tracking Snapshot/);
|
||||
assert.equal(metric(container, 'Cards Mined Today'), '2');
|
||||
assert.equal(metric(container, 'Cards Mined Today'), staleCards);
|
||||
assert.match(container.textContent ?? '', /No sessions yet/);
|
||||
|
||||
await act(async () => rejectRefresh(new Error(`${failedRead} unavailable`)));
|
||||
assert.match(container.textContent ?? '', /Tracking Snapshot/);
|
||||
assert.equal(metric(container, 'Cards Mined Today'), '2');
|
||||
assert.equal(metric(container, 'Cards Mined Today'), staleCards);
|
||||
assert.match(container.querySelector('[role="alert"]')?.textContent ?? '', /unavailable/);
|
||||
|
||||
const retryButton = [...container.querySelectorAll('button')].find(
|
||||
|
||||
@@ -29,7 +29,7 @@ export function OverviewTab({
|
||||
}: OverviewTabProps) {
|
||||
const [refreshKey, setRefreshKey] = useState(0);
|
||||
const { data, sessions, setSessions, loading, error } = useOverview(refreshKey);
|
||||
const { calendar, loading: calLoading } = useStreakCalendar(90, refreshKey);
|
||||
const { calendar, loading: calLoading, error: calendarError } = useStreakCalendar(90, refreshKey);
|
||||
const [deleteError, setDeleteError] = useState<string | null>(null);
|
||||
const [deletingIds, setDeletingIds] = useState<Set<number>>(new Set());
|
||||
const [knownWordsSummary, setKnownWordsSummary] = useState<{
|
||||
@@ -123,16 +123,19 @@ export function OverviewTab({
|
||||
}
|
||||
};
|
||||
|
||||
const errorNotice = error ? (
|
||||
const refreshError = error ?? calendarError;
|
||||
const errorNotice = refreshError ? (
|
||||
<div
|
||||
role="alert"
|
||||
className="flex items-center justify-between gap-3 rounded-lg border border-ctp-red/30 bg-ctp-red/10 p-3 text-sm text-ctp-red"
|
||||
>
|
||||
<span>
|
||||
{data
|
||||
? 'Could not refresh Overview. Displayed totals may be out of date.'
|
||||
: 'Could not load Overview.'}{' '}
|
||||
{error}
|
||||
{!data
|
||||
? 'Could not load Overview.'
|
||||
: error
|
||||
? 'Could not refresh Overview. Displayed totals may be out of date.'
|
||||
: 'Could not refresh the activity calendar. It may be out of date.'}{' '}
|
||||
{refreshError}
|
||||
</span>
|
||||
<button
|
||||
type="button"
|
||||
|
||||
Reference in new issue
Block a user