From 4b10e8505342e16f0c0e246982167bec379b5b65 Mon Sep 17 00:00:00 2001 From: sudacode Date: Sun, 28 Jun 2026 23:03:18 -0700 Subject: [PATCH] chore(release): prepare v0.17.2 --- CHANGELOG.md | 6 ++++++ ...-29-youtube-picker-opening-notification.md | 4 ---- .../youtube-background-cache-direct-mpv.md | 4 ---- docs-site/changelog.md | 6 ++++++ package.json | 2 +- release/release-notes.md | 21 +++++++------------ scripts/build-changelog.ts | 8 ++----- src/anki-integration/note-field-utils.ts | 5 ++++- src/main/runtime/youtube-playback-runtime.ts | 15 +++++++------ 9 files changed, 33 insertions(+), 38 deletions(-) delete mode 100644 changes/2026-06-29-youtube-picker-opening-notification.md delete mode 100644 changes/youtube-background-cache-direct-mpv.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f2226ae..3f6c76be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v0.17.2 (2026-06-28) + +### Fixed +- YouTube Background Cache: Fixed Windows YouTube background media cache startup for YouTube URLs opened directly in mpv, including resolved stream URLs when mpv still exposes the original YouTube playlist entry, so queued Anki media updates can append audio and images after the cache finishes. +- YouTube Subtitle Picker: Manual subtitle picker requests now show an immediate configured notification while SubMiner probes tracks and opens the modal. Subtitle download progress is replaced with a transient success notification after tracks load. + ## v0.17.1 (2026-06-27) ### Added diff --git a/changes/2026-06-29-youtube-picker-opening-notification.md b/changes/2026-06-29-youtube-picker-opening-notification.md deleted file mode 100644 index df194abb..00000000 --- a/changes/2026-06-29-youtube-picker-opening-notification.md +++ /dev/null @@ -1,4 +0,0 @@ -type: fixed -area: youtube - -- Manual YouTube subtitle picker requests now show an immediate configured notification while SubMiner probes tracks and opens the modal, then replace subtitle download progress with a transient success notification after tracks load. diff --git a/changes/youtube-background-cache-direct-mpv.md b/changes/youtube-background-cache-direct-mpv.md deleted file mode 100644 index 22329e8c..00000000 --- a/changes/youtube-background-cache-direct-mpv.md +++ /dev/null @@ -1,4 +0,0 @@ -type: fixed -area: youtube - -- Fixed Windows YouTube background media cache startup for YouTube URLs opened directly in mpv, including resolved stream URLs when mpv still exposes the original YouTube playlist entry, so queued Anki media updates can append audio and images after the cache finishes. diff --git a/docs-site/changelog.md b/docs-site/changelog.md index 67fd1b0b..ac57ce65 100644 --- a/docs-site/changelog.md +++ b/docs-site/changelog.md @@ -1,5 +1,11 @@ # Changelog +## v0.17.2 (2026-06-28) + +**Fixed** +- YouTube Background Cache: Fixed Windows YouTube background media cache startup for YouTube URLs opened directly in mpv, including resolved stream URLs when mpv still exposes the original YouTube playlist entry, so queued Anki media updates can append audio and images after the cache finishes. +- YouTube Subtitle Picker: Manual subtitle picker requests now show an immediate configured notification while SubMiner probes tracks and opens the modal. Subtitle download progress is replaced with a transient success notification after tracks load. + ## v0.17.1 (2026-06-27) **Added** diff --git a/package.json b/package.json index e0b3f264..9a5e821b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "subminer", "productName": "SubMiner", "desktopName": "SubMiner.desktop", - "version": "0.17.1", + "version": "0.17.2", "description": "All-in-one sentence mining overlay with AnkiConnect and dictionary integration", "packageManager": "bun@1.3.5", "main": "dist/main-entry.js", diff --git a/release/release-notes.md b/release/release-notes.md index 987ce7d2..9a568127 100644 --- a/release/release-notes.md +++ b/release/release-notes.md @@ -1,25 +1,18 @@ ## Highlights -### Added - -- **YouTube Media Cache Mode:** New `youtube.mediaCache.mode` setting lets you choose between `direct` (the existing behavior) and `background` modes for extracting audio and images when creating cards from YouTube videos. - - Background mode uses a separate yt-dlp download to cache the video file locally, which can rescue media extraction when direct stream URLs are unreliable or expire quickly. - - While the cache downloads, SubMiner creates a text-only card immediately, then fills in audio and image once the file is ready — no need to re-mine the sentence. - - Cache downloads are capped at 720p by default (`youtube.mediaCache.maxHeight`) to keep file sizes reasonable. ### Fixed -- **Log Export:** Log filenames now use your local date, so exporting logs around UTC midnight correctly captures today's file instead of yesterday's. - - Log exports also now redact a broader set of sensitive data — IP addresses, email addresses, auth and cookie headers, yt-dlp cookie arguments, URL credentials, API keys, and signed YouTube media URLs. +- **YouTube Background Cache:** Fixed Windows background media cache startup for YouTube URLs opened directly in mpv. + - Resolved stream URLs are now tracked even when mpv still exposes the original YouTube playlist entry. + - Queued Anki media updates can append audio and images after the cache finishes instead of staying text-only. -- **YouTube Card Media Generation:** Extraction is more reliable and resilient across a wider range of stream conditions. - - Stale or cached stream maps are skipped automatically, and ffmpeg requests use safer options for resolved streams to reduce failures. - - Background cache downloads retry on network issues (IPv4 and extractor fallbacks), notify you on failure instead of silently hanging, and clean up stale cache files on startup and before each new download. - - Switching back to direct mode now cancels any in-progress background downloads cleanly. +- **YouTube Subtitle Picker Notifications:** Manual subtitle picker requests now show immediate status while SubMiner probes tracks and opens the modal. + - Subtitle download progress is replaced with a transient success notification after tracks load. ## What's Changed -- feat(youtube): add mediaCache mode and safer stream media extraction by @ksyasuda in #130 -- fix(logs): use local date for log filenames and expand export redaction by @ksyasuda in #131 +- feat(youtube): notify on manual picker open and show success after track load by @ksyasuda in #133 +- fix(youtube): recover source URL for background media cache on direct mpv open by @ksyasuda in #132 ## Installation diff --git a/scripts/build-changelog.ts b/scripts/build-changelog.ts index 226c988c..1194a97d 100644 --- a/scripts/build-changelog.ts +++ b/scripts/build-changelog.ts @@ -108,15 +108,11 @@ function renderPrereleaseBaseVersionMarker(version: string): string { } function extractPrereleaseBaseVersionMarker(notes: string): string | null { - return ( - //u.exec(notes)?.[1] ?? null - ); + return //u.exec(notes)?.[1] ?? null; } function stripPrereleaseMetadata(notes: string): string { - return notes - .replace(/\s*/u, '') - .trim(); + return notes.replace(/\s*/u, '').trim(); } function resolveReusablePrereleaseNotes(notes: string, version: string): string | undefined { diff --git a/src/anki-integration/note-field-utils.ts b/src/anki-integration/note-field-utils.ts index b3370825..18c81ead 100644 --- a/src/anki-integration/note-field-utils.ts +++ b/src/anki-integration/note-field-utils.ts @@ -2,7 +2,10 @@ export interface NoteFieldValueInfo { fields: Record; } -export function getNoteFieldValue(noteInfo: NoteFieldValueInfo, preferredName: string): string | null { +export function getNoteFieldValue( + noteInfo: NoteFieldValueInfo, + preferredName: string, +): string | null { const resolvedFieldName = Object.keys(noteInfo.fields).find( (fieldName) => fieldName.toLowerCase() === preferredName.toLowerCase(), ); diff --git a/src/main/runtime/youtube-playback-runtime.ts b/src/main/runtime/youtube-playback-runtime.ts index 61e04aff..22ef5533 100644 --- a/src/main/runtime/youtube-playback-runtime.ts +++ b/src/main/runtime/youtube-playback-runtime.ts @@ -130,14 +130,13 @@ export function createYoutubePlaybackRuntime(deps: YoutubePlaybackRuntimeDeps) { if (deps.startYoutubeMediaCache) { void new Promise((resolve) => { resolve(deps.startYoutubeMediaCache?.(request.url)); - }) - .catch((error) => { - deps.logWarn( - `Failed to start YouTube media cache: ${ - error instanceof Error ? error.message : String(error) - }`, - ); - }); + }).catch((error) => { + deps.logWarn( + `Failed to start YouTube media cache: ${ + error instanceof Error ? error.message : String(error) + }`, + ); + }); } await deps.runYoutubePlaybackFlow({