mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-10-21 05:01:26 -07:00
Compare commits
54
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4209134399
|
||
|
|
2c89bc1754
|
||
|
|
625f1ad238
|
||
|
|
d1aa279830
|
||
|
|
ca40cd6267
|
||
|
|
93fb4eff3a
|
||
|
|
01fcacb6cf
|
||
|
|
cd7a65ec80
|
||
|
|
89479f7045
|
||
|
|
7bc9a07a52
|
||
|
|
68dd789fbf
|
||
|
|
516fadd530
|
||
|
|
18beac13f4
|
||
|
|
484a9e047d
|
||
|
|
0d66747f2e
|
||
|
|
b01f0bcb4f
|
||
|
|
9a1b6e650f
|
||
|
|
835a09fa67
|
||
|
|
2bcb6c7e98
|
||
|
|
1d1575f414
|
||
|
|
f6993ae507
|
||
|
|
4300517da7
|
||
|
|
877f350353
|
||
|
|
7a1450ddb7
|
||
|
|
cc43d3007a
|
||
|
|
333ee5eea4
|
||
|
|
935e4c145f
|
||
|
|
183560d2c3
|
||
|
|
3ca7dcd664
|
||
|
|
51fc9034f7
|
||
|
|
8c22567da9
|
||
|
|
b22001f68e
|
||
|
|
8d55d64ee0
|
||
|
|
3dd0750b98
|
||
|
|
8aff2ae505
|
||
|
|
289c74da35
|
||
|
|
f5369b8b24
|
||
|
|
c94830531c
|
||
|
|
035ff8e7bf
|
||
|
|
4abbe8d567
|
||
|
|
feb8d5a55c
|
||
|
|
d1d128b3f2
|
||
|
|
2fbf27faff
|
||
|
|
2e54a3ac16
|
||
|
|
891c4a13d5
|
||
|
|
4739c3da78
|
||
|
|
ec66f59257
|
||
|
|
ec9da6bed3
|
||
|
|
7643855e61
|
||
|
|
f8a8235b7d
|
||
|
|
7220f6fc9b
|
||
|
|
c201520da3
|
||
|
|
a612d44535
|
||
|
|
ec48f90cd4
|
No files matched your search
@@ -27,7 +27,6 @@ Do not use hidden wrapper commands. Verification commands are owned by `package.
|
|||||||
- Launcher or mpv plugin: `bun run test:launcher` or `bun run test:env`, based on the behavior changed
|
- Launcher or mpv plugin: `bun run test:launcher` or `bun run test:env`, based on the behavior changed
|
||||||
- Runtime compatibility or dist-sensitive wiring: `bun run test:runtime:compat`
|
- Runtime compatibility or dist-sensitive wiring: `bun run test:runtime:compat`
|
||||||
- Stats dashboard: `bun run test:stats`
|
- Stats dashboard: `bun run test:stats`
|
||||||
- Overlay, renderer, mpv, or mining behavior in the running app: `bun run build`, then `bun run test:e2e`
|
|
||||||
- Build/release scripts: `bun run test:scripts`
|
- Build/release scripts: `bun run test:scripts`
|
||||||
|
|
||||||
For substantial changes, use the full gate documented in `AGENTS.md` and `docs/workflow/verification.md`.
|
For substantial changes, use the full gate documented in `AGENTS.md` and `docs/workflow/verification.md`.
|
||||||
|
|||||||
@@ -9,79 +9,3 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build-test-audit:
|
build-test-audit:
|
||||||
uses: ./.github/workflows/quality-gate.yml
|
uses: ./.github/workflows/quality-gate.yml
|
||||||
|
|
||||||
# Boots the built app with a real mpv on each platform. Kept outside the
|
|
||||||
# reusable quality gate so releases do not depend on it while the lane is new.
|
|
||||||
e2e:
|
|
||||||
name: E2E (${{ matrix.os }})
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
timeout-minutes: 30
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
SUBMINER_E2E_KEEP: '1'
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: Setup Bun
|
|
||||||
uses: oven-sh/setup-bun@v2
|
|
||||||
with:
|
|
||||||
bun-version: 1.3.5
|
|
||||||
|
|
||||||
- name: Point temp files at an uploadable directory
|
|
||||||
run: |
|
|
||||||
# os.tmpdir() follows these, so the kept session logs land under runner.temp.
|
|
||||||
dir="$RUNNER_TEMP/e2e"
|
|
||||||
mkdir -p "$dir"
|
|
||||||
{ echo "TMPDIR=$dir"; echo "TEMP=$dir"; echo "TMP=$dir"; } >> "$GITHUB_ENV"
|
|
||||||
|
|
||||||
- name: Install mpv and ffmpeg (Linux)
|
|
||||||
if: runner.os == 'Linux'
|
|
||||||
run: |
|
|
||||||
# Only Ubuntu sources are needed; unrelated runner repositories can be unavailable.
|
|
||||||
apt_sources=(-o Dir::Etc::sourcelist=sources.list.d/ubuntu.sources -o Dir::Etc::sourceparts=-)
|
|
||||||
sudo apt-get "${apt_sources[@]}" update
|
|
||||||
sudo apt-get "${apt_sources[@]}" install -y mpv ffmpeg xvfb
|
|
||||||
|
|
||||||
- name: Install mpv and ffmpeg (macOS)
|
|
||||||
if: runner.os == 'macOS'
|
|
||||||
run: brew install mpv ffmpeg
|
|
||||||
|
|
||||||
- name: Install mpv and ffmpeg (Windows)
|
|
||||||
if: runner.os == 'Windows'
|
|
||||||
run: |
|
|
||||||
choco install mpv ffmpeg -y --no-progress
|
|
||||||
# The mpv package adds no shim, so put its directory on PATH for later steps.
|
|
||||||
mpv_exe="$(find /c/ProgramData/chocolatey/lib /c/ProgramData/chocolatey/bin "/c/Program Files" /c/tools -maxdepth 6 -iname mpv.exe 2>/dev/null | head -n 1)"
|
|
||||||
test -n "$mpv_exe"
|
|
||||||
cygpath -w "$(dirname "$mpv_exe")" >> "$GITHUB_PATH"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
bun install --frozen-lockfile
|
|
||||||
cd stats && bun install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: bun run build
|
|
||||||
|
|
||||||
- name: End-to-end suite
|
|
||||||
run: bun run test:e2e
|
|
||||||
|
|
||||||
- name: Upload session logs (on failure)
|
|
||||||
if: failure()
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: e2e-logs-${{ matrix.os }}
|
|
||||||
path: ${{ runner.temp }}/e2e/subminer-e2e-*/*.log
|
|
||||||
if-no-files-found: ignore
|
|
||||||
@@ -2,11 +2,6 @@ name: Docs Pages
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
|
||||||
rebuild_archives:
|
|
||||||
description: 'Stable tags to rebuild in R2 (comma-separated, or "all"); archives are otherwise built once'
|
|
||||||
required: false
|
|
||||||
default: ''
|
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
@@ -15,8 +10,6 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- 'docs-site/**'
|
- 'docs-site/**'
|
||||||
- 'scripts/docs-versioning.ts'
|
- 'scripts/docs-versioning.ts'
|
||||||
- 'scripts/docs-versioned-assets.ts'
|
|
||||||
- 'scripts/docs-archive-store.ts'
|
|
||||||
- 'scripts/build-versioned-docs.ts'
|
- 'scripts/build-versioned-docs.ts'
|
||||||
- '.github/workflows/docs-pages.yml'
|
- '.github/workflows/docs-pages.yml'
|
||||||
- 'package.json'
|
- 'package.json'
|
||||||
@@ -61,21 +54,20 @@ jobs:
|
|||||||
bun install --frozen-lockfile
|
bun install --frozen-lockfile
|
||||||
cd docs-site && bun install --frozen-lockfile
|
cd docs-site && bun install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Cache versioned docs archives
|
||||||
|
if: steps.tag_guard.outputs.stable_tag != 'false'
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: .tmp/docs-versioned-archive-cache
|
||||||
|
key: docs-versioned-archives-${{ runner.os }}-${{ hashFiles('docs-site/.vitepress/**', 'docs-site/public/assets/fonts/**', 'docs-site/package.json', 'docs-site/bun.lock', 'scripts/build-versioned-docs.ts', 'scripts/docs-versioning.ts') }}
|
||||||
|
|
||||||
- name: Test docs
|
- name: Test docs
|
||||||
if: steps.tag_guard.outputs.stable_tag != 'false'
|
if: steps.tag_guard.outputs.stable_tag != 'false'
|
||||||
run: bun run docs:test
|
run: bun run docs:test
|
||||||
|
|
||||||
# Builds only archives missing from R2 (plus any requested rebuilds), then the
|
|
||||||
# root and /main/ builds that make up the Pages deployment.
|
|
||||||
- name: Build versioned docs
|
- name: Build versioned docs
|
||||||
if: steps.tag_guard.outputs.stable_tag != 'false'
|
if: steps.tag_guard.outputs.stable_tag != 'false'
|
||||||
env:
|
run: bun run docs:build:versioned
|
||||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
||||||
DOCS_ARCHIVE_R2_ACCESS_KEY_ID: ${{ secrets.DOCS_ARCHIVE_R2_ACCESS_KEY_ID }}
|
|
||||||
DOCS_ARCHIVE_R2_SECRET_ACCESS_KEY: ${{ secrets.DOCS_ARCHIVE_R2_SECRET_ACCESS_KEY }}
|
|
||||||
DOCS_ARCHIVE_R2_BUCKET: ${{ vars.DOCS_ARCHIVE_R2_BUCKET }}
|
|
||||||
REBUILD_ARCHIVES: ${{ inputs.rebuild_archives }}
|
|
||||||
run: bun run scripts/build-versioned-docs.ts --require-archives "--rebuild-archives=${REBUILD_ARCHIVES}"
|
|
||||||
|
|
||||||
- name: Deploy docs to Cloudflare Pages
|
- name: Deploy docs to Cloudflare Pages
|
||||||
if: steps.tag_guard.outputs.stable_tag != 'false'
|
if: steps.tag_guard.outputs.stable_tag != 'false'
|
||||||
@@ -83,6 +75,4 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
# Run from docs-site so Wrangler bundles docs-site/functions (the /v/* archive server).
|
command: pages deploy .tmp/docs-versioned-site --project-name "${{ vars.CLOUDFLARE_PAGES_PROJECT_NAME }}" --branch main
|
||||||
workingDirectory: docs-site
|
|
||||||
command: pages deploy ../.tmp/docs-versioned-site --project-name "${{ vars.CLOUDFLARE_PAGES_PROJECT_NAME }}" --branch main
|
|
||||||
@@ -59,6 +59,17 @@ jobs:
|
|||||||
bun install --frozen-lockfile
|
bun install --frozen-lockfile
|
||||||
bun run build
|
bun run build
|
||||||
|
|
||||||
|
- name: Download previous package size reports
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
mkdir -p .tmp/package-baseline
|
||||||
|
previous=$(gh api "repos/$GITHUB_REPOSITORY/releases" --jq '[.[] | select(.draft == false and .tag_name != env.GITHUB_REF_NAME)] | sort_by(.published_at) | last | .tag_name // empty')
|
||||||
|
if [ -n "$previous" ]; then
|
||||||
|
gh release download "$previous" --pattern 'package-size-*.json' --dir .tmp/package-baseline || echo 'Previous release has no package size reports; size comparison will be skipped.'
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Build AppImage
|
- name: Build AppImage
|
||||||
run: bun run build:appimage
|
run: bun run build:appimage
|
||||||
env:
|
env:
|
||||||
@@ -87,6 +98,7 @@ jobs:
|
|||||||
release/*.AppImage
|
release/*.AppImage
|
||||||
release/latest*.yml
|
release/latest*.yml
|
||||||
release/*.blockmap
|
release/*.blockmap
|
||||||
|
release/package-size-*.json
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
build-macos:
|
build-macos:
|
||||||
@@ -147,6 +159,17 @@ jobs:
|
|||||||
bun install --frozen-lockfile
|
bun install --frozen-lockfile
|
||||||
bun run build
|
bun run build
|
||||||
|
|
||||||
|
- name: Download previous package size reports
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
mkdir -p .tmp/package-baseline
|
||||||
|
previous=$(gh api "repos/$GITHUB_REPOSITORY/releases" --jq '[.[] | select(.draft == false and .tag_name != env.GITHUB_REF_NAME)] | sort_by(.published_at) | last | .tag_name // empty')
|
||||||
|
if [ -n "$previous" ]; then
|
||||||
|
gh release download "$previous" --pattern 'package-size-*.json' --dir .tmp/package-baseline || echo 'Previous release has no package size reports; size comparison will be skipped.'
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Build signed + notarized macOS artifacts
|
- name: Build signed + notarized macOS artifacts
|
||||||
run: bun run build:mac
|
run: bun run build:mac
|
||||||
env:
|
env:
|
||||||
@@ -170,6 +193,7 @@ jobs:
|
|||||||
release/*.zip
|
release/*.zip
|
||||||
release/latest*.yml
|
release/latest*.yml
|
||||||
release/*.blockmap
|
release/*.blockmap
|
||||||
|
release/package-size-*.json
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
@@ -211,6 +235,17 @@ jobs:
|
|||||||
bun install --frozen-lockfile
|
bun install --frozen-lockfile
|
||||||
bun run build
|
bun run build
|
||||||
|
|
||||||
|
- name: Download previous package size reports
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
mkdir -p .tmp/package-baseline
|
||||||
|
previous=$(gh api "repos/$GITHUB_REPOSITORY/releases" --jq '[.[] | select(.draft == false and .tag_name != env.GITHUB_REF_NAME)] | sort_by(.published_at) | last | .tag_name // empty')
|
||||||
|
if [ -n "$previous" ]; then
|
||||||
|
gh release download "$previous" --pattern 'package-size-*.json' --dir .tmp/package-baseline || echo 'Previous release has no package size reports; size comparison will be skipped.'
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Verify managed Windows launcher
|
- name: Verify managed Windows launcher
|
||||||
run: bun test src/main/runtime/managed-launcher.test.ts
|
run: bun test src/main/runtime/managed-launcher.test.ts
|
||||||
|
|
||||||
@@ -235,4 +270,5 @@ jobs:
|
|||||||
release/*.zip
|
release/*.zip
|
||||||
release/latest*.yml
|
release/latest*.yml
|
||||||
release/*.blockmap
|
release/*.blockmap
|
||||||
|
release/package-size-*.json
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
@@ -105,6 +105,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
files=(release/*.AppImage release/*.dmg release/*.exe release/*.zip release/*.tar.gz release/latest*.yml release/*.blockmap dist/launcher/subminer dist/launcher/subminer.cmd)
|
files=(release/*.AppImage release/*.dmg release/*.exe release/*.zip release/*.tar.gz release/latest*.yml release/*.blockmap dist/launcher/subminer dist/launcher/subminer.cmd)
|
||||||
|
files+=(release/package-size-*.json)
|
||||||
if [ "${#files[@]}" -eq 0 ]; then
|
if [ "${#files[@]}" -eq 0 ]; then
|
||||||
echo "No release artifacts found for checksum generation."
|
echo "No release artifacts found for checksum generation."
|
||||||
exit 1
|
exit 1
|
||||||
@@ -151,6 +152,7 @@ jobs:
|
|||||||
release/latest*.yml
|
release/latest*.yml
|
||||||
release/*.blockmap
|
release/*.blockmap
|
||||||
release/SHA256SUMS.txt
|
release/SHA256SUMS.txt
|
||||||
|
release/package-size-*.json
|
||||||
dist/launcher/subminer
|
dist/launcher/subminer
|
||||||
dist/launcher/subminer.cmd
|
dist/launcher/subminer.cmd
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -29,9 +29,6 @@ jobs:
|
|||||||
- name: Verify Windows launcher bootstrap
|
- name: Verify Windows launcher bootstrap
|
||||||
run: bun test src/main/runtime/windows-launcher-bootstrap.test.ts
|
run: bun test src/main/runtime/windows-launcher-bootstrap.test.ts
|
||||||
|
|
||||||
- name: Verify native mpv process launch
|
|
||||||
run: bun test src/main/runtime/mpv-process.test.ts
|
|
||||||
|
|
||||||
- name: Verify POSIX launcher bootstrap
|
- name: Verify POSIX launcher bootstrap
|
||||||
run: bun test src/main/runtime/posix-launcher-bootstrap.test.ts
|
run: bun test src/main/runtime/posix-launcher-bootstrap.test.ts
|
||||||
|
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
files=(release/*.AppImage release/*.dmg release/*.exe release/*.zip release/*.tar.gz release/latest*.yml release/*.blockmap dist/launcher/subminer dist/launcher/subminer.cmd)
|
files=(release/*.AppImage release/*.dmg release/*.exe release/*.zip release/*.tar.gz release/latest*.yml release/*.blockmap dist/launcher/subminer dist/launcher/subminer.cmd)
|
||||||
|
files+=(release/package-size-*.json)
|
||||||
if [ "${#files[@]}" -eq 0 ]; then
|
if [ "${#files[@]}" -eq 0 ]; then
|
||||||
echo "No release artifacts found for checksum generation."
|
echo "No release artifacts found for checksum generation."
|
||||||
exit 1
|
exit 1
|
||||||
@@ -170,6 +171,7 @@ jobs:
|
|||||||
release/latest*.yml
|
release/latest*.yml
|
||||||
release/*.blockmap
|
release/*.blockmap
|
||||||
release/SHA256SUMS.txt
|
release/SHA256SUMS.txt
|
||||||
|
release/package-size-*.json
|
||||||
dist/launcher/subminer
|
dist/launcher/subminer
|
||||||
dist/launcher/subminer.cmd
|
dist/launcher/subminer.cmd
|
||||||
)
|
)
|
||||||
@@ -253,31 +255,22 @@ jobs:
|
|||||||
echo "skip=true" >> "$GITHUB_OUTPUT"
|
echo "skip=true" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Download release assets for AUR
|
- name: Download release assets for AUR
|
||||||
id: aur_assets
|
|
||||||
if: steps.aur_prereqs.outputs.skip != 'true' && steps.aur_ssh.outputs.skip != 'true' && steps.aur_clone.outputs.skip != 'true'
|
if: steps.aur_prereqs.outputs.skip != 'true' && steps.aur_ssh.outputs.skip != 'true' && steps.aur_clone.outputs.skip != 'true'
|
||||||
env:
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
RELEASE_VERSION: ${{ steps.version.outputs.VERSION }}
|
RELEASE_VERSION: ${{ steps.version.outputs.VERSION }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
version="$RELEASE_VERSION"
|
version="$RELEASE_VERSION"
|
||||||
install -dm755 .tmp/aur-release-assets
|
install -dm755 .tmp/aur-release-assets
|
||||||
for asset in "SubMiner-${version#v}.AppImage" subminer subminer-assets.tar.gz; do
|
gh release download "$version" \
|
||||||
destination=".tmp/aur-release-assets/$asset"
|
--dir .tmp/aur-release-assets \
|
||||||
if ! curl --fail --silent --show-error --location \
|
--pattern "SubMiner-${version#v}.AppImage" \
|
||||||
--retry 3 --retry-delay 1 --retry-all-errors \
|
--pattern "subminer" \
|
||||||
--connect-timeout 30 --max-time 600 \
|
--pattern "subminer-assets.tar.gz"
|
||||||
--output "$destination.partial" \
|
|
||||||
"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/releases/download/$version/$asset"; then
|
|
||||||
echo "::warning::Unable to download $asset after retries; skipping automated AUR publish."
|
|
||||||
echo "skip=true" >> "$GITHUB_OUTPUT"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
mv "$destination.partial" "$destination"
|
|
||||||
done
|
|
||||||
echo "skip=false" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- name: Update AUR packaging metadata
|
- name: Update AUR packaging metadata
|
||||||
if: steps.aur_prereqs.outputs.skip != 'true' && steps.aur_ssh.outputs.skip != 'true' && steps.aur_clone.outputs.skip != 'true' && steps.aur_assets.outputs.skip != 'true'
|
if: steps.aur_prereqs.outputs.skip != 'true' && steps.aur_ssh.outputs.skip != 'true' && steps.aur_clone.outputs.skip != 'true'
|
||||||
env:
|
env:
|
||||||
RELEASE_VERSION: ${{ steps.version.outputs.VERSION }}
|
RELEASE_VERSION: ${{ steps.version.outputs.VERSION }}
|
||||||
run: |
|
run: |
|
||||||
@@ -294,7 +287,7 @@ jobs:
|
|||||||
--assets ".tmp/aur-release-assets/subminer-assets.tar.gz"
|
--assets ".tmp/aur-release-assets/subminer-assets.tar.gz"
|
||||||
|
|
||||||
- name: Commit and push AUR update
|
- name: Commit and push AUR update
|
||||||
if: steps.aur_prereqs.outputs.skip != 'true' && steps.aur_ssh.outputs.skip != 'true' && steps.aur_clone.outputs.skip != 'true' && steps.aur_assets.outputs.skip != 'true'
|
if: steps.aur_prereqs.outputs.skip != 'true' && steps.aur_ssh.outputs.skip != 'true' && steps.aur_clone.outputs.skip != 'true'
|
||||||
working-directory: aur-subminer-bin
|
working-directory: aur-subminer-bin
|
||||||
env:
|
env:
|
||||||
GIT_SSH_COMMAND: ssh -i ~/.ssh/aur -o IdentitiesOnly=yes
|
GIT_SSH_COMMAND: ssh -i ~/.ssh/aur -o IdentitiesOnly=yes
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ Start here, then leave this file.
|
|||||||
- Architecture map: [`docs/architecture/README.md`](./docs/architecture/README.md)
|
- Architecture map: [`docs/architecture/README.md`](./docs/architecture/README.md)
|
||||||
- Workflow map: [`docs/workflow/README.md`](./docs/workflow/README.md)
|
- Workflow map: [`docs/workflow/README.md`](./docs/workflow/README.md)
|
||||||
- Verification lanes: [`docs/workflow/verification.md`](./docs/workflow/verification.md)
|
- Verification lanes: [`docs/workflow/verification.md`](./docs/workflow/verification.md)
|
||||||
- Testing guidelines: [`docs/workflow/testing.md`](./docs/workflow/testing.md)
|
|
||||||
- Knowledge-base rules: [`docs/knowledge-base/README.md`](./docs/knowledge-base/README.md)
|
- Knowledge-base rules: [`docs/knowledge-base/README.md`](./docs/knowledge-base/README.md)
|
||||||
- Release guide: [`docs/RELEASING.md`](./docs/RELEASING.md)
|
- Release guide: [`docs/RELEASING.md`](./docs/RELEASING.md)
|
||||||
|
|
||||||
@@ -45,11 +44,10 @@ Start here, then leave this file.
|
|||||||
- Launcher/plugin: `bun run test:launcher` or `bun run test:env`
|
- Launcher/plugin: `bun run test:launcher` or `bun run test:env`
|
||||||
- Runtime-compat / dist-sensitive: `bun run test:runtime:compat`
|
- Runtime-compat / dist-sensitive: `bun run test:runtime:compat`
|
||||||
- Stats dashboard UI (`stats/`): `bun run test:stats`
|
- Stats dashboard UI (`stats/`): `bun run test:stats`
|
||||||
- Overlay / renderer / mpv / mining behavior in the running app: `bun run build`, then `bun run test:e2e` (headless, sandboxed; `bun run e2e start` for exploratory checks)
|
|
||||||
- Build/release scripts (`scripts/**`): `bun run test:scripts`
|
- Build/release scripts (`scripts/**`): `bun run test:scripts`
|
||||||
- Internal docs, `AGENTS.md`, or repo skills: `bun run test:docs:kb`
|
- Internal docs, `AGENTS.md`, or repo skills: `bun run test:docs:kb`
|
||||||
- User-facing `docs-site/`: `bun run docs:test`, then `bun run docs:build`
|
- User-facing `docs-site/`: `bun run docs:test`, then `bun run docs:build`
|
||||||
- macOS mpv window helper (`scripts/get-mpv-window-macos.swift`): compile it on macOS with `bun run build`
|
- macOS mpv window helper: `bun test scripts/get-mpv-window-macos.test.ts`
|
||||||
- Test lanes are directory-discovered via `scripts/test-lanes.ts`; never hand-list test files in `package.json`
|
- Test lanes are directory-discovered via `scripts/test-lanes.ts`; never hand-list test files in `package.json`
|
||||||
|
|
||||||
## Docs Upkeep
|
## Docs Upkeep
|
||||||
|
|||||||
-171
@@ -1,176 +1,5 @@
|
|||||||
# Changelog
|
# 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
|
|
||||||
- **Japanese Subtitle Generation**:
|
|
||||||
- Generate Japanese SRT subtitles locally with whisper.cpp. Start it from a new modal (Ctrl+Shift+G), from the generate button in an empty subtitle sidebar, or with `subminer generate-subs`.
|
|
||||||
- Generation shows progress, can be cancelled, and loads the finished subtitles into mpv automatically.
|
|
||||||
- Pick an official multilingual Whisper model, including quantized variants, with size and accuracy guidance. You can download it in the app or point Settings at a model you already have.
|
|
||||||
- `large-v3-turbo` is recommended when CUDA support is detected, and `small` otherwise.
|
|
||||||
- whisper-cli, ffmpeg, and ffprobe are found on PATH unless you override them. SubMiner names any missing tools before a download starts.
|
|
||||||
- An optional "Focus on spoken dialogue" mode uses a separately downloaded Silero VAD model. It keeps audible sections it is unsure about, so dialogue under music is not dropped, but songs may also be transcribed.
|
|
||||||
- Long passages are split near speech starts or quiet pauses to reduce subtitles that appear too early. When an eligible embedded or external subtitle track is loaded in mpv, it guides the split points.
|
|
||||||
- Each passage runs in a fresh Whisper process, which prevents repeated-character output.
|
|
||||||
- **Subtitle Selection Modal**:
|
|
||||||
- An optional modal for choosing primary and secondary mpv subtitle tracks.
|
|
||||||
- Turn it on in Settings under Behavior, then press g followed by s to open it. Turning it off restores mpv's own subtitle selection binding.
|
|
||||||
- Single-key actions take priority over configured key sequence prefixes.
|
|
||||||
- Conflicting sequences are disabled with a warning, and the existing y commands stay reserved.
|
|
||||||
- **Subtitle Sidebar Copy**:
|
|
||||||
- Select dialogue across several sidebar rows and copy it without timestamps using Ctrl/Cmd+C or the Copy button.
|
|
||||||
- Selecting text does not seek playback and does not require mining a card.
|
|
||||||
- **Media Timing Review Screenshot Picker**:
|
|
||||||
- Choose the still screenshot separately from the audio range, with a live preview and its own time slider.
|
|
||||||
- Step through decoded frames one at a time to get the exact frame you want.
|
|
||||||
- Works with local video and with seekable remote streams such as Jellyfin.
|
|
||||||
- **mpv Keybindings in the Overlay**:
|
|
||||||
- The overlay now picks up keyboard bindings from mpv defaults, `input.conf`, and loaded scripts when they do not conflict with SubMiner.
|
|
||||||
- SubMiner controls and bindings you explicitly disabled take precedence.
|
|
||||||
- These bindings apply only to the current session and are not listed in the help menu.
|
|
||||||
- **Jimaku Live Action Search**: The Jimaku modal has new Anime and Live action tabs, so you can search Jimaku's live action catalogue as well as anime. Use Arrow Left and Arrow Right to switch tabs.
|
|
||||||
- **TMDB Live-Action Library**:
|
|
||||||
- Live-action dramas and movies in the stats Library now get posters, synopses, and titles from TMDB.
|
|
||||||
- Release builds include a project key. Setting `tmdb.apiKey` or `tmdb.apiKeyCommand` overrides it, and one of them is required when running from source.
|
|
||||||
- Titles that AniList cannot match are looked up on TMDB automatically when the parsed filename exactly matches a Japanese live-action title. For everything else, use the new **Link to TMDB** action.
|
|
||||||
- Entries linked to the same TMDB title merge into one card, and the Library kind selector has a new Live Action option.
|
|
||||||
- If a replacement download fails during provider reassignment, the previous link and artwork are kept. Merges and sync keep AniList and TMDB identities separate, and the merge dialog explains mixed selections instead of failing.
|
|
||||||
- **YouTube Library Kind**:
|
|
||||||
- YouTube channels are now their own Library media kind. Existing channel entries migrate automatically, and viewing history and manual video assignments are unchanged.
|
|
||||||
- New All Titles, Anime, and YouTube Library filters.
|
|
||||||
- Channels are excluded from AniList matching, season repair, and duplicate recommendations.
|
|
||||||
- Merges and video moves can no longer combine an anime entry with a YouTube channel.
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- **Launcher Uses Bundled Bun**:
|
|
||||||
- Every installed and downloadable launcher now runs on the Bun runtime that ships with SubMiner. A system Bun is no longer needed.
|
|
||||||
- Recognized legacy launchers migrate automatically.
|
|
||||||
- Windows gets a `subminer.cmd` launcher download.
|
|
||||||
- First-run setup is reduced to one optional launcher control. Runtime repair guidance appears only when it is needed.
|
|
||||||
- **Faster Sync Transfers**:
|
|
||||||
- Sync between compatible macOS and Linux machines now uses compressed, incremental rsync transfers.
|
|
||||||
- The last snapshot received from each peer is cached, which reduces traffic on later syncs.
|
|
||||||
- Machines without a compatible rsync, including Windows, fall back to compressed scp.
|
|
||||||
- Older peers still work without the upload cache.
|
|
||||||
- Transfers abort after 30 minutes.
|
|
||||||
- **Stats Server Request Safety**:
|
|
||||||
- The stats server now accepts loopback hosts only and rejects requests from browser origins other than its own.
|
|
||||||
- Requests that change data must send an `application/json` body. Scripts that POST to the server need to set a JSON content type.
|
|
||||||
- The in-app stats overlay now loads from the local server, so it gets the same protection.
|
|
||||||
- Dashboards served through a reverse proxy or Tailscale Serve are no longer supported.
|
|
||||||
- **Smaller Downloads**:
|
|
||||||
- Installers and unpacked apps are smaller. Demo media, source maps, TypeScript sources, test fixtures, and unused Koffi binaries are no longer packaged.
|
|
||||||
- All windows now share one Japanese UI font.
|
|
||||||
- Release builds publish package size reports that compare against the previous release.
|
|
||||||
- **Bundled Yomitan**: Updated with upstream Yomitan 26.9.8 changes, including historical Japanese kana transformations, Ukrainian language support, and improvements to Anki duplicate searches and audio retrieval.
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- **Jellyfin 12 Compatibility**:
|
|
||||||
- Playback, subtitle, artwork, and remote-control requests now authenticate with the `ApiKey` query parameter, so the integration works on Jellyfin 12, where legacy authorization is off by default.
|
|
||||||
- "Play on SubMiner" stays available. The cast connection now answers keep-alive requests and reconnects when the server stops responding, instead of silently dying after about a minute.
|
|
||||||
- The Jellyfin "now playing" bar clears when you close or finish a cast video instead of running on to the end of the episode.
|
|
||||||
- Cards mined during Jellyfin playback get the episode title in the misc info field again instead of "Unknown media".
|
|
||||||
- **Jellyfin Privacy and Playback**:
|
|
||||||
- Jellyfin streams no longer leak titles taken from the stream URL, or stream URLs that contain credentials, into metadata lookups, Anki source fields, Discord presence, stats, or AniList retries.
|
|
||||||
- Previously cached metadata that contained credentials is cleaned up. Watch history and library assignments are not touched.
|
|
||||||
- Jellyfin playback and casting now use your configured mpv executable, so they work when mpv is installed outside PATH. Portable plugins next to that executable are detected.
|
|
||||||
- **Anki Mining**:
|
|
||||||
- New `ankiConnect.fields.wordAudio` setting reads word audio separately from the sentence audio field. This fixes animated images that started moving immediately when `fields.audio` pointed to `SentenceAudio`. Existing animated images need to be regenerated to pick up the fix.
|
|
||||||
- Sentence furigana on word cards stays in sync with the full stats-search context and with expanded timing review selections. Stale readings are cleared if regeneration fails.
|
|
||||||
- Closing the overlay while media timing review is still loading now cancels the review, resumes playback if the review paused it, and cleans up the hidden preview player.
|
|
||||||
- `ankiConnect.media.maxMediaDuration: 0` now means unlimited when mining from the stats dashboard, matching overlay mining.
|
|
||||||
- Invalid AnkiConnect, Kiku, and Senren settings are now rejected with a warning and fall back to defaults.
|
|
||||||
- **Stats Server Stability**:
|
|
||||||
- A port conflict is now reported in a status notification instead of crashing SubMiner.
|
|
||||||
- Simultaneous startup requests share one server start. Stopping the background server no longer disconnects dashboards open in the foreground.
|
|
||||||
- Shutdown waits only a limited time for active requests to finish.
|
|
||||||
- Malformed resource IDs, and ID lists with any invalid entries, are rejected before Library changes or cover backfills run.
|
|
||||||
- **Subtitle Sidebar**:
|
|
||||||
- Clicking a cue no longer leaves the row focused, and Space no longer seeks back to a focused cue. Enter still seeks to the focused cue, and Space keeps its configured playback action.
|
|
||||||
- The sidebar stays near the current playback position during gaps when the subtitle file has a cue that starts at zero.
|
|
||||||
- **Settings Save Feedback**:
|
|
||||||
- Settings marked LIVE no longer show false restart warnings, including for notifications and subtitle generation.
|
|
||||||
- When a save mixes live and restart-only changes, the live changes apply right away and only the changed sections that need a restart are listed.
|
|
||||||
- **Overlay Windows**:
|
|
||||||
- On Hyprland, recovery dialogs stay above SubMiner windows so overlay placement updates no longer cover their Wait and Close buttons.
|
|
||||||
- On Linux, a delayed close callback during teardown can no longer reopen the overlay.
|
|
||||||
- **First Launch on macOS**: SubMiner no longer exits on first launch when the config directory does not exist yet.
|
|
||||||
|
|
||||||
### Docs
|
|
||||||
- **Launcher**: Documented the launcher install that uses the bundled runtime, migration from legacy launchers, package-managed updates, and the bundled Bun runtime's MIT and LGPL notices. The AUR package installs these notices under `/usr/share/licenses/subminer-bin`, and they are also included in `subminer-assets.tar.gz`.
|
|
||||||
- **Subtitle Generation**: Documented model choice, VAD behavior, splitting guided by a reference track, fallback behavior, and known limits.
|
|
||||||
- **Subtitle Selection**: Documented the subtitle selector setting, its shortcut override, and the primary and secondary track controls.
|
|
||||||
- **Settings**: Clarified save feedback for live settings, warnings for saves that mix live and restart-only changes, and how subtitle generation settings reload.
|
|
||||||
- **Jellyfin**:
|
|
||||||
- Clarified that Windows mpv playback and Jellyfin casting can use a configured executable path instead of PATH.
|
|
||||||
- Documented how Jellyfin media titles and stats identities keep stream credentials out of metadata.
|
|
||||||
- **Stats Library**:
|
|
||||||
- Documented TMDB linking, provider reassignment, merge compatibility, and caching of the credential command's output.
|
|
||||||
- Documented YouTube channel filtering and video statistics in the Library.
|
|
||||||
- **Mining**:
|
|
||||||
- Documented choosing the screenshot separately in media timing review.
|
|
||||||
- Documented the separate word audio field mapping, including that existing animated images need to be regenerated.
|
|
||||||
- **Sync**: Documented compressed transfers, where the incremental sync cache is stored, and compatibility with older peers.
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Internal changes</summary>
|
|
||||||
|
|
||||||
### Internal
|
|
||||||
- Removed duplicate source and launcher smoke runs from the reusable CI quality gate. Every distinct test lane and failure artifact is kept.
|
|
||||||
- Replaced mislabeled dist source reruns with a small Electron-runtime smoke check. It covers compiled stats startup, the HTTP service, native SQLite, port conflicts, and cleanup.
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
## v0.19.6 (2026-09-04)
|
## v0.19.6 (2026-09-04)
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
# SubMiner
|
# SubMiner
|
||||||
|
|
||||||
Look up words with Yomitan, mine them to Anki, and track your immersion without leaving mpv
|
Integrates Yomitan and mpv - on-screen lookups, mine to Anki, and track immersion without leaving the player
|
||||||
|
|
||||||
[Installation](#quick-start) · [Requirements](#requirements) · [Usage](https://docs.subminer.moe/usage) · [Documentation](https://docs.subminer.moe)
|
[Installation](#quick-start) · [Requirements](#requirements) · [Usage](https://docs.subminer.moe/usage) · [Documentation](https://docs.subminer.moe)
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ Look up words with Yomitan, mine them to Anki, and track your immersion without
|
|||||||
|
|
||||||
### Dictionary Lookups
|
### Dictionary Lookups
|
||||||
|
|
||||||
Hover over any word in the subtitles to open the full Yomitan popup with definitions, pitch accent, and frequency data. SubMiner bundles its own Yomitan, separate from any browser install.
|
Hover over any word and trigger a lookup to get the full Yomitan popup - definitions, pitch accent, and frequency data - without ever leaving mpv.
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="docs-site/public/screenshots/yomitan-lookup.png" width="800" alt="Yomitan dictionary popup over annotated subtitles in mpv">
|
<img src="docs-site/public/screenshots/yomitan-lookup.png" width="800" alt="Yomitan dictionary popup over annotated subtitles in mpv">
|
||||||
@@ -33,7 +33,7 @@ Hover over any word in the subtitles to open the full Yomitan popup with definit
|
|||||||
|
|
||||||
### Instant Anki Mining
|
### Instant Anki Mining
|
||||||
|
|
||||||
Create an Anki card from the exact playback moment with one key press, click, or controller input. SubMiner fills in the sentence, an audio clip, and a screenshot or animated image.
|
Create an Anki card with the sentence, audio clip, screenshot, and machine translation from the exact playback moment with one key press, click, or controller input.
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="docs-site/public/screenshots/one-key-mining.png" width="800" alt="Anki card created from SubMiner with sentence, audio, and screenshot">
|
<img src="docs-site/public/screenshots/one-key-mining.png" width="800" alt="Anki card created from SubMiner with sentence, audio, and screenshot">
|
||||||
@@ -43,7 +43,7 @@ Create an Anki card from the exact playback moment with one key press, click, or
|
|||||||
|
|
||||||
### Reading Annotations
|
### Reading Annotations
|
||||||
|
|
||||||
Subtitles are annotated as they play with frequency highlighting, JLPT tags, N+1 targeting, and character names from a generated dictionary. Particles and grammar-only tokens stay plain so the words worth learning stand out.
|
Real-time subtitle annotations with frequency highlighting, JLPT tags, N+1 targeting, and a character name dictionary. Grammar-only tokens and particles render as plain text so you focus on what matters.
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="docs-site/public/screenshots/annotations.png" width="800" alt="Annotated subtitles with frequency coloring, JLPT underlines, and N+1 targets">
|
<img src="docs-site/public/screenshots/annotations.png" width="800" alt="Annotated subtitles with frequency coloring, JLPT underlines, and N+1 targets">
|
||||||
@@ -53,7 +53,7 @@ Subtitles are annotated as they play with frequency highlighting, JLPT tags, N+1
|
|||||||
|
|
||||||
### Immersion Dashboard
|
### Immersion Dashboard
|
||||||
|
|
||||||
A stats dashboard tracks watch time, vocabulary growth, mining throughput, session history, and trends. Everything stays on your machine, with no third-party tracking.
|
Local stats dashboard tracking watch time, vocabulary growth, mining throughput, session history, and trends. All stored locally, no third-party tracking.
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="docs-site/public/screenshots/stats-overview.png" width="800" alt="Stats dashboard showing watch time, cards mined, streaks, and tracking data">
|
<img src="docs-site/public/screenshots/stats-overview.png" width="800" alt="Stats dashboard showing watch time, cards mined, streaks, and tracking data">
|
||||||
@@ -61,12 +61,22 @@ A stats dashboard tracks watch time, vocabulary growth, mining throughput, sessi
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
### Playlist Browser
|
||||||
|
|
||||||
|
Browse sibling episode files and the active mpv queue in one overlay modal. Open it with `Ctrl+Alt+P` to append episodes from the current directory, jump to queued items, remove entries, or reorder the playlist without leaving playback.
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<img src="docs-site/public/screenshots/playlist-browser.png" width="800" alt="Playlist browser modal showing sibling episode files beside the active mpv queue">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
### Integrations
|
### Integrations
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>YouTube</b></td>
|
<td><b>YouTube</b></td>
|
||||||
<td>Play YouTube URLs with subtitle tracks picked by your language priorities, or choose tracks yourself in the overlay picker (<code>Ctrl+Alt+C</code>). Requires <code>yt-dlp</code></td>
|
<td>Auto-loaded yt-dlp subtitle tracks at startup with config-driven primary/secondary language priorities and a manual overlay picker on demand (<code>Ctrl+Alt+C</code>)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>AniList</b></td>
|
<td><b>AniList</b></td>
|
||||||
@@ -74,19 +84,23 @@ A stats dashboard tracks watch time, vocabulary growth, mining throughput, sessi
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>Jellyfin</b></td>
|
<td><b>Jellyfin</b></td>
|
||||||
<td>Browse your Jellyfin library, or cast to SubMiner from any Jellyfin client. Setup and discovery live in the tray menu</td>
|
<td>Browse, launch, and cast media from your Jellyfin server with setup and discovery controls in the app tray</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>Anime Browser</b></td>
|
||||||
|
<td>Search anime sources you supply as <a href="https://github.com/aniyomiorg/aniyomi">Aniyomi</a> extension APKs and play an episode in mpv with the overlay attached (<code>subminer anime</code>); SubMiner ships no repositories and bundles no sources</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>Jimaku</b></td>
|
<td><b>Jimaku</b></td>
|
||||||
<td>Search and download Japanese subtitles. Requires a free Jimaku API key</td>
|
<td>Search and download Japanese subtitles</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>Japanese Subtitle Generation</b></td>
|
||||||
|
<td>Generate Japanese subtitles from local files or finite anime streams in a standalone modal (<code>Ctrl+Shift+G</code>) or the sidebar button. The launcher supports local files. Transcription runs locally with whisper.cpp and FFmpeg, with progress and optional managed model downloads. Stream subtitles are saved in the application cache. Optional Silero speech detection prioritizes dialogue in separately timed passages. <a href="https://docs.subminer.moe/main/subtitle-generation">Setup guide</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>TsukiHime</b></td>
|
<td><b>TsukiHime</b></td>
|
||||||
<td>Search and download subtitles extracted from anime releases, with Japanese and secondary-language tabs (<code>Ctrl+Shift+T</code>). Requires <code>xz</code> on your <code>PATH</code></td>
|
<td>Search and download subtitles extracted from anime releases, with Japanese and secondary-language tabs (<code>Ctrl+Shift+T</code>) — no API key, requires <code>xz</code> on your <code>PATH</code></td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><b>Subtitle generation</b></td>
|
|
||||||
<td>Transcribe a video's audio into Japanese subtitles locally from the generation modal (<code>Ctrl+Shift+G</code>), the subtitle sidebar, or the launcher. SubMiner can download models for you; optional Silero speech detection helps focus on dialogue. Requires whisper.cpp and FFmpeg. <a href="https://docs.subminer.moe/subtitle-generation">Setup guide</a></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>AniSkip</b></td>
|
<td><b>AniSkip</b></td>
|
||||||
@@ -94,7 +108,7 @@ A stats dashboard tracks watch time, vocabulary growth, mining throughput, sessi
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>alass / ffsubsync</b></td>
|
<td><b>alass / ffsubsync</b></td>
|
||||||
<td>Retime a subtitle against the audio or another subtitle track (<code>Ctrl+Alt+S</code>). Requires <code>alass</code> or <code>ffsubsync</code>; set <code>subsync.alass_path</code> or <code>subsync.ffsubsync_path</code> if they are not in <code>/usr/bin</code></td>
|
<td>Manual subtitle retiming — requires <code>alass</code> or <code>ffsubsync</code> on your <code>PATH</code> (optional; subtitle syncing is disabled without them)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>WebSocket</b></td>
|
<td><b>WebSocket</b></td>
|
||||||
@@ -102,29 +116,29 @@ A stats dashboard tracks watch time, vocabulary growth, mining throughput, sessi
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<img src="docs-site/public/screenshots/texthooker.png" width="800" alt="Texthooker page receiving annotated subtitle lines via WebSocket">
|
||||||
|
</div>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
SubMiner runs on Linux, macOS 11+, and Windows 10+. Only **mpv** is required to run it (plus `fuse2` for the Linux AppImage). Mining cards also needs Anki with the [AnkiConnect](https://ankiweb.net/shared/info/2055492159) add-on. Everything else is optional.
|
Only **mpv** is required to run SubMiner. Anki + AnkiConnect are required to mine cards, which is the point of the app, but everything else is optional.
|
||||||
|
|
||||||
| Dependency | Status | What it does |
|
| Dependency | Status | What it does |
|
||||||
| ------------------------ | ---------------- | -------------------------------------------------------------------- |
|
| -------------------- | ---------------- | -------------------------------------------------------- |
|
||||||
| mpv | Required | The video player SubMiner draws over |
|
| mpv | Required | The video player SubMiner overlays on |
|
||||||
| fuse2 | Required (Linux) | Running the AppImage |
|
| Anki + AnkiConnect | Required to mine | Card creation from the Yomitan popup |
|
||||||
| Anki + AnkiConnect | Required to mine | Card creation from the Yomitan popup |
|
| ffmpeg | Recommended | Audio clips & screenshots for Anki cards |
|
||||||
| ffmpeg | Recommended | Audio clips and screenshots on cards |
|
| MeCab + mecab-ipadic | Recommended | More precise annotations and filtering |
|
||||||
| MeCab + mecab-ipadic | Recommended | More accurate N+1, JLPT, and frequency highlighting |
|
| yt-dlp | Optional | YouTube playback |
|
||||||
| xdotool + xwininfo | Required (X11) | Window tracking on desktops other than Hyprland or Sway |
|
| xz | Optional | TsukiHime subtitle downloads (not on Windows by default) |
|
||||||
| yt-dlp | Optional | YouTube playback |
|
| alass / ffsubsync | Optional | Subtitle sync |
|
||||||
| xz | Optional | TsukiHime subtitle downloads (most Linux distros already have it) |
|
| guessit | Optional | Better anime title and episode detection |
|
||||||
| alass / ffsubsync | Optional | Subtitle sync |
|
| fzf / rofi | Optional | Video picker in the `subminer` launcher (Linux/macOS) |
|
||||||
| whisper.cpp | Optional | [Subtitle generation](https://docs.subminer.moe/subtitle-generation) |
|
|
||||||
| guessit | Optional | Better title, season, and episode detection for AniSkip and AniList |
|
|
||||||
| fzf / rofi | Optional | Video picker in the `subminer` launcher (rofi is Linux only) |
|
|
||||||
| chafa, ffmpegthumbnailer | Optional | Thumbnail previews in the launcher pickers |
|
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary><b>Platform-specific install commands</b></summary>
|
<summary><b>Platform-specific install commands</b></summary>
|
||||||
@@ -132,12 +146,9 @@ SubMiner runs on Linux, macOS 11+, and Windows 10+. Only **mpv** is required to
|
|||||||
**Arch Linux:**
|
**Arch Linux:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo pacman -S --needed mpv ffmpeg
|
sudo pacman -S --needed mpv ffmpeg mecab mecab-ipadic
|
||||||
paru -S --needed mecab-git mecab-ipadic # MeCab is only in the AUR
|
|
||||||
```
|
```
|
||||||
|
|
||||||
On desktops other than Hyprland or Sway, also install `xdotool` and `xorg-xwininfo`.
|
|
||||||
|
|
||||||
**macOS:**
|
**macOS:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -151,16 +162,16 @@ winget install shinchiro.mpv
|
|||||||
winget install Gyan.FFmpeg
|
winget install Gyan.FFmpeg
|
||||||
```
|
```
|
||||||
|
|
||||||
Then reopen your terminal and check `mpv --version` and `ffmpeg -version`. ffmpeg must be on `PATH`; mpv does not have to be. If `mpv` is not found, either add its folder (usually `%LOCALAPPDATA%\Programs\mpv`) to `PATH` or enter the full path to `mpv.exe` during first-run setup.
|
Then reopen your terminal and check `mpv --version` and `ffmpeg -version`. winget puts `ffmpeg` on `PATH` automatically; mpv uses a regular installer that may not, so if `mpv` is not found, either add its folder (usually `%LOCALAPPDATA%\Programs\mpv`) to `PATH` or set `mpv.executablePath` during first-run setup.
|
||||||
|
|
||||||
[Scoop](https://scoop.sh) is the alternative if you want one package manager for everything. It is the only one that also carries `xz`:
|
[Scoop](https://scoop.sh) is the alternative if you want one package manager for everything, since it is the only one that also carries `xz`:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
scoop bucket add extras
|
scoop bucket add extras
|
||||||
scoop install extras/mpv main/ffmpeg main/yt-dlp main/xz
|
scoop install extras/mpv main/ffmpeg main/yt-dlp main/xz
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [installation guide](https://docs.subminer.moe/installation#_1-install-requirements) for Ubuntu, Debian, and Fedora commands and the full optional package lists.
|
See the [full requirements list](https://docs.subminer.moe/installation#_1-install-requirements) for optional dependencies.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -175,10 +186,10 @@ See the [installation guide](https://docs.subminer.moe/installation#_1-install-r
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
paru -S subminer-bin
|
paru -S subminer-bin
|
||||||
|
# optional: the anime browser bridge, shared with Mangatan and updated by pacman
|
||||||
|
paru -S mangatan-extension-server
|
||||||
```
|
```
|
||||||
|
|
||||||
Includes the AppImage and the `subminer` command.
|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
@@ -190,7 +201,14 @@ wget https://github.com/ksyasuda/SubMiner/releases/latest/download/SubMiner.AppI
|
|||||||
&& chmod +x ~/.local/bin/SubMiner.AppImage
|
&& chmod +x ~/.local/bin/SubMiner.AppImage
|
||||||
```
|
```
|
||||||
|
|
||||||
The AppImage is all you need. First-run setup can install the optional `subminer` command, which runs on a copy of Bun bundled with the app, so you do not need Bun installed.
|
The AppImage is all you need. First-run setup can install the optional `subminer` command-line launcher. Every current launcher uses Bun included with the app, so you do not need Bun installed or on `PATH`.
|
||||||
|
|
||||||
|
You can also download the launcher wrapper directly:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wget https://github.com/ksyasuda/SubMiner/releases/latest/download/subminer -O ~/.local/bin/subminer \
|
||||||
|
&& chmod +x ~/.local/bin/subminer
|
||||||
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -199,14 +217,14 @@ The AppImage is all you need. First-run setup can install the optional `subminer
|
|||||||
|
|
||||||
Download the latest DMG from [GitHub Releases](https://github.com/ksyasuda/SubMiner/releases/latest) and drag `SubMiner.app` into `/Applications`.
|
Download the latest DMG from [GitHub Releases](https://github.com/ksyasuda/SubMiner/releases/latest) and drag `SubMiner.app` into `/Applications`.
|
||||||
|
|
||||||
Then enable SubMiner under **System Settings > Privacy & Security > Accessibility**, or the overlay cannot follow the mpv window. If macOS blocks the first launch, right-click the app and choose **Open**.
|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary><b>Windows</b></summary>
|
<summary><b>Windows</b></summary>
|
||||||
|
|
||||||
Download and run the latest installer (`SubMiner-<version>.exe`) from [GitHub Releases](https://github.com/ksyasuda/SubMiner/releases/latest). A portable `.zip` is also available.
|
Download and run the latest installer (`.exe`) from [GitHub Releases](https://github.com/ksyasuda/SubMiner/releases/latest).
|
||||||
|
|
||||||
|
For terminal use, download `subminer.cmd`. It locates the installed app and uses its private Bun runtime.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -219,30 +237,28 @@ See the [build-from-source guide](https://docs.subminer.moe/installation#from-so
|
|||||||
|
|
||||||
### 2. Launch & Set Up
|
### 2. Launch & Set Up
|
||||||
|
|
||||||
Start SubMiner and the setup window opens on first launch. It creates your config file, imports Yomitan dictionaries (you need at least one for lookups), and can install the `subminer` command. On Windows it also creates a **SubMiner mpv** shortcut.
|
Run the installed app and the first-run setup wizard will guide you through importing Yomitan dictionaries and optionally installing the `subminer` command-line launcher. Setup records a custom app location when needed, and the wrapper runs with the app's private Bun runtime.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
subminer app --setup # AUR
|
# Linux
|
||||||
~/.local/bin/SubMiner.AppImage --setup # AppImage
|
~/.local/bin/SubMiner.AppImage --setup
|
||||||
|
|
||||||
|
# macOS
|
||||||
|
open -a SubMiner --args --setup
|
||||||
```
|
```
|
||||||
|
|
||||||
On **macOS**, open `SubMiner.app` from `/Applications`. On **Windows**, run SubMiner from the Start menu. To reopen setup later, run `subminer app --setup`.
|
On **Windows**, just run `SubMiner.exe` and the setup will open automatically on first launch.
|
||||||
|
|
||||||
For card creation, keep Anki open with AnkiConnect installed. SubMiner connects to it at its default address with no extra setup.
|
|
||||||
|
|
||||||
### 3. Mine
|
### 3. Mine
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
subminer video.mkv # play a video with SubMiner
|
subminer video.mkv # launch mpv with SubMiner
|
||||||
subminer /path/to/dir # pick a file with fzf
|
subminer /path/to/dir # pick a file with fzf
|
||||||
subminer -R /path/to/dir # pick a file with rofi (Linux only)
|
subminer -R /path/to/dir # pick a file with rofi (Linux only)
|
||||||
subminer -H # watch history: replay, next, or previous episode
|
subminer -H # browse history, then previous / replay / next / select / quit
|
||||||
subminer doctor # check your setup
|
|
||||||
```
|
```
|
||||||
|
|
||||||
On **Windows**, double-click the **SubMiner mpv** shortcut or drag a video file onto it.
|
On **Windows**, use the **SubMiner mpv** shortcut created during setup. Double-click it or drag a video file onto it.
|
||||||
|
|
||||||
Starting mpv some other way? See [Launching mpv yourself](https://docs.subminer.moe/installation#launching-mpv-yourself) for the IPC socket option the overlay needs.
|
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
@@ -254,22 +270,40 @@ Full guides on configuration, Anki setup, Jellyfin, immersion tracking, and more
|
|||||||
|
|
||||||
SubMiner builds on the work of these open-source projects:
|
SubMiner builds on the work of these open-source projects:
|
||||||
|
|
||||||
| Project | Role |
|
| Project | Role |
|
||||||
| ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
| ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
||||||
| [ani-skip](https://github.com/synacktraa/ani-skip) | AniSkip API client for anime intro/outro skip timestamps |
|
| [ani-skip](https://github.com/synacktraa/ani-skip) | AniSkip API client for anime intro/outro skip timestamps |
|
||||||
| [Anacreon-Script](https://github.com/friedrich-de/Anacreon-Script) | Inspiration for the mining workflow |
|
| [Anacreon-Script](https://github.com/friedrich-de/Anacreon-Script) | Inspiration for the mining workflow |
|
||||||
| [asbplayer](https://github.com/killergerbah/asbplayer) | Inspiration for subtitle sidebar and logic for YouTube subtitle parsing |
|
| [Aniyomi](https://github.com/aniyomiorg/aniyomi) | Anime extension API and data model the anime browser targets |
|
||||||
| [Bee's Character Dictionary](https://github.com/bee-san/Japanese_Character_Name_Dictionary) | Character name recognition in subtitles |
|
| [asbplayer](https://github.com/killergerbah/asbplayer) | Inspiration for subtitle sidebar and logic for YouTube subtitle parsing |
|
||||||
| [Bun](https://github.com/oven-sh/bun) | Bundled runtime for the `subminer` command-line launcher |
|
| [Bee's Character Dictionary](https://github.com/bee-san/Japanese_Character_Name_Dictionary) | Character name recognition in subtitles |
|
||||||
| [GameSentenceMiner](https://github.com/bpwhelan/GameSentenceMiner) | Inspiration for Electron overlay with Yomitan integration |
|
| [Bun](https://github.com/oven-sh/bun) | Bundled runtime for the `subminer` command-line launcher |
|
||||||
| [jellyfin-mpv-shim](https://github.com/jellyfin/jellyfin-mpv-shim) | Jellyfin integration |
|
| [GameSentenceMiner](https://github.com/bpwhelan/GameSentenceMiner) | Inspiration for Electron overlay with Yomitan integration |
|
||||||
| [Jimaku.cc](https://jimaku.cc) | Japanese subtitle search and downloads |
|
| [jellyfin-mpv-shim](https://github.com/jellyfin/jellyfin-mpv-shim) | Jellyfin integration |
|
||||||
| [Renji's Texthooker Page](https://github.com/Renji-XD/texthooker-ui) | Base for the WebSocket texthooker integration |
|
| [Jimaku.cc](https://jimaku.cc) | Japanese subtitle search and downloads |
|
||||||
| [Yomitan](https://github.com/yomidevs/yomitan) | Dictionary engine powering all lookups and the morphological parser |
|
| [M-Extension-Server](https://github.com/1Selxo/M-Extension-Server) | Runs Aniyomi extension APKs off Android; the bridge the anime browser drives |
|
||||||
| [yomitan-jlpt-vocab](https://github.com/stephenmk/yomitan-jlpt-vocab) | JLPT level tags for vocabulary |
|
| [Mangatan](https://github.com/1Selxo/Mangatan) | Reference client for the bridge protocol the anime browser speaks |
|
||||||
|
| [Renji's Texthooker Page](https://github.com/Renji-XD/texthooker-ui) | Base for the WebSocket texthooker integration |
|
||||||
|
| [Yomitan](https://github.com/yomidevs/yomitan) | Dictionary engine powering all lookups and the morphological parser |
|
||||||
|
| [yomitan-jlpt-vocab](https://github.com/stephenmk/yomitan-jlpt-vocab) | JLPT level tags for vocabulary |
|
||||||
|
|
||||||
|
## Disclaimer
|
||||||
|
|
||||||
|
SubMiner is a media player and language-learning tool. The project does not
|
||||||
|
host, supply, or link to anime, video streams, or subtitle libraries. The anime
|
||||||
|
browser runs Aniyomi extensions that you install yourself from repositories you
|
||||||
|
choose; SubMiner bundles none and recommends none. The SubMiner developers are
|
||||||
|
not affiliated with any content provider and have no control over what those
|
||||||
|
sources offer, whether they stay available, or the quality of what they serve.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
SubMiner is released under the [GNU General Public License v3.0](LICENSE).
|
[GNU General Public License v3.0](LICENSE)
|
||||||
|
|
||||||
|
The anime browser drives [M-Extension-Server](https://github.com/1Selxo/M-Extension-Server),
|
||||||
|
downloaded from its upstream releases at runtime rather than
|
||||||
|
bundled or redistributed here; its bundles carry their own dependencies, including a JRE and
|
||||||
|
GPL-3.0 NewPipe Extractor. SubMiner includes none of them and talks to the bridge
|
||||||
|
over its own HTTP protocol. It ships no extensions or repositories by default.
|
||||||
|
|
||||||
Release packages also bundle an unmodified copy of [Bun](https://github.com/oven-sh/bun), which is MIT licensed and statically links JavaScriptCore (LGPL 2.0) and TinyCC (LGPL 2.1). Its license texts and third-party notices ship inside the app under `resources/bun/licenses`, and each release publishes `bun-v1.3.5-source.tar.gz` with the corresponding source. See [Bundled Bun runtime](https://docs.subminer.moe/installation#bundled-bun-runtime).
|
Release packages also bundle an unmodified copy of [Bun](https://github.com/oven-sh/bun), which is MIT licensed and statically links JavaScriptCore (LGPL 2.0) and TinyCC (LGPL 2.1). Its license texts and third-party notices ship inside the app under `resources/bun/licenses`, and each release publishes `bun-v1.3.5-source.tar.gz` with the corresponding source. See [Bundled Bun runtime](https://docs.subminer.moe/installation#bundled-bun-runtime).
|
||||||
@@ -5,8 +5,10 @@
|
|||||||
"": {
|
"": {
|
||||||
"name": "subminer",
|
"name": "subminer",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@fontsource-variable/geist": "^5.2.8",
|
||||||
|
"@fontsource-variable/geist-mono": "^5.2.7",
|
||||||
"@xhayper/discord-rpc": "^1.3.4",
|
"@xhayper/discord-rpc": "^1.3.4",
|
||||||
"axios": "^1.20.0",
|
"axios": "^1.18.1",
|
||||||
"commander": "^14.0.3",
|
"commander": "^14.0.3",
|
||||||
"electron-updater": "^6.8.9",
|
"electron-updater": "^6.8.9",
|
||||||
"hono": "^4.12.28",
|
"hono": "^4.12.28",
|
||||||
@@ -19,12 +21,13 @@
|
|||||||
"@electron/asar": "3.4.1",
|
"@electron/asar": "3.4.1",
|
||||||
"@types/node": "^24.10.0",
|
"@types/node": "^24.10.0",
|
||||||
"@types/ws": "^8.18.1",
|
"@types/ws": "^8.18.1",
|
||||||
"electron": "43.7.7",
|
"electron": "42.6.0",
|
||||||
"electron-builder": "26.16.1",
|
"electron-builder": "26.15.3",
|
||||||
"esbuild": "^0.25.12",
|
"esbuild": "^0.25.12",
|
||||||
|
"eslint": "^10.8.0",
|
||||||
"prettier": "^3.8.1",
|
"prettier": "^3.8.1",
|
||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
"undici": "7.29.1",
|
"undici": "7.29.0",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -33,10 +36,10 @@
|
|||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"@xmldom/xmldom": "0.8.15",
|
"@xmldom/xmldom": "0.8.15",
|
||||||
"app-builder-lib": "26.16.1",
|
"app-builder-lib": "26.15.3",
|
||||||
"brace-expansion": "5.0.11",
|
"brace-expansion": "5.0.9",
|
||||||
"electron-builder-squirrel-windows": "26.16.1",
|
"electron-builder-squirrel-windows": "26.15.3",
|
||||||
"fast-uri": "3.1.7",
|
"fast-uri": "3.1.6",
|
||||||
"form-data": "4.0.6",
|
"form-data": "4.0.6",
|
||||||
"ip-address": "10.2.0",
|
"ip-address": "10.2.0",
|
||||||
"js-yaml": "4.3.2",
|
"js-yaml": "4.3.2",
|
||||||
@@ -45,7 +48,7 @@
|
|||||||
"picomatch": "4.0.4",
|
"picomatch": "4.0.4",
|
||||||
"tar": "7.5.21",
|
"tar": "7.5.21",
|
||||||
"tmp": "0.2.7",
|
"tmp": "0.2.7",
|
||||||
"undici": "7.29.1",
|
"undici": "7.29.0",
|
||||||
},
|
},
|
||||||
"packages": {
|
"packages": {
|
||||||
"@discordjs/collection": ["@discordjs/collection@2.1.1", "", {}, "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg=="],
|
"@discordjs/collection": ["@discordjs/collection@2.1.1", "", {}, "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg=="],
|
||||||
@@ -124,6 +127,34 @@
|
|||||||
|
|
||||||
"@esbuild/win32-x64": ["@esbuild/win32-x64@0.25.12", "", { "os": "win32", "cpu": "x64" }, "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA=="],
|
"@esbuild/win32-x64": ["@esbuild/win32-x64@0.25.12", "", { "os": "win32", "cpu": "x64" }, "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA=="],
|
||||||
|
|
||||||
|
"@eslint-community/eslint-utils": ["@eslint-community/eslint-utils@4.9.1", "", { "dependencies": { "eslint-visitor-keys": "^3.4.3" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ=="],
|
||||||
|
|
||||||
|
"@eslint-community/regexpp": ["@eslint-community/regexpp@4.12.2", "", {}, "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew=="],
|
||||||
|
|
||||||
|
"@eslint/config-array": ["@eslint/config-array@0.23.5", "", { "dependencies": { "@eslint/object-schema": "^3.0.5", "debug": "^4.3.1", "minimatch": "^10.2.4" } }, "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA=="],
|
||||||
|
|
||||||
|
"@eslint/config-helpers": ["@eslint/config-helpers@0.7.0", "", { "dependencies": { "@eslint/core": "^1.2.1" } }, "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw=="],
|
||||||
|
|
||||||
|
"@eslint/core": ["@eslint/core@1.2.1", "", { "dependencies": { "@types/json-schema": "^7.0.15" } }, "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ=="],
|
||||||
|
|
||||||
|
"@eslint/object-schema": ["@eslint/object-schema@3.0.5", "", {}, "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw=="],
|
||||||
|
|
||||||
|
"@eslint/plugin-kit": ["@eslint/plugin-kit@0.7.2", "", { "dependencies": { "@eslint/core": "^1.2.1", "levn": "^0.4.1" } }, "sha512-+CNAzxglkrpNf/kKywqQfk74QjtceuOE7Qm+AF8miRvPF/wmmK5+OJOgVh3AVTT3RP2mH3+FOaxlE5v72owk0A=="],
|
||||||
|
|
||||||
|
"@fontsource-variable/geist": ["@fontsource-variable/geist@5.2.8", "", {}, "sha512-cJ6m9e+8MQ5dCYJsLylfZrgBh6KkG4bOLckB35Tr9J/EqdkEM6QllH5PxqP1dhTvFup+HtMRPuz9xOjxXJggxw=="],
|
||||||
|
|
||||||
|
"@fontsource-variable/geist-mono": ["@fontsource-variable/geist-mono@5.2.7", "", {}, "sha512-ZKlZ5sjtalb2TwXKs400mAGDlt/+2ENLNySPx0wTz3bP3mWARCsUW+rpxzZc7e05d2qGch70pItt3K4qttbIYA=="],
|
||||||
|
|
||||||
|
"@humanfs/core": ["@humanfs/core@0.19.2", "", { "dependencies": { "@humanfs/types": "^0.15.0" } }, "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA=="],
|
||||||
|
|
||||||
|
"@humanfs/node": ["@humanfs/node@0.16.8", "", { "dependencies": { "@humanfs/core": "^0.19.2", "@humanfs/types": "^0.15.0", "@humanwhocodes/retry": "^0.4.0" } }, "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ=="],
|
||||||
|
|
||||||
|
"@humanfs/types": ["@humanfs/types@0.15.0", "", {}, "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q=="],
|
||||||
|
|
||||||
|
"@humanwhocodes/module-importer": ["@humanwhocodes/module-importer@1.0.1", "", {}, "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA=="],
|
||||||
|
|
||||||
|
"@humanwhocodes/retry": ["@humanwhocodes/retry@0.4.3", "", {}, "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ=="],
|
||||||
|
|
||||||
"@isaacs/fs-minipass": ["@isaacs/fs-minipass@4.0.1", "", { "dependencies": { "minipass": "^7.0.4" } }, "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w=="],
|
"@isaacs/fs-minipass": ["@isaacs/fs-minipass@4.0.1", "", { "dependencies": { "minipass": "^7.0.4" } }, "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w=="],
|
||||||
|
|
||||||
"@libsql/darwin-arm64": ["@libsql/darwin-arm64@0.5.28", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Lc/b8JXO2W2+H+5UXfw7PCHZCim1jlrB0CmLPsjfVmihMluBpdYafFImhjAHxHlWGfuZ32WzjVPUap5fGmkthw=="],
|
"@libsql/darwin-arm64": ["@libsql/darwin-arm64@0.5.28", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Lc/b8JXO2W2+H+5UXfw7PCHZCim1jlrB0CmLPsjfVmihMluBpdYafFImhjAHxHlWGfuZ32WzjVPUap5fGmkthw=="],
|
||||||
@@ -150,7 +181,7 @@
|
|||||||
|
|
||||||
"@neon-rs/load": ["@neon-rs/load@0.0.4", "", {}, "sha512-kTPhdZyTQxB+2wpiRcFWrDcejc4JI6tkPuS7UZCG4l6Zvc5kU/gGQ/ozvHTh1XR5tS+UlfAfGuPajjzQjCiHCw=="],
|
"@neon-rs/load": ["@neon-rs/load@0.0.4", "", {}, "sha512-kTPhdZyTQxB+2wpiRcFWrDcejc4JI6tkPuS7UZCG4l6Zvc5kU/gGQ/ozvHTh1XR5tS+UlfAfGuPajjzQjCiHCw=="],
|
||||||
|
|
||||||
"@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="],
|
"@noble/hashes": ["@noble/hashes@2.2.0", "", {}, "sha512-IYqDGiTXab6FniAgnSdZwgWbomxpy9FtYvLKs7wCUs2a8RkITG+DFGO1DM9cr+E3/RgADRpFjrKVaJ1z6sjtEg=="],
|
||||||
|
|
||||||
"@peculiar/asn1-schema": ["@peculiar/asn1-schema@2.8.0", "", { "dependencies": { "@peculiar/utils": "^2.0.2", "asn1js": "^3.0.10", "tslib": "^2.8.1" } }, "sha512-7YT0U/ze0tF2QOBbE15gKZwy5tvgGyLRiRHLzhlbOpf7BT032oBSd0haZqXn5W6l26WLlu3dyxzjM+2638/z2Q=="],
|
"@peculiar/asn1-schema": ["@peculiar/asn1-schema@2.8.0", "", { "dependencies": { "@peculiar/utils": "^2.0.2", "asn1js": "^3.0.10", "tslib": "^2.8.1" } }, "sha512-7YT0U/ze0tF2QOBbE15gKZwy5tvgGyLRiRHLzhlbOpf7BT032oBSd0haZqXn5W6l26WLlu3dyxzjM+2638/z2Q=="],
|
||||||
|
|
||||||
@@ -172,10 +203,16 @@
|
|||||||
|
|
||||||
"@types/debug": ["@types/debug@4.1.13", "", { "dependencies": { "@types/ms": "*" } }, "sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw=="],
|
"@types/debug": ["@types/debug@4.1.13", "", { "dependencies": { "@types/ms": "*" } }, "sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw=="],
|
||||||
|
|
||||||
|
"@types/esrecurse": ["@types/esrecurse@4.3.1", "", {}, "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw=="],
|
||||||
|
|
||||||
|
"@types/estree": ["@types/estree@1.0.9", "", {}, "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg=="],
|
||||||
|
|
||||||
"@types/fs-extra": ["@types/fs-extra@9.0.13", "", { "dependencies": { "@types/node": "*" } }, "sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA=="],
|
"@types/fs-extra": ["@types/fs-extra@9.0.13", "", { "dependencies": { "@types/node": "*" } }, "sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA=="],
|
||||||
|
|
||||||
"@types/http-cache-semantics": ["@types/http-cache-semantics@4.2.0", "", {}, "sha512-L3LgimLHXtGkWikKnsPg0/VFx9OGZaC+eN1u4r+OB1XRqH3meBIAVC2zr1WdMH+RHmnRkqliQAOHNJ/E0j/e0Q=="],
|
"@types/http-cache-semantics": ["@types/http-cache-semantics@4.2.0", "", {}, "sha512-L3LgimLHXtGkWikKnsPg0/VFx9OGZaC+eN1u4r+OB1XRqH3meBIAVC2zr1WdMH+RHmnRkqliQAOHNJ/E0j/e0Q=="],
|
||||||
|
|
||||||
|
"@types/json-schema": ["@types/json-schema@7.0.15", "", {}, "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="],
|
||||||
|
|
||||||
"@types/keyv": ["@types/keyv@3.1.4", "", { "dependencies": { "@types/node": "*" } }, "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg=="],
|
"@types/keyv": ["@types/keyv@3.1.4", "", { "dependencies": { "@types/node": "*" } }, "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg=="],
|
||||||
|
|
||||||
"@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="],
|
"@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="],
|
||||||
@@ -194,15 +231,19 @@
|
|||||||
|
|
||||||
"abbrev": ["abbrev@4.0.0", "", {}, "sha512-a1wflyaL0tHtJSmLSOVybYhy22vRih4eduhhrkcjgrWGnRfrZtovJ2FRjxuTtkkj47O/baf0R86QU5OuYpz8fA=="],
|
"abbrev": ["abbrev@4.0.0", "", {}, "sha512-a1wflyaL0tHtJSmLSOVybYhy22vRih4eduhhrkcjgrWGnRfrZtovJ2FRjxuTtkkj47O/baf0R86QU5OuYpz8fA=="],
|
||||||
|
|
||||||
|
"acorn": ["acorn@8.16.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw=="],
|
||||||
|
|
||||||
|
"acorn-jsx": ["acorn-jsx@5.3.2", "", { "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ=="],
|
||||||
|
|
||||||
"agent-base": ["agent-base@6.0.2", "", { "dependencies": { "debug": "4" } }, "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ=="],
|
"agent-base": ["agent-base@6.0.2", "", { "dependencies": { "debug": "4" } }, "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ=="],
|
||||||
|
|
||||||
"ajv": ["ajv@8.20.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA=="],
|
"ajv": ["ajv@6.14.0", "", { "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" } }, "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw=="],
|
||||||
|
|
||||||
"ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
|
"ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
|
||||||
|
|
||||||
"ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],
|
"ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],
|
||||||
|
|
||||||
"app-builder-lib": ["app-builder-lib@26.16.1", "", { "dependencies": { "@electron/asar": "3.4.1", "@electron/fuses": "^1.8.0", "@electron/get": "^3.0.0", "@electron/notarize": "2.5.0", "@electron/osx-sign": "1.3.3", "@electron/rebuild": "^4.0.4", "@electron/universal": "2.0.3", "@malept/flatpak-bundler": "^0.4.0", "@noble/hashes": "^1.8.0", "@peculiar/webcrypto": "^1.7.1", "@types/fs-extra": "9.0.13", "ajv": "^8.18.0", "asn1js": "^3.0.10", "async-exit-hook": "^2.0.1", "builder-util": "26.16.0", "builder-util-runtime": "9.7.0", "chromium-pickle-js": "^0.2.0", "ci-info": "4.3.1", "debug": "^4.3.4", "dotenv": "^16.4.5", "dotenv-expand": "^11.0.6", "ejs": "^3.1.8", "electron-publish": "26.16.0", "fs-extra": "^10.1.0", "hosted-git-info": "^4.1.0", "isbinaryfile": "^5.0.0", "jiti": "^2.4.2", "js-yaml": "^4.1.0", "json5": "^2.2.3", "lazy-val": "^1.0.5", "minimatch": "^10.2.5", "pkijs": "^3.4.0", "plist": "3.1.0", "proper-lockfile": "^4.1.2", "resedit": "^1.7.0", "semver": "~7.7.3", "tar": "^7.5.7", "temp-file": "^3.4.0", "tiny-async-pool": "1.3.0", "unzipper": "^0.12.3", "which": "^5.0.0" }, "peerDependencies": { "dmg-builder": "26.16.1", "electron-builder-squirrel-windows": "26.16.1" } }, "sha512-FhaO6YOup01ZfQW0Z6gt3AyukJjv1gW4uFK47jTgwcHZKqyN/fSlK2LqPf9tAeZYLP2bRJLDzeOkRImsw2X4Pg=="],
|
"app-builder-lib": ["app-builder-lib@26.15.3", "", { "dependencies": { "@electron/asar": "3.4.1", "@electron/fuses": "^1.8.0", "@electron/get": "^3.0.0", "@electron/notarize": "2.5.0", "@electron/osx-sign": "1.3.3", "@electron/rebuild": "^4.0.4", "@electron/universal": "2.0.3", "@malept/flatpak-bundler": "^0.4.0", "@noble/hashes": "^2.2.0", "@peculiar/webcrypto": "^1.7.1", "@types/fs-extra": "9.0.13", "ajv": "^8.18.0", "asn1js": "^3.0.10", "async-exit-hook": "^2.0.1", "builder-util": "26.15.3", "builder-util-runtime": "9.7.0", "chromium-pickle-js": "^0.2.0", "ci-info": "4.3.1", "debug": "^4.3.4", "dotenv": "^16.4.5", "dotenv-expand": "^11.0.6", "ejs": "^3.1.8", "electron-publish": "26.15.3", "fs-extra": "^10.1.0", "hosted-git-info": "^4.1.0", "isbinaryfile": "^5.0.0", "jiti": "^2.4.2", "js-yaml": "^4.1.0", "json5": "^2.2.3", "lazy-val": "^1.0.5", "minimatch": "^10.2.5", "pkijs": "^3.4.0", "plist": "3.1.0", "proper-lockfile": "^4.1.2", "resedit": "^1.7.0", "semver": "~7.7.3", "tar": "^7.5.7", "temp-file": "^3.4.0", "tiny-async-pool": "1.3.0", "unzipper": "^0.12.3", "which": "^5.0.0" }, "peerDependencies": { "dmg-builder": "26.15.3", "electron-builder-squirrel-windows": "26.15.3" } }, "sha512-2VnyWkqsP5v5XbBhL3tD5Syx8iNPBYsoU7kY4S2fz7wg8Rj/nztWKCUzGKaFRTv0Xwf3/H058CR1Kvtd/3lRow=="],
|
||||||
|
|
||||||
"argparse": ["argparse@2.0.1", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="],
|
"argparse": ["argparse@2.0.1", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="],
|
||||||
|
|
||||||
@@ -218,7 +259,7 @@
|
|||||||
|
|
||||||
"aws4": ["aws4@1.13.2", "", {}, "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw=="],
|
"aws4": ["aws4@1.13.2", "", {}, "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw=="],
|
||||||
|
|
||||||
"axios": ["axios@1.20.0", "", { "dependencies": { "follow-redirects": "^1.16.0", "form-data": "^4.0.6", "https-proxy-agent": "^5.0.1", "proxy-from-env": "^2.1.0" } }, "sha512-r8aOh8j9cGKpgQAqpzrUHnSIc6a59Y3Xf/cv8sy1DrHCkZHzQGEuoq1tARk6qSyDdtQGSDgpb9kFlruzPvrgwg=="],
|
"axios": ["axios@1.18.1", "", { "dependencies": { "follow-redirects": "^1.16.0", "form-data": "^4.0.5", "https-proxy-agent": "^5.0.1", "proxy-from-env": "^2.1.0" } }, "sha512-3nTvFlvpn9Zu/RkHUqtc7/+al4UpRW5az71ap5zccp6e8RAYEzhMTecX8Dz1wWDYrPpUoB1HAQEGEAEvUr7S9g=="],
|
||||||
|
|
||||||
"balanced-match": ["balanced-match@4.0.4", "", {}, "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA=="],
|
"balanced-match": ["balanced-match@4.0.4", "", {}, "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA=="],
|
||||||
|
|
||||||
@@ -228,11 +269,11 @@
|
|||||||
|
|
||||||
"boolean": ["boolean@3.2.0", "", {}, "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw=="],
|
"boolean": ["boolean@3.2.0", "", {}, "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw=="],
|
||||||
|
|
||||||
"brace-expansion": ["brace-expansion@5.0.11", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-awigjhi6cLTh90bdw6+QJ9CtmJmyYhEIi70iCbc8Rozn04Fw9FeQIBjv/E22FFGuCGx1bLJyUfB64x/szUSXUg=="],
|
"brace-expansion": ["brace-expansion@5.0.9", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg=="],
|
||||||
|
|
||||||
"buffer-from": ["buffer-from@1.1.2", "", {}, "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="],
|
"buffer-from": ["buffer-from@1.1.2", "", {}, "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="],
|
||||||
|
|
||||||
"builder-util": ["builder-util@26.16.0", "", { "dependencies": { "@types/debug": "^4.1.6", "builder-util-runtime": "9.7.0", "chalk": "^4.1.2", "cross-spawn": "^7.0.6", "debug": "^4.3.4", "fs-extra": "^10.1.0", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.0", "js-yaml": "^4.1.0", "sanitize-filename": "^1.6.3", "source-map-support": "^0.5.19", "stat-mode": "^1.0.0", "temp-file": "^3.4.0", "tiny-async-pool": "1.3.0" } }, "sha512-RLyJhB7Si3YkzKR9ubQslWuXW3Vhs3CGe1i+SeixBZ0qTd1mk3XBmssvY22TlB6CS5blyko8Gu1JzpYk8UkYAg=="],
|
"builder-util": ["builder-util@26.15.3", "", { "dependencies": { "@types/debug": "^4.1.6", "builder-util-runtime": "9.7.0", "chalk": "^4.1.2", "cross-spawn": "^7.0.6", "debug": "^4.3.4", "fs-extra": "^10.1.0", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.0", "js-yaml": "^4.1.0", "sanitize-filename": "^1.6.3", "source-map-support": "^0.5.19", "stat-mode": "^1.0.0", "temp-file": "^3.4.0", "tiny-async-pool": "1.3.0" } }, "sha512-q2hn7Mbo2nFNkVekPiHFx6Nfo3hURmES3tfBn+k5Pqxl2RkmP3QGqZUhH/q9Pch/4G05NRhPjDlVj1O8q4Txvw=="],
|
||||||
|
|
||||||
"builder-util-runtime": ["builder-util-runtime@9.7.0", "", { "dependencies": { "debug": "^4.3.4", "sax": "^1.2.4" } }, "sha512-g/kR520giAFYkSXTzcmF3kqQq7wi8F6N6SzeDgZrqTBN+VHdmgWOyTdD1yD7AATDId/yXLvuP34CxW46/BwCdw=="],
|
"builder-util-runtime": ["builder-util-runtime@9.7.0", "", { "dependencies": { "debug": "^4.3.4", "sax": "^1.2.4" } }, "sha512-g/kR520giAFYkSXTzcmF3kqQq7wi8F6N6SzeDgZrqTBN+VHdmgWOyTdD1yD7AATDId/yXLvuP34CxW46/BwCdw=="],
|
||||||
|
|
||||||
@@ -276,6 +317,8 @@
|
|||||||
|
|
||||||
"decompress-response": ["decompress-response@6.0.0", "", { "dependencies": { "mimic-response": "^3.1.0" } }, "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ=="],
|
"decompress-response": ["decompress-response@6.0.0", "", { "dependencies": { "mimic-response": "^3.1.0" } }, "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ=="],
|
||||||
|
|
||||||
|
"deep-is": ["deep-is@0.1.4", "", {}, "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="],
|
||||||
|
|
||||||
"defer-to-connect": ["defer-to-connect@2.0.1", "", {}, "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg=="],
|
"defer-to-connect": ["defer-to-connect@2.0.1", "", {}, "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg=="],
|
||||||
|
|
||||||
"define-data-property": ["define-data-property@1.1.4", "", { "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", "gopd": "^1.0.1" } }, "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A=="],
|
"define-data-property": ["define-data-property@1.1.4", "", { "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", "gopd": "^1.0.1" } }, "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A=="],
|
||||||
@@ -292,7 +335,7 @@
|
|||||||
|
|
||||||
"discord-api-types": ["discord-api-types@0.38.49", "", {}, "sha512-XnqcWmnFZFAE8ZM8SHAw9DIV8D3Or00rMQ8iQLotrEA2PmXhl+ykaf6L6q4l474hrSUH1JaYcv+iOMRWp2p6Tg=="],
|
"discord-api-types": ["discord-api-types@0.38.49", "", {}, "sha512-XnqcWmnFZFAE8ZM8SHAw9DIV8D3Or00rMQ8iQLotrEA2PmXhl+ykaf6L6q4l474hrSUH1JaYcv+iOMRWp2p6Tg=="],
|
||||||
|
|
||||||
"dmg-builder": ["dmg-builder@26.16.1", "", { "dependencies": { "app-builder-lib": "26.16.1", "builder-util": "26.16.0", "fs-extra": "^10.1.0", "js-yaml": "^4.1.0" } }, "sha512-pnI/3Qb24Uk+rMTgIUrsVUKosVgwmBUdF8Zeb8TexOSbpq8MWc7v6l+n+FrEqVkjNZwzBN+XpDS9ENgZ/rkWAw=="],
|
"dmg-builder": ["dmg-builder@26.15.3", "", { "dependencies": { "app-builder-lib": "26.15.3", "builder-util": "26.15.3", "fs-extra": "^10.1.0", "js-yaml": "^4.1.0" } }, "sha512-O3zJUFUYHJKgzPqioHxfxzBzlSC1eXCSr79gMSBKBP5AgjjpmrydMsMLotEg9fAJF36vdUncb+4ndRNxoPdlSQ=="],
|
||||||
|
|
||||||
"dotenv": ["dotenv@16.6.1", "", {}, "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow=="],
|
"dotenv": ["dotenv@16.6.1", "", {}, "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow=="],
|
||||||
|
|
||||||
@@ -304,13 +347,13 @@
|
|||||||
|
|
||||||
"ejs": ["ejs@3.1.10", "", { "dependencies": { "jake": "^10.8.5" }, "bin": { "ejs": "bin/cli.js" } }, "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA=="],
|
"ejs": ["ejs@3.1.10", "", { "dependencies": { "jake": "^10.8.5" }, "bin": { "ejs": "bin/cli.js" } }, "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA=="],
|
||||||
|
|
||||||
"electron": ["electron@43.7.7", "", { "dependencies": { "@electron-internal/extract-zip": "^1.0.1", "@electron/get": "^5.0.0", "@types/node": "^24.9.0" }, "bin": { "electron": "cli.js", "install-electron": "install.js" } }, "sha512-y0pg+KhWLAkW2Ts2njkFFNFl3KtB1FmbUp9Te9i+R2Og2v1fcI/I6MADJ7jvnzB5UKdt+U+0EUoCnVL79xMPMA=="],
|
"electron": ["electron@42.6.0", "", { "dependencies": { "@electron-internal/extract-zip": "^1.0.1", "@electron/get": "^5.0.0", "@types/node": "^24.9.0" }, "bin": { "electron": "cli.js", "install-electron": "install.js" } }, "sha512-axGNgd+yCTg+vi1VEGrQqAj9WVWkePKwbICSAvMiT2eTaxhij9a/xhBHD6rXV8wrlW9ZfJzE5+xg752ImxrmTw=="],
|
||||||
|
|
||||||
"electron-builder": ["electron-builder@26.16.1", "", { "dependencies": { "app-builder-lib": "26.16.1", "builder-util": "26.16.0", "builder-util-runtime": "9.7.0", "chalk": "^4.1.2", "ci-info": "^4.2.0", "dmg-builder": "26.16.1", "fs-extra": "^10.1.0", "lazy-val": "^1.0.5", "simple-update-notifier": "2.0.0", "yargs": "^17.6.2" }, "bin": { "electron-builder": "./cli.js", "install-app-deps": "./install-app-deps.js" } }, "sha512-LrLK65QX5PUYYODXqp23FKrV7CILTtVY7mrJckNknO9jLNSMiqFkKbSMiDRw4CjOADMPVDdWLxY4mezOZWswxg=="],
|
"electron-builder": ["electron-builder@26.15.3", "", { "dependencies": { "app-builder-lib": "26.15.3", "builder-util": "26.15.3", "builder-util-runtime": "9.7.0", "chalk": "^4.1.2", "ci-info": "^4.2.0", "dmg-builder": "26.15.3", "fs-extra": "^10.1.0", "lazy-val": "^1.0.5", "simple-update-notifier": "2.0.0", "yargs": "^17.6.2" }, "bin": { "electron-builder": "./cli.js", "install-app-deps": "./install-app-deps.js" } }, "sha512-a1KM5heqS3gQCZzizXEI8RjJy3QVogULPdeSknt76uLDpBIW/HDGsMg/XgP0riP6PI9COsRvFITKKGDqA8fJxA=="],
|
||||||
|
|
||||||
"electron-builder-squirrel-windows": ["electron-builder-squirrel-windows@26.16.1", "", { "dependencies": { "app-builder-lib": "26.16.1", "builder-util": "26.16.0", "electron-winstaller": "5.4.0" } }, "sha512-w0y44wSaT1l6R7CAGmeHn4nHPfvzDyCAU1xJyi1w9SbPYJpYn76SmHDzqHf8Y7l91cPWTdPYBpGQtB2T5mJ08A=="],
|
"electron-builder-squirrel-windows": ["electron-builder-squirrel-windows@26.15.3", "", { "dependencies": { "app-builder-lib": "26.15.3", "builder-util": "26.15.3", "electron-winstaller": "5.4.0" } }, "sha512-Jc19XPV9y9+2bAdZPkXuVNGNIEFBq9poHC61l8Kv6FdK7DRG3+Ic0rerC0DXOaeHNz8yW0fg/JnF8GQROOF5MA=="],
|
||||||
|
|
||||||
"electron-publish": ["electron-publish@26.16.0", "", { "dependencies": { "@types/fs-extra": "^9.0.11", "aws4": "^1.13.2", "builder-util": "26.16.0", "builder-util-runtime": "9.7.0", "chalk": "^4.1.2", "form-data": "^4.0.5", "fs-extra": "^10.1.0", "lazy-val": "^1.0.5", "mime": "^2.5.2" } }, "sha512-Vt3KzQIiw9BImvNOYtndg9Mjki+tl4+1sQiC/+G5j8khWaENOJFWodiB+sUl6yyHwtd37avehskdtPw7f8y/+Q=="],
|
"electron-publish": ["electron-publish@26.15.3", "", { "dependencies": { "@types/fs-extra": "^9.0.11", "aws4": "^1.13.2", "builder-util": "26.15.3", "builder-util-runtime": "9.7.0", "chalk": "^4.1.2", "form-data": "^4.0.5", "fs-extra": "^10.1.0", "lazy-val": "^1.0.5", "mime": "^2.5.2" } }, "sha512-g/2bn8YTavY4cuS5F+jOS7zmZbXXBV8KZ8yHKfJjFPoKtzBqrpCdNPxBd3tqdBwP7BVd0lGzf7Bk2s0KesWZ4Q=="],
|
||||||
|
|
||||||
"electron-updater": ["electron-updater@6.8.9", "", { "dependencies": { "builder-util-runtime": "9.7.0", "fs-extra": "^10.1.0", "js-yaml": "^4.1.0", "lazy-val": "^1.0.5", "lodash.escaperegexp": "^4.1.2", "lodash.isequal": "^4.5.0", "semver": "~7.7.3", "tiny-typed-emitter": "^2.1.0" } }, "sha512-ZhVxM9iGONUpZGI1FxdMRgJjUFXi7AYGVa5PwKlO1tV1/4zDxQmfKpXOHVztKrd6L9rLcFjERvi1Mf2vxyTkig=="],
|
"electron-updater": ["electron-updater@6.8.9", "", { "dependencies": { "builder-util-runtime": "9.7.0", "fs-extra": "^10.1.0", "js-yaml": "^4.1.0", "lazy-val": "^1.0.5", "lodash.escaperegexp": "^4.1.2", "lodash.isequal": "^4.5.0", "semver": "~7.7.3", "tiny-typed-emitter": "^2.1.0" } }, "sha512-ZhVxM9iGONUpZGI1FxdMRgJjUFXi7AYGVa5PwKlO1tV1/4zDxQmfKpXOHVztKrd6L9rLcFjERvi1Mf2vxyTkig=="],
|
||||||
|
|
||||||
@@ -340,16 +383,44 @@
|
|||||||
|
|
||||||
"escape-string-regexp": ["escape-string-regexp@4.0.0", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="],
|
"escape-string-regexp": ["escape-string-regexp@4.0.0", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="],
|
||||||
|
|
||||||
|
"eslint": ["eslint@10.8.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.2", "@eslint/config-array": "^0.23.5", "@eslint/config-helpers": "^0.7.0", "@eslint/core": "^1.2.1", "@eslint/plugin-kit": "^0.7.2", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "ajv": "^6.14.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^9.1.2", "eslint-visitor-keys": "^5.0.1", "espree": "^11.2.0", "esquery": "^1.7.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "minimatch": "^10.2.5", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": { "eslint": "bin/eslint.js" } }, "sha512-nuKKvN+oIBO0koN7Tm7dlkmnkc21mtt0QJLwAKzjLq14y6lRTdVG36MZHJ8eQHwdJMwZbQNMlPOYedMq/oVJvQ=="],
|
||||||
|
|
||||||
|
"eslint-scope": ["eslint-scope@9.1.2", "", { "dependencies": { "@types/esrecurse": "^4.3.1", "@types/estree": "^1.0.8", "esrecurse": "^4.3.0", "estraverse": "^5.2.0" } }, "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ=="],
|
||||||
|
|
||||||
|
"eslint-visitor-keys": ["eslint-visitor-keys@5.0.1", "", {}, "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA=="],
|
||||||
|
|
||||||
|
"espree": ["espree@11.2.0", "", { "dependencies": { "acorn": "^8.16.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^5.0.1" } }, "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw=="],
|
||||||
|
|
||||||
|
"esquery": ["esquery@1.7.0", "", { "dependencies": { "estraverse": "^5.1.0" } }, "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g=="],
|
||||||
|
|
||||||
|
"esrecurse": ["esrecurse@4.3.0", "", { "dependencies": { "estraverse": "^5.2.0" } }, "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag=="],
|
||||||
|
|
||||||
|
"estraverse": ["estraverse@5.3.0", "", {}, "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA=="],
|
||||||
|
|
||||||
|
"esutils": ["esutils@2.0.3", "", {}, "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="],
|
||||||
|
|
||||||
"exponential-backoff": ["exponential-backoff@3.1.3", "", {}, "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA=="],
|
"exponential-backoff": ["exponential-backoff@3.1.3", "", {}, "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA=="],
|
||||||
|
|
||||||
"fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="],
|
"fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="],
|
||||||
|
|
||||||
"fast-uri": ["fast-uri@3.1.7", "", {}, "sha512-dOvZVzjdZdz7phd9v6jCbwxrBW3fK6n8Rc0CtdmM4bumzMnxywBYhuph6J819RRw/ku+rLbelwfMunktuzVVHg=="],
|
"fast-json-stable-stringify": ["fast-json-stable-stringify@2.1.0", "", {}, "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="],
|
||||||
|
|
||||||
|
"fast-levenshtein": ["fast-levenshtein@2.0.6", "", {}, "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw=="],
|
||||||
|
|
||||||
|
"fast-uri": ["fast-uri@3.1.6", "", {}, "sha512-7Ical1vFEMr0onbVzEDIreM22I4khW+fzyQPwvAFWBp1iwdshSZRsL4jjRvPG9JP1uiqMHRto+YU6R2/CzDz5Q=="],
|
||||||
|
|
||||||
"fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="],
|
"fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="],
|
||||||
|
|
||||||
|
"file-entry-cache": ["file-entry-cache@8.0.0", "", { "dependencies": { "flat-cache": "^4.0.0" } }, "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ=="],
|
||||||
|
|
||||||
"filelist": ["filelist@1.0.6", "", { "dependencies": { "minimatch": "^5.0.1" } }, "sha512-5giy2PkLYY1cP39p17Ech+2xlpTRL9HLspOfEgm0L6CwBXBTgsK5ou0JtzYuepxkaQ/tvhCFIJ5uXo0OrM2DxA=="],
|
"filelist": ["filelist@1.0.6", "", { "dependencies": { "minimatch": "^5.0.1" } }, "sha512-5giy2PkLYY1cP39p17Ech+2xlpTRL9HLspOfEgm0L6CwBXBTgsK5ou0JtzYuepxkaQ/tvhCFIJ5uXo0OrM2DxA=="],
|
||||||
|
|
||||||
|
"find-up": ["find-up@5.0.0", "", { "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" } }, "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng=="],
|
||||||
|
|
||||||
|
"flat-cache": ["flat-cache@4.0.1", "", { "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.4" } }, "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw=="],
|
||||||
|
|
||||||
|
"flatted": ["flatted@3.4.2", "", {}, "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA=="],
|
||||||
|
|
||||||
"follow-redirects": ["follow-redirects@1.16.0", "", {}, "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw=="],
|
"follow-redirects": ["follow-redirects@1.16.0", "", {}, "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw=="],
|
||||||
|
|
||||||
"form-data": ["form-data@4.0.6", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", "hasown": "^2.0.4", "mime-types": "^2.1.35" } }, "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ=="],
|
"form-data": ["form-data@4.0.6", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", "hasown": "^2.0.4", "mime-types": "^2.1.35" } }, "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ=="],
|
||||||
@@ -370,6 +441,8 @@
|
|||||||
|
|
||||||
"glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="],
|
"glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="],
|
||||||
|
|
||||||
|
"glob-parent": ["glob-parent@6.0.2", "", { "dependencies": { "is-glob": "^4.0.3" } }, "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A=="],
|
||||||
|
|
||||||
"global-agent": ["global-agent@3.0.0", "", { "dependencies": { "boolean": "^3.0.1", "es6-error": "^4.1.1", "matcher": "^3.0.0", "roarr": "^2.15.3", "semver": "^7.3.2", "serialize-error": "^7.0.1" } }, "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q=="],
|
"global-agent": ["global-agent@3.0.0", "", { "dependencies": { "boolean": "^3.0.1", "es6-error": "^4.1.1", "matcher": "^3.0.0", "roarr": "^2.15.3", "semver": "^7.3.2", "serialize-error": "^7.0.1" } }, "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q=="],
|
||||||
|
|
||||||
"globalthis": ["globalthis@1.0.4", "", { "dependencies": { "define-properties": "^1.2.1", "gopd": "^1.0.1" } }, "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ=="],
|
"globalthis": ["globalthis@1.0.4", "", { "dependencies": { "define-properties": "^1.2.1", "gopd": "^1.0.1" } }, "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ=="],
|
||||||
@@ -394,7 +467,7 @@
|
|||||||
|
|
||||||
"hosted-git-info": ["hosted-git-info@4.1.0", "", { "dependencies": { "lru-cache": "^6.0.0" } }, "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA=="],
|
"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.3.0", "", {}, "sha512-M5t5LlJpS1UHMjvwRQVdFHvPISGeLAxNcrWuJkeGh0KxsqCHZ1O3NXZU/8x7cD0BDcGW8kapxMKTvwlqrNkHkA=="],
|
"http-cache-semantics": ["http-cache-semantics@4.2.0", "", {}, "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ=="],
|
||||||
|
|
||||||
"http-proxy-agent": ["http-proxy-agent@7.0.2", "", { "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" } }, "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig=="],
|
"http-proxy-agent": ["http-proxy-agent@7.0.2", "", { "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" } }, "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig=="],
|
||||||
|
|
||||||
@@ -402,12 +475,20 @@
|
|||||||
|
|
||||||
"https-proxy-agent": ["https-proxy-agent@5.0.1", "", { "dependencies": { "agent-base": "6", "debug": "4" } }, "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA=="],
|
"https-proxy-agent": ["https-proxy-agent@5.0.1", "", { "dependencies": { "agent-base": "6", "debug": "4" } }, "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA=="],
|
||||||
|
|
||||||
|
"ignore": ["ignore@5.3.2", "", {}, "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g=="],
|
||||||
|
|
||||||
|
"imurmurhash": ["imurmurhash@0.1.4", "", {}, "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA=="],
|
||||||
|
|
||||||
"inflight": ["inflight@1.0.6", "", { "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA=="],
|
"inflight": ["inflight@1.0.6", "", { "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA=="],
|
||||||
|
|
||||||
"inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="],
|
"inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="],
|
||||||
|
|
||||||
|
"is-extglob": ["is-extglob@2.1.1", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="],
|
||||||
|
|
||||||
"is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="],
|
"is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="],
|
||||||
|
|
||||||
|
"is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="],
|
||||||
|
|
||||||
"isarray": ["isarray@1.0.0", "", {}, "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="],
|
"isarray": ["isarray@1.0.0", "", {}, "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="],
|
||||||
|
|
||||||
"isbinaryfile": ["isbinaryfile@5.0.7", "", {}, "sha512-gnWD14Jh3FzS3CPhF0AxNOJ8CxqeblPTADzI38r0wt8ZyQl5edpy75myt08EG2oKvpyiqSqsx+Wkz9vtkbTqYQ=="],
|
"isbinaryfile": ["isbinaryfile@5.0.7", "", {}, "sha512-gnWD14Jh3FzS3CPhF0AxNOJ8CxqeblPTADzI38r0wt8ZyQl5edpy75myt08EG2oKvpyiqSqsx+Wkz9vtkbTqYQ=="],
|
||||||
@@ -422,7 +503,9 @@
|
|||||||
|
|
||||||
"json-buffer": ["json-buffer@3.0.1", "", {}, "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ=="],
|
"json-buffer": ["json-buffer@3.0.1", "", {}, "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ=="],
|
||||||
|
|
||||||
"json-schema-traverse": ["json-schema-traverse@1.0.0", "", {}, "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="],
|
"json-schema-traverse": ["json-schema-traverse@0.4.1", "", {}, "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="],
|
||||||
|
|
||||||
|
"json-stable-stringify-without-jsonify": ["json-stable-stringify-without-jsonify@1.0.1", "", {}, "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw=="],
|
||||||
|
|
||||||
"json-stringify-safe": ["json-stringify-safe@5.0.1", "", {}, "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA=="],
|
"json-stringify-safe": ["json-stringify-safe@5.0.1", "", {}, "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA=="],
|
||||||
|
|
||||||
@@ -438,8 +521,12 @@
|
|||||||
|
|
||||||
"lazy-val": ["lazy-val@1.0.5", "", {}, "sha512-0/BnGCCfyUMkBpeDgWihanIAF9JmZhHBgUhEqzvf+adhNGLoP6TaiI5oF8oyb3I45P+PcnrqihSf01M0l0G5+Q=="],
|
"lazy-val": ["lazy-val@1.0.5", "", {}, "sha512-0/BnGCCfyUMkBpeDgWihanIAF9JmZhHBgUhEqzvf+adhNGLoP6TaiI5oF8oyb3I45P+PcnrqihSf01M0l0G5+Q=="],
|
||||||
|
|
||||||
|
"levn": ["levn@0.4.1", "", { "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" } }, "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ=="],
|
||||||
|
|
||||||
"libsql": ["libsql@0.5.28", "", { "dependencies": { "@neon-rs/load": "^0.0.4", "detect-libc": "2.0.2" }, "optionalDependencies": { "@libsql/darwin-arm64": "0.5.28", "@libsql/darwin-x64": "0.5.28", "@libsql/linux-arm-gnueabihf": "0.5.28", "@libsql/linux-arm-musleabihf": "0.5.28", "@libsql/linux-arm64-gnu": "0.5.28", "@libsql/linux-arm64-musl": "0.5.28", "@libsql/linux-x64-gnu": "0.5.28", "@libsql/linux-x64-musl": "0.5.28", "@libsql/win32-x64-msvc": "0.5.28" }, "os": [ "linux", "win32", "darwin", ], "cpu": [ "arm", "x64", "arm64", ] }, "sha512-wKqx9FgtPcKHdPfR/Kfm0gejsnbuf8zV+ESPmltFvsq5uXwdeN9fsWn611DmqrdXj1e94NkARcMA2f1syiAqOg=="],
|
"libsql": ["libsql@0.5.28", "", { "dependencies": { "@neon-rs/load": "^0.0.4", "detect-libc": "2.0.2" }, "optionalDependencies": { "@libsql/darwin-arm64": "0.5.28", "@libsql/darwin-x64": "0.5.28", "@libsql/linux-arm-gnueabihf": "0.5.28", "@libsql/linux-arm-musleabihf": "0.5.28", "@libsql/linux-arm64-gnu": "0.5.28", "@libsql/linux-arm64-musl": "0.5.28", "@libsql/linux-x64-gnu": "0.5.28", "@libsql/linux-x64-musl": "0.5.28", "@libsql/win32-x64-msvc": "0.5.28" }, "os": [ "linux", "win32", "darwin", ], "cpu": [ "arm", "x64", "arm64", ] }, "sha512-wKqx9FgtPcKHdPfR/Kfm0gejsnbuf8zV+ESPmltFvsq5uXwdeN9fsWn611DmqrdXj1e94NkARcMA2f1syiAqOg=="],
|
||||||
|
|
||||||
|
"locate-path": ["locate-path@6.0.0", "", { "dependencies": { "p-locate": "^5.0.0" } }, "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw=="],
|
||||||
|
|
||||||
"lodash": ["lodash@4.18.0", "", {}, "sha512-l1mfj2atMqndAHI3ls7XqPxEjV2J9ZkcNyHpoZA3r2T1LLwDB69jgkMWh71YKwhBbK0G2f4WSn05ahmQXVxupA=="],
|
"lodash": ["lodash@4.18.0", "", {}, "sha512-l1mfj2atMqndAHI3ls7XqPxEjV2J9ZkcNyHpoZA3r2T1LLwDB69jgkMWh71YKwhBbK0G2f4WSn05ahmQXVxupA=="],
|
||||||
|
|
||||||
"lodash.escaperegexp": ["lodash.escaperegexp@4.1.2", "", {}, "sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw=="],
|
"lodash.escaperegexp": ["lodash.escaperegexp@4.1.2", "", {}, "sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw=="],
|
||||||
@@ -476,6 +563,8 @@
|
|||||||
|
|
||||||
"ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="],
|
"ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="],
|
||||||
|
|
||||||
|
"natural-compare": ["natural-compare@1.4.0", "", {}, "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw=="],
|
||||||
|
|
||||||
"node-abi": ["node-abi@4.28.0", "", { "dependencies": { "semver": "^7.6.3" } }, "sha512-Qfp5XZL1cJDOabOT8H5gnqMTmM4NjvYzHp4I/Kt/Sl76OVkOBBHRFlPspGV0hYvMoqQsypFjT/Yp7Km0beXW9g=="],
|
"node-abi": ["node-abi@4.28.0", "", { "dependencies": { "semver": "^7.6.3" } }, "sha512-Qfp5XZL1cJDOabOT8H5gnqMTmM4NjvYzHp4I/Kt/Sl76OVkOBBHRFlPspGV0hYvMoqQsypFjT/Yp7Km0beXW9g=="],
|
||||||
|
|
||||||
"node-api-version": ["node-api-version@0.2.1", "", { "dependencies": { "semver": "^7.3.5" } }, "sha512-2xP/IGGMmmSQpI1+O/k72jF/ykvZ89JeuKX3TLJAYPDVLUalrshrLHkeVcCCZqG/eEa635cr8IBYzgnDvM2O8Q=="],
|
"node-api-version": ["node-api-version@0.2.1", "", { "dependencies": { "semver": "^7.3.5" } }, "sha512-2xP/IGGMmmSQpI1+O/k72jF/ykvZ89JeuKX3TLJAYPDVLUalrshrLHkeVcCCZqG/eEa635cr8IBYzgnDvM2O8Q=="],
|
||||||
@@ -492,10 +581,16 @@
|
|||||||
|
|
||||||
"once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="],
|
"once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="],
|
||||||
|
|
||||||
|
"optionator": ["optionator@0.9.4", "", { "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", "type-check": "^0.4.0", "word-wrap": "^1.2.5" } }, "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g=="],
|
||||||
|
|
||||||
"p-cancelable": ["p-cancelable@2.1.1", "", {}, "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg=="],
|
"p-cancelable": ["p-cancelable@2.1.1", "", {}, "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg=="],
|
||||||
|
|
||||||
"p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="],
|
"p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="],
|
||||||
|
|
||||||
|
"p-locate": ["p-locate@5.0.0", "", { "dependencies": { "p-limit": "^3.0.2" } }, "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw=="],
|
||||||
|
|
||||||
|
"path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="],
|
||||||
|
|
||||||
"path-is-absolute": ["path-is-absolute@1.0.1", "", {}, "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg=="],
|
"path-is-absolute": ["path-is-absolute@1.0.1", "", {}, "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg=="],
|
||||||
|
|
||||||
"path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="],
|
"path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="],
|
||||||
@@ -512,6 +607,8 @@
|
|||||||
|
|
||||||
"postject": ["postject@1.0.0-alpha.6", "", { "dependencies": { "commander": "^9.4.0" }, "bin": { "postject": "dist/cli.js" } }, "sha512-b9Eb8h2eVqNE8edvKdwqkrY6O7kAwmI8kcnBv1NScolYJbo59XUF0noFq+lxbC1yN20bmC0WBEbDC5H/7ASb0A=="],
|
"postject": ["postject@1.0.0-alpha.6", "", { "dependencies": { "commander": "^9.4.0" }, "bin": { "postject": "dist/cli.js" } }, "sha512-b9Eb8h2eVqNE8edvKdwqkrY6O7kAwmI8kcnBv1NScolYJbo59XUF0noFq+lxbC1yN20bmC0WBEbDC5H/7ASb0A=="],
|
||||||
|
|
||||||
|
"prelude-ls": ["prelude-ls@1.2.1", "", {}, "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g=="],
|
||||||
|
|
||||||
"prettier": ["prettier@3.8.1", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg=="],
|
"prettier": ["prettier@3.8.1", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg=="],
|
||||||
|
|
||||||
"proc-log": ["proc-log@6.1.0", "", {}, "sha512-iG+GYldRf2BQ0UDUAd6JQ/RwzaQy6mXmsk/IzlYyal4A4SNFw54MeH4/tLkF4I5WoWG9SQwuqWzS99jaFQHBuQ=="],
|
"proc-log": ["proc-log@6.1.0", "", {}, "sha512-iG+GYldRf2BQ0UDUAd6JQ/RwzaQy6mXmsk/IzlYyal4A4SNFw54MeH4/tLkF4I5WoWG9SQwuqWzS99jaFQHBuQ=="],
|
||||||
@@ -528,6 +625,8 @@
|
|||||||
|
|
||||||
"pump": ["pump@3.0.4", "", { "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA=="],
|
"pump": ["pump@3.0.4", "", { "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA=="],
|
||||||
|
|
||||||
|
"punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="],
|
||||||
|
|
||||||
"pvtsutils": ["pvtsutils@1.3.6", "", { "dependencies": { "tslib": "^2.8.1" } }, "sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg=="],
|
"pvtsutils": ["pvtsutils@1.3.6", "", { "dependencies": { "tslib": "^2.8.1" } }, "sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg=="],
|
||||||
|
|
||||||
"pvutils": ["pvutils@1.1.5", "", {}, "sha512-KTqnxsgGiQ6ZAzZCVlJH5eOjSnvlyEgx1m8bkRJfOhmGRqfo5KLvmAlACQkrjEtOQ4B7wF9TdSLIs9O90MX9xA=="],
|
"pvutils": ["pvutils@1.1.5", "", {}, "sha512-KTqnxsgGiQ6ZAzZCVlJH5eOjSnvlyEgx1m8bkRJfOhmGRqfo5KLvmAlACQkrjEtOQ4B7wF9TdSLIs9O90MX9xA=="],
|
||||||
@@ -612,11 +711,13 @@
|
|||||||
|
|
||||||
"tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
"tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||||
|
|
||||||
|
"type-check": ["type-check@0.4.0", "", { "dependencies": { "prelude-ls": "^1.2.1" } }, "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew=="],
|
||||||
|
|
||||||
"type-fest": ["type-fest@0.13.1", "", {}, "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg=="],
|
"type-fest": ["type-fest@0.13.1", "", {}, "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg=="],
|
||||||
|
|
||||||
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
|
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
|
||||||
|
|
||||||
"undici": ["undici@7.29.1", "", {}, "sha512-RYONW2MeafgYlkVOKYKkA/Ag7BmXqgIWCa8t1m0JcxrQg9pI9lEqRhAOruOBCbAohOa/gkCF+iPi9hrgvTzu6Q=="],
|
"undici": ["undici@7.29.0", "", {}, "sha512-IDxfleLmmbSskfWSUATiN1nfn2rDuvnMOqb5CWR92iIfojA0Ud+ulOAAEQ57LPr9rWmsreUyf5lwyao+7GNNVw=="],
|
||||||
|
|
||||||
"undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
|
"undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
|
||||||
|
|
||||||
@@ -624,6 +725,8 @@
|
|||||||
|
|
||||||
"unzipper": ["unzipper@0.12.5", "", { "dependencies": { "bluebird": "~3.7.2", "duplexer2": "~0.1.4", "fs-extra": "11.3.1", "graceful-fs": "^4.2.2", "node-int64": "^0.4.0" } }, "sha512-tXYOi9R57Uj/2Z25SOs5RRSzq886MBQj2gY8dPL+xl/kv6s6SvByoKfAtvfVeEuhntWDgjd2o9p2lb4TVPAz0A=="],
|
"unzipper": ["unzipper@0.12.5", "", { "dependencies": { "bluebird": "~3.7.2", "duplexer2": "~0.1.4", "fs-extra": "11.3.1", "graceful-fs": "^4.2.2", "node-int64": "^0.4.0" } }, "sha512-tXYOi9R57Uj/2Z25SOs5RRSzq886MBQj2gY8dPL+xl/kv6s6SvByoKfAtvfVeEuhntWDgjd2o9p2lb4TVPAz0A=="],
|
||||||
|
|
||||||
|
"uri-js": ["uri-js@4.4.1", "", { "dependencies": { "punycode": "^2.1.0" } }, "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg=="],
|
||||||
|
|
||||||
"utf8-byte-length": ["utf8-byte-length@1.0.5", "", {}, "sha512-Xn0w3MtiQ6zoz2vFyUVruaCL53O/DwUvkEeOvj+uulMm0BkUGYWmBYVyElqZaSLhY6ZD0ulfU3aBra2aVT4xfA=="],
|
"utf8-byte-length": ["utf8-byte-length@1.0.5", "", {}, "sha512-Xn0w3MtiQ6zoz2vFyUVruaCL53O/DwUvkEeOvj+uulMm0BkUGYWmBYVyElqZaSLhY6ZD0ulfU3aBra2aVT4xfA=="],
|
||||||
|
|
||||||
"util-deprecate": ["util-deprecate@1.0.2", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="],
|
"util-deprecate": ["util-deprecate@1.0.2", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="],
|
||||||
@@ -632,6 +735,8 @@
|
|||||||
|
|
||||||
"which": ["which@5.0.0", "", { "dependencies": { "isexe": "^3.1.1" }, "bin": { "node-which": "bin/which.js" } }, "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ=="],
|
"which": ["which@5.0.0", "", { "dependencies": { "isexe": "^3.1.1" }, "bin": { "node-which": "bin/which.js" } }, "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ=="],
|
||||||
|
|
||||||
|
"word-wrap": ["word-wrap@1.2.5", "", {}, "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA=="],
|
||||||
|
|
||||||
"wrap-ansi": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="],
|
"wrap-ansi": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="],
|
||||||
|
|
||||||
"wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="],
|
"wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="],
|
||||||
@@ -666,6 +771,8 @@
|
|||||||
|
|
||||||
"@electron/windows-sign/fs-extra": ["fs-extra@11.3.4", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-CTXd6rk/M3/ULNQj8FBqBWHYBVYybQ3VPBw0xGKFe3tuH7ytT6ACnvzpIQ3UZtB8yvUKC2cXn1a+x+5EVQLovA=="],
|
"@electron/windows-sign/fs-extra": ["fs-extra@11.3.4", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-CTXd6rk/M3/ULNQj8FBqBWHYBVYybQ3VPBw0xGKFe3tuH7ytT6ACnvzpIQ3UZtB8yvUKC2cXn1a+x+5EVQLovA=="],
|
||||||
|
|
||||||
|
"@eslint-community/eslint-utils/eslint-visitor-keys": ["eslint-visitor-keys@3.4.3", "", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="],
|
||||||
|
|
||||||
"@malept/flatpak-bundler/fs-extra": ["fs-extra@9.1.0", "", { "dependencies": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ=="],
|
"@malept/flatpak-bundler/fs-extra": ["fs-extra@9.1.0", "", { "dependencies": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ=="],
|
||||||
|
|
||||||
"@types/cacheable-request/@types/node": ["@types/node@25.5.0", "", { "dependencies": { "undici-types": "~7.18.0" } }, "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw=="],
|
"@types/cacheable-request/@types/node": ["@types/node@25.5.0", "", { "dependencies": { "undici-types": "~7.18.0" } }, "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw=="],
|
||||||
@@ -680,6 +787,8 @@
|
|||||||
|
|
||||||
"app-builder-lib/@electron/get": ["@electron/get@3.1.0", "", { "dependencies": { "debug": "^4.1.1", "env-paths": "^2.2.0", "fs-extra": "^8.1.0", "got": "^11.8.5", "progress": "^2.0.3", "semver": "^6.2.0", "sumchecker": "^3.0.1" }, "optionalDependencies": { "global-agent": "^3.0.0" } }, "sha512-F+nKc0xW+kVbBRhFzaMgPy3KwmuNTYX1fx6+FxxoSnNgwYX6LD7AKBTWkU0MQ6IBoe7dz069CNkR673sPAgkCQ=="],
|
"app-builder-lib/@electron/get": ["@electron/get@3.1.0", "", { "dependencies": { "debug": "^4.1.1", "env-paths": "^2.2.0", "fs-extra": "^8.1.0", "got": "^11.8.5", "progress": "^2.0.3", "semver": "^6.2.0", "sumchecker": "^3.0.1" }, "optionalDependencies": { "global-agent": "^3.0.0" } }, "sha512-F+nKc0xW+kVbBRhFzaMgPy3KwmuNTYX1fx6+FxxoSnNgwYX6LD7AKBTWkU0MQ6IBoe7dz069CNkR673sPAgkCQ=="],
|
||||||
|
|
||||||
|
"app-builder-lib/ajv": ["ajv@8.20.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA=="],
|
||||||
|
|
||||||
"app-builder-lib/ci-info": ["ci-info@4.3.1", "", {}, "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA=="],
|
"app-builder-lib/ci-info": ["ci-info@4.3.1", "", {}, "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA=="],
|
||||||
|
|
||||||
"builder-util/https-proxy-agent": ["https-proxy-agent@7.0.6", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="],
|
"builder-util/https-proxy-agent": ["https-proxy-agent@7.0.6", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="],
|
||||||
@@ -726,6 +835,8 @@
|
|||||||
|
|
||||||
"app-builder-lib/@electron/get/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="],
|
"app-builder-lib/@electron/get/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="],
|
||||||
|
|
||||||
|
"app-builder-lib/ajv/json-schema-traverse": ["json-schema-traverse@1.0.0", "", {}, "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="],
|
||||||
|
|
||||||
"builder-util/https-proxy-agent/agent-base": ["agent-base@7.1.4", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="],
|
"builder-util/https-proxy-agent/agent-base": ["agent-base@7.1.4", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="],
|
||||||
|
|
||||||
"cross-spawn/which/isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="],
|
"cross-spawn/which/isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="],
|
||||||
|
|||||||
+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.
|
- 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.
|
- 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 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.
|
- `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.
|
||||||
- `internal` fragments stay in `CHANGELOG.md` (inside a collapsed `<details>` block) but are dropped from the GitHub release notes entirely.
|
- `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.
|
- The polished `CHANGELOG.md` and `release/release-notes.md` are committed and reviewed before tagging — edit the Markdown by hand if Claude misses something.
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
type: fixed
|
||||||
|
area: anilist
|
||||||
|
|
||||||
|
- Resolving "season N" against AniList no longer lands one season short for franchises whose broadcast seasons are listed as several entries. AniList records the back half of a split cour ("… Season 2 Part 2", "… Cour 2", "第2クール") as its own sequel, and the resolver counted each as a season — so Mushoku Tensei season 3 resolved to the season 2 entry and Re:ZERO season 4 to season 3, which then drove the character dictionary and AniList progress updates to the wrong series. A sequel carrying a part or cour marker that matches the season it continues is now followed without advancing the season count, in both the relation walk and the air-order fallback. Titles are compared ignoring punctuation, and the marker is looked for in every title and synonym rather than just the display title. A wrong match cached before this fix is remembered in `character-dictionaries/anilist-resolution-cache.json` and needs removing (or overriding from the character dictionary picker) for the affected series.
|
||||||
|
- A special or OVA sitting in a franchise's sequel chain is walked through without counting as a season. Dr. STONE links STONE WARS to New World through a one-episode special, which made New World resolve as season 4 and every later season shift with it.
|
||||||
|
- An AniList rate limit or network failure while walking sequel relations is reported so the caller can retry, instead of falling through to the air-date fallback. That fallback is for a franchise with missing relation edges; running it after a failed lookup turned a transient 429 into a confidently wrong season.
|
||||||
|
- The shared title parser recognizes spelled-out episode labels (`Episode 4`, `第4話`) and a season named at the end of the title (`… Season 3`, `… 3rd Season`, `… S3`), which now fill the Season field instead of being searched for as part of the series name. The TsukiHime modal gained a Season field to match Jimaku, and seasons after the first are included in its search query so a later season's releases are actually found.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: docs
|
||||||
|
area: anime
|
||||||
|
|
||||||
|
- Added a README disclaimer stating that SubMiner hosts no content, ships no anime sources or repositories, is not affiliated with any content provider, and that users are responsible for the content they access. The anime browser docs no longer describe SubMiner as a "host" of extensions.
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
type: added
|
||||||
|
area: anime
|
||||||
|
|
||||||
|
- Added an anime browser window that searches Aniyomi extension sources, shows cover art and episode lists, and plays an episode in mpv so the overlay and mining tools attach as usual.
|
||||||
|
- Browser failures show a dismissible explanation with next steps and expandable technical details, including the bridge's error response instead of only its HTTP status.
|
||||||
|
- Added `subminer anime` and the `--anime` flag to open the browser, plus a "Browse Anime" tray entry.
|
||||||
|
- Anime extensions are read from `<userData>/anime-extensions`; drop Aniyomi `.apk` files there to add sources.
|
||||||
|
- Added a source settings tab so extensions that need configuration (server address, credentials, quality) can be set up from the browser; values persist per extension and source, and updated extension schemas replace stale saved field definitions without losing values. Older unscoped preferences are discarded once because their package ownership cannot be proven safely.
|
||||||
|
- Added an Extensions tab for adding repository URLs and installing, updating, or removing extensions in place; extensions that fail to load are listed with the reason. Repository requests time out instead of hanging, APK updates are staged before replacing the installed copy, and removing an extension refreshes the runtime even when saved credential cleanup fails while still reporting that failure.
|
||||||
|
- Browse, Extensions, and Source settings are tabs, so each one gets the full window instead of sharing it with the search results.
|
||||||
|
- Repository URLs only need to be an https URL to a `.json` index; the file name is not restricted to `index.min.json`.
|
||||||
|
- The source picker offers "All sources", which searches every installed source at once. Results stream in as each source answers, with per-source progress in the status bar. Results are tagged with their source, failures do not blank the grid, and **Load more** appends later pages without duplicating streamed entries.
|
||||||
|
- The Extensions tab opens with an Installed section listing every extension on disk with Remove, including ones added by hand or whose repository has since been removed. It compares APK and repository version codes, enables Update only for newer builds, marks current extensions as Up to date, and offers Update all when multiple updates are waiting.
|
||||||
|
- Added `anime.repos`, `anime.extensionsDir`, `anime.preferredQuality`, and `anime.defaultSource` config keys; **Set default** on an Installed row in the Extensions tab makes that source (or All sources) the one the browser opens on, and the current default carries a tag. SubMiner ships no extension repositories and performs no discovery.
|
||||||
|
- The settings app now groups Anime Browser config under an **Aniyomi** section in Integrations. A new `anime.autoOpenJimaku` option pauses newly loaded Anime Browser episodes, waits for mpv's video window to appear, closes the in-player browser, hides the standalone browser window so it is not pulled in front of mpv when the modals close, opens Jimaku with the episode details filled in, and resumes after a subtitle loads or the modal closes without overriding playback that was already paused.
|
||||||
|
- Anime playback targets Japanese audio: dub-labelled entries are skipped when the source offers an alternative, `alang` prefers Japanese, and the source's own audio and subtitle tracks are loaded into mpv (Japanese selected) instead of being discarded, so all of them can be switched from mpv's track menu.
|
||||||
|
- The primary subtitle slot stays reserved for Japanese: a source that only has, say, English subtitles gets them added with a normalized language tag (`English` → `en`) but not selected, so the regular `secondarySub` auto-load can route them to the secondary slot instead.
|
||||||
|
- HLS streams pass through a local strip proxy that removes fake image headers some hosts glue onto their video segments and gives disguised segment URLs (`.image`, `.jpg`, `.css`, and other rotating fake extensions) a media-safe local alias, so those streams play in mpv and support Anki audio and image extraction with current ffmpeg releases. Upstream responses use identity encoding so playlists remain readable for URL rewriting.
|
||||||
|
- The strip proxy retries a failed segment fetch once after a short pause and logs upstream error statuses; a host that errors on the very first fetches right after an episode resolves no longer kills the whole playback, disconnecting clients release their active upstream fetch instead of consuming the socket and bandwidth in the background, stalled response bodies retain the upstream inactivity timeout, and only origin-form requests can reach the configured local bridge.
|
||||||
|
- The strip proxy no longer forwards `Range` headers to the bridge: ffmpeg opens every HLS segment with `Range: bytes=0-`, the bridge answers some of those with 206, and a partial response bypassed the disguise strip, so whether an episode played depended on the bridge's cache state.
|
||||||
|
- A bridge that dies out from under the app (killed, crashed, or stopped mid-operation) no longer leaves the browser failing every request until an app restart: the exit is detected, surfaced in the status bar, and the bridge restarts on the next request.
|
||||||
|
- "Playing" is only reported once mpv actually configures a video output; slow streams remain loading while mpv opens them, and failed streams show mpv's error.
|
||||||
|
- The bridge bundle is downloaded from the newest upstream release that ships a bundle for the platform (skipping releases older than the oldest server SubMiner is known to work with), the same way Mangatan fetches it, so all four published bundles (macOS arm64 and x64, Linux x64, Windows x64) work without a maintainer hashing each one first.
|
||||||
|
- The Extensions tab's available list has a language chip row: pick one or more languages to narrow a repository index that otherwise lists every language it knows, or "All" to clear the filter. Rows name the language ("Japanese" instead of `ja`) and the Available heading counts what the filter leaves.
|
||||||
|
- A stream's subtitle tracks are downloaded to a temp directory and loaded into mpv as files rather than streamed from the source URL, so they can serve as the alass reference in Subsync the way Jellyfin subtitles do. The format is detected from the file's own content, a track that fails to download falls back to its URL so the episode still plays, and the directory is removed when the next episode starts or the app exits.
|
||||||
|
- An episode launched from the browser carries its series, season and episode number through the app instead of a single joined string: stats group by series (every stream previously landed in one entry named `m3u8`), rewatching reuses the existing entry, the Jimaku and TsukiHime modals prefill Title/Season/Episode from the source's own listing, AniList updates use those fields directly, and the mpv title reads `Series S03E04 - Episode Name`.
|
||||||
|
- Opening the browser shows a tray icon on every platform and — on macOS — puts the app in the Cmd+Tab switcher and Dock, so you can switch between it and mpv; the Dock icon is released again when the window closes during playback. Launching a video starts a regular SubMiner session, and in `subminer anime` standalone mode closing the window during playback no longer quits the app and kills the stream.
|
||||||
|
- The episode list has a filter box: type an episode number (`12`), a range (`12-18`), or part of an episode name to narrow a long list, with a `6 of 25` counter while it is applied. Escape inside the box clears the filter instead of leaving the detail page.
|
||||||
|
- Episodes already watched are dimmed and marked in the episode list, with a watched count in the header. The marks come from the stats history playback already writes (an episode is marked once a session passes the completion threshold), so they match the stats window and survive the stream URL changing between playbacks. They refresh when the browser window comes back to the front, and stay empty when immersion tracking is disabled.
|
||||||
|
- Right-clicking an episode opens a menu for marking it watched or unwatched by hand, plus "Mark this and N below watched/unwatched" for the episode and every episode listed under it. Sources list newest first, so a span covers the back catalogue, which is how a series watched elsewhere gets caught up. A filter never narrows what a span covers, and the status bar reports how many episodes were touched.
|
||||||
|
- Marking an episode that was never played creates its stats row, carrying the same series, season and episode fields playback would have recorded. Both stats library views join the lifetime tables, so a manual mark does not show up there as watch time nobody spent, and clearing a mark creates nothing.
|
||||||
|
- Episodes can be queued instead of replacing what is playing. Every episode row has **Play** and **Queue** buttons (clicking the row still plays now), the right-click menu offers the same two, and a queued episode shows its place in line ("next up", "#2 in queue") with a queue count and **Clear queue** in the episode header. The queue spans anime, resolves and appends each episode to mpv's real playlist as soon as it is queued while subtitle tracks cache in the background, so next/previous navigation works immediately and the next episode starts without a resolution pause when the current one ends. Queueing with nothing playing just plays.
|
||||||
|
- Added an in-player Anime Browser modal on `Ctrl+Alt+A`. The shortcut toggles it without losing its page or scroll position. It stays within the player bounds and shares the active episode, playback queue, source configuration, and watch history with the standalone browser, while each surface keeps independent search and navigation state. The modal validates its embedded page before changing overlay state, so a load setup failure leaves it closed rather than revealing a broken modal. The SubMiner logo identifies the Anime Browser in both the modal and standalone window.
|
||||||
|
- The bridge is reused from a package-manager install when one exists: on Arch the AUR `mangatan-extension-server` package (shared with Mangatan) is picked up from `/usr/share/mangatan/extension_server`, so nothing is downloaded and pacman keeps it current. `anime.bridgeDir` points SubMiner at a bundle anywhere else. `subminer-bin` lists the package as an optional dependency.
|
||||||
|
- Once the bridge is running, SubMiner checks GitHub for a newer release, including for AUR and custom installations. AUR update notices direct users to their AUR helper; custom installs get manual-update guidance. Only SubMiner-managed copies offer an **Update to vX** button. The new release is downloaded beside the running bridge, then the bridge restarts on it. The updater waits for a bridge still starting to stop and keeps the previous bundle until the replacement is active. The Extensions tab shows the bridge version, where it lives, and who updates it without describing an unchecked install as current.
|
||||||
|
- The detail page keeps its episode list when only the details call fails: the episodes render with a "Details unavailable" note and the error in the status bar, instead of an empty page.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: docs
|
||||||
|
area: anime
|
||||||
|
|
||||||
|
- Document how the anime browser waits for slow streams to start without reporting a premature playback failure.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
type: docs
|
||||||
|
area: subtitles
|
||||||
|
|
||||||
|
- Document anime stream generation, audio-only and lower-resolution extraction candidates, concurrent HLS downloads, temporary disk usage, audio cache reuse and limits, full-episode processing, supported audio tracks, and stream access limitations.
|
||||||
|
- Explain HLS source-check diagnostics and session-only audio cleanup on quit and after crashes.
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
type: added
|
||||||
|
area: subtitles
|
||||||
|
|
||||||
|
- Generate Japanese subtitles from finite HTTP/HTTPS anime episode streams in the existing generation modal. Reuse mpv's supported request headers and the anime proxy, transcribe downloaded audio locally, retain generated SRT files in the application cache, and load them only into the matching stream. Local-file generation and the launcher keep their existing behavior.
|
||||||
|
- Prepare plain HLS episodes with up to four concurrent segment downloads, preserving audio order and timing. Show download progress, cancel active requests together, and retain FFmpeg extraction for complex playlists.
|
||||||
|
- Reduce anime-stream extraction downloads by preferring separate Japanese audio or lower-resolution video when duration and sampled audio match playback. Sample HLS through short local segment windows, account for timestamp origins, retry empty original samples, and report why candidates are rejected. Selected external HTTP audio tracks are extracted directly with their playback delay preserved. Reuse verified completed audio across transcription retries and model changes within the current app session. Remove downloaded audio and working files on quit, recover abandoned sessions on startup, and preserve saved subtitles.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
type: docs
|
||||||
|
area: launcher
|
||||||
|
|
||||||
|
- Documented private-runtime launcher installation, simplified first-run setup, custom app locations, legacy launcher migration, and package-managed updates. Updated release-note download guidance for the bundled runtime and Windows launcher.
|
||||||
|
- Documented the bundled Bun runtime's MIT and LGPL licensing, where the notices live in the app, and the corresponding-source release asset. The AUR package now lists the bundled runtime licenses and installs their notices under `/usr/share/licenses/subminer-bin`, and `subminer-assets.tar.gz` includes the same notices.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
type: changed
|
||||||
|
area: launcher
|
||||||
|
|
||||||
|
- Made every installed and downloadable launcher use the Bun runtime included with SubMiner. Added a Windows `subminer.cmd` download, persistent private runtime caches for Linux and Windows, and migration for recognized legacy launchers. Deferred migrations survive overlapping update checks and remain pending when startup cannot safely refresh the launcher.
|
||||||
|
- Simplified first-run setup to a single optional launcher control, with runtime repair guidance shown only when needed.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: docs
|
||||||
|
area: subtitles
|
||||||
|
|
||||||
|
- Clarify that character dictionary sync works without a subtitle track and explain readiness and import timeouts.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: fixed
|
||||||
|
area: subtitles
|
||||||
|
|
||||||
|
- Let character dictionaries finish syncing when no Japanese subtitles are loaded. Wait for Yomitan extension readiness instead of the first processed subtitle, and report readiness failures instead of leaving the notification stuck on Checking.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: internal
|
||||||
|
area: ci
|
||||||
|
|
||||||
|
- Removed duplicate source and launcher smoke executions from the reusable quality gate while preserving every distinct test lane and failure artifact.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: internal
|
||||||
|
area: verification
|
||||||
|
|
||||||
|
- Replaced mislabeled dist source reruns with a small Electron-runtime smoke check for compiled stats startup, HTTP service, native SQLite, port conflicts, and cleanup.
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
type: changed
|
||||||
|
area: sync
|
||||||
|
|
||||||
|
- Sync uses compressed, incremental rsync transfers on compatible macOS and Linux machines, caching the last received snapshot per peer to reduce traffic on subsequent syncs. Cache helpers work through the launcher; older apps and launchers fall back to compressed transfers without an upload cache.
|
||||||
|
- Machines without compatible rsync, including Windows endpoints, automatically use compressed scp transfers.
|
||||||
|
- Rsync explicitly uses SSH and aborts transfers that exceed 30 minutes before merging.
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
type: internal
|
|
||||||
area: testing
|
|
||||||
|
|
||||||
- Added a headless end-to-end harness (`bun run test:e2e`, `bun run e2e`) that boots the built app with a real mpv, a synthetic clip, a fixture Yomitan dictionary, and a fake AnkiConnect on an offscreen display.
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: fixed
|
||||||
|
area: anki
|
||||||
|
|
||||||
|
- Added `ankiConnect.fields.wordAudio` to read word audio separately from the generated sentence-audio destination, fixing animated images that start moving immediately when `fields.audio` points to `SentenceAudio`.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: fixed
|
||||||
|
area: config
|
||||||
|
|
||||||
|
- Validate direct AnkiConnect, Kiku, and Senren settings before admitting them to runtime config, with warnings and defaults for invalid values.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
type: fixed
|
||||||
|
area: runtime
|
||||||
|
|
||||||
|
- Shutdown finishes independent media and Discord cleanup and waits for sync shutdown even when Jellyfin cleanup fails, then reports the first cleanup error.
|
||||||
|
- Tsukihime ignores delayed media-info results and errors from a closed modal session.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: fixed
|
||||||
|
area: startup
|
||||||
|
|
||||||
|
- Fixed first launch exiting on macOS when the SubMiner config directory did not yet exist by creating it before acquiring the startup lock.
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
type: fixed
|
||||||
|
area: jellyfin
|
||||||
|
|
||||||
|
- Set the mpv title before loading Jellyfin streams and reject URL-derived titles from metadata lookups, Anki source fields, Discord presence, and stats.
|
||||||
|
- Keep authenticated stream URLs out of stats identities even when playback metadata has not arrived.
|
||||||
|
- Remove previously cached credential-bearing Jellyfin stream parser metadata without changing unrelated anime metadata, watch history, or library assignments.
|
||||||
|
- Use safe media identities for persisted AniList retry keys, discard URL-derived queued searches, and skip updates and retries whose media identity is empty.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: fixed
|
||||||
|
area: overlay
|
||||||
|
|
||||||
|
- Clicking a subtitle sidebar cue releases row focus, and Space no longer seeks back to a focused cue. Enter still seeks the focused cue, and Space keeps its configured playback action.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: fixed
|
||||||
|
area: stats
|
||||||
|
|
||||||
|
- Reject malformed resource IDs and partly invalid ID lists before stats library mutations or cover backfills run.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
type: fixed
|
||||||
|
area: stats
|
||||||
|
|
||||||
|
- Stats server startup reports port conflicts without crashing SubMiner, shares concurrent startup requests, and shows in-app startup errors through configured status notifications.
|
||||||
|
- Background stop cancels pending background startup without disconnecting foreground-only dashboards. Shutdown bounds the wait for active HTTP requests and awaits tracker finalization before exit, with a deadline for forced application exit.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: fixed
|
||||||
|
area: anki
|
||||||
|
|
||||||
|
- Closing the overlay while media timing review is still loading now cancels setup and modal retries, restores playback if the review paused it, and cleans up the hidden preview player.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: fixed
|
||||||
|
area: anki
|
||||||
|
|
||||||
|
- Treat `ankiConnect.media.maxMediaDuration: 0` as unlimited for stats dashboard mining, matching overlay mining and configuration.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: fixed
|
||||||
|
area: overlay
|
||||||
|
|
||||||
|
- Keep Hyprland recovery dialogs above SubMiner windows so overlay placement updates do not cover their Wait and Close buttons.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
type: docs
|
||||||
|
area: subtitles
|
||||||
|
|
||||||
|
- Explain how dialogue generation retains uncertain audible sections, why songs may also be transcribed, how detected speech starts guide long-passage cuts to reduce early subtitles, and why each passage uses a fresh Whisper process.
|
||||||
|
- Document automatic loaded subtitle references, English dialogue preference, signs/songs filtering, fallback behavior, and the limits of reference-guided timing.
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
type: added
|
||||||
|
area: subtitles
|
||||||
|
|
||||||
|
- Generate local Japanese SRT subtitles with whisper.cpp from a standalone modal opened with Ctrl+Shift+G, the empty subtitle sidebar's generation button, or `subminer generate-subs`, with shared progress reporting, cancellation, safe output files, and automatic loading into the matching mpv video. The sidebar button hides while subtitle lines are loaded.
|
||||||
|
- Configure an existing multilingual model in Settings or choose an official multilingual model, including quantized variants, in the modal or launcher. The modal shows download sizes, speed and accuracy guidance, and a recommended starting model before explicitly downloading a verified SubMiner-managed model. Executable paths are optional overrides; empty fields find whisper-cli, ffmpeg, and ffprobe on PATH. The modal's Local tools check and the launcher name any missing executable and its setting before downloading a model or extracting audio, and generation confirms the destination directory grants write and search permissions up front.
|
||||||
|
- Optionally select Focus on spoken dialogue in the modal and use Download speech detection model to install the separate Silero model with progress and cancellation. The choice lasts for the session; a configured VAD model path sets the default. Retain uncertain audible sections so VAD rejection does not discard dialogue under music, accepting that songs may also be transcribed. Keep passages intact within Whisper's audio window, split longer passages near detected speech starts or quiet pauses with overlapping context to reduce early subtitle timing, and combine overlapping duplicate cues even when punctuation differs. Run each passage in a fresh Whisper process to prevent repeated-character output caused by state carried between files, at the cost of reloading the model per passage. Preserve original media timing and separate repeated dialogue.
|
||||||
|
- Recommend large-v3-turbo in the model picker when NVIDIA hardware and CUDA device support in the selected Whisper executable are confirmed; recommend small otherwise. Preserve configured and session model selections. Use a wider generation modal to reduce text wrapping and scrolling, while keeping it within smaller player windows.
|
||||||
|
- Automatically use an eligible embedded or external subtitle track loaded in mpv to guide long-passage cuts, preferring English dialogue and excluding tracks marked signs, songs, forced, or generated. Honor active subtitle delays, retain unreferenced audio, and fall back to audio timing when references cannot be read. Available in the overlay and launcher, with or without VAD. The launcher captures audio selection, reference tracks, and delays before model setup so playback changes during a download do not mix inputs from different times, and rejects an unverified media snapshot before using mpv's selected audio stream.
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
type: fixed
|
|
||||||
area: jellyfin
|
|
||||||
|
|
||||||
- Fixed `subminer jellyfin -p` reporting "No Jellyfin libraries found." when SubMiner was already running (for example right after `subminer jellyfin` login). The app now hands library, item, and preview-auth results to the launcher directly instead of through log files, so picker image previews work again and real errors (expired session, unreachable server) are shown instead of an empty list.
|
|
||||||
- The rofi "Jellyfin Search (optional)" step after picking a library is now a compact input box with a "Type to search, or press Enter to browse all" hint instead of a blank list.
|
|
||||||
- Playing from the terminal (`subminer jellyfin -p`) now reports watch progress to Jellyfin even when cast discovery is off, so Jellyfin remembers where you stopped and marks finished episodes as played. Previously progress was only sent while the cast connection was active.
|
|
||||||
- When `subminer jellyfin -p` has to start SubMiner itself, the app now shows its tray icon and quits when you close mpv, the same as playing a local file. Before, it had no tray icon and kept running hidden after playback. A SubMiner that was already running is still reused and left running.
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
type: docs
|
||||||
|
area: jellyfin
|
||||||
|
|
||||||
|
- Explain how Jellyfin media titles, unknown-title fallbacks, and stats identities keep stream credentials out of metadata.
|
||||||
|
- Document AniList rejection of empty media identities and the conditions for clearing cached Jellyfin parser metadata.
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
type: docs
|
|
||||||
area: jellyfin
|
|
||||||
|
|
||||||
- Corrected the Jellyfin docs: SubMiner only joins the cast menu at startup when `startupWarmups.jellyfinRemoteSession` is on (off by default) along with `jellyfin.remoteControlAutoConnect`. Otherwise tick **Jellyfin Discovery** in the tray.
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
type: added
|
|
||||||
area: subtitles
|
|
||||||
|
|
||||||
- Japanese subtitle generation now works while playing a Jellyfin episode. SubMiner reads the original file from the server, saves the subtitles to a cache folder, and loads them into mpv. Direct-play and transcoded playback are both supported.
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: added
|
||||||
|
area: jimaku
|
||||||
|
|
||||||
|
- Jimaku modal gains Anime / Live action tabs so searches can pull from Jimaku's live action catalogue instead of only anime entries (Arrow Left / Right switch tabs).
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
type: fixed
|
|
||||||
area: overlay
|
|
||||||
|
|
||||||
- Keyboard-only mode no longer swallows `h`, `l`, and the left/right arrows while a modal is open or a text field has focus, so typing into fields like the Jimaku or TsukiHime title works and no longer seeks mpv. Pressing `Ctrl/Cmd+Shift+Y` (or the controller toggle) inside a modal no longer turns on a hidden keyboard-only mode in the modal window.
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: fixed
|
||||||
|
area: overlay
|
||||||
|
|
||||||
|
- Fixed the overlay never loading (stuck on the "Overlay loading" OSD spinner) when the Yomitan content-script reload raced overlay window creation at startup, most visible when playing from the anime browser on Linux/Wayland: a hidden window stops painting after that reload, so the ready-to-show signal that gates showing the overlay never fired. Content-ready now falls back to did-finish-load after a short grace period.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: fixed
|
||||||
|
area: macos
|
||||||
|
|
||||||
|
- `subminer anime` (and `--settings` / `--sync`) now bring their window to the front on macOS. `show()`/`focus()` only reorder windows inside the app that is already active, so the window opened behind the terminal that launched it; SubMiner now activates itself when opening one. The anime browser also restores its Dock icon before showing rather than after, because the overlay's fullscreen transform leaves the app as an accessory process that macOS refuses to bring forward at all.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: docs
|
||||||
|
area: mining
|
||||||
|
|
||||||
|
- Document independent screenshot selection in media timing review.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: added
|
||||||
|
area: mining
|
||||||
|
|
||||||
|
- Choose a still screenshot independently of the audio in media timing review, with a live preview, a separate time slider, and decoded-frame stepping. Local video and seekable remote streams such as Jellyfin are supported.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: added
|
||||||
|
area: overlay
|
||||||
|
|
||||||
|
- The overlay discovers non-conflicting keyboard bindings from mpv defaults, input.conf, and loaded scripts in the background. SubMiner controls and explicitly disabled bindings take precedence. Discovered bindings stay session-only and do not appear in SubMiner's help menu.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
type: changed
|
||||||
|
area: release
|
||||||
|
|
||||||
|
- Reduced installer and unpacked app size by excluding documentation demo media, dependency source maps, TypeScript files, test and fixture directories, other development files, and unused Koffi platform binaries, and sharing the existing Japanese UI font across windows.
|
||||||
|
- Added package content checks, published size reports with release comparisons, and packaged asset/native-module smoke checks to the shared stable and prerelease build workflow. Size growth is reported without blocking releases.
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
type: docs
|
|
||||||
area: launcher
|
|
||||||
|
|
||||||
- Removed `SUBMINER_JIMAKU_API_KEY`, `SUBMINER_JIMAKU_API_KEY_COMMAND`, and `SUBMINER_JIMAKU_API_BASE_URL` from the development docs' environment variable table. The launcher never used them; set the Jimaku key with `jimaku.apiKey` / `jimaku.apiKeyCommand` in the config instead.
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
type: internal
|
|
||||||
area: cleanup
|
|
||||||
|
|
||||||
- Removed dead code: the unused launcher Jimaku client (the `SUBMINER_JIMAKU_*` env vars it read were documented but had no effect), the mpv plugin's hover-highlight module (no sender since Overlay 2.0; custom mpv scripts that still send `subminer-hover-token` or `yomipv-hover-token` are now ignored), the never-read `anilist.characterDictionary.refreshTtlHours` / `evictionPolicy` config keys, unused root dependencies (eslint, geist fonts), and a committed draft plan doc.
|
|
||||||
- Typecheck now runs with `noUnusedLocals`; removed the unused locals, imports, and the Windows overlay focus-handoff values they fed, which were computed but never used.
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
type: internal
|
|
||||||
area: overlay
|
|
||||||
|
|
||||||
- Removed 16 overlay preload/IPC methods that nothing called, plus their main-process handlers. SubMiner no longer observes mpv's `sub-text/ass` or sends every ASS line to overlay windows that never listened.
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: fixed
|
||||||
|
area: overlay
|
||||||
|
|
||||||
|
- Cancel pending Linux overlay window replacements during teardown so a delayed close callback cannot reopen the overlay.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: docs
|
||||||
|
area: config
|
||||||
|
|
||||||
|
- Clarified live-setting save feedback, mixed restart warnings, and subtitle-generation reload behavior.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
type: fixed
|
||||||
|
area: config
|
||||||
|
|
||||||
|
- Settings marked LIVE now use the same reload policy as save results, fixing false restart warnings for notifications and subtitle generation.
|
||||||
|
- Mixed saves apply live changes and list only sections with changed fields that require a restart.
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
type: fixed
|
|
||||||
area: setup
|
|
||||||
|
|
||||||
- First-run setup now labels a missing command-line launcher "Not set up" instead of "Not installed", so the AppImage catalog test no longer reads the setup window as an error screen.
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: added
|
||||||
|
area: overlay
|
||||||
|
|
||||||
|
- Select dialogue across subtitle sidebar rows and copy it without timestamps using Ctrl/Cmd+C or the Copy button. Selection keeps the excerpt in view during playback and does not seek or require mining a card.
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
type: fixed
|
|
||||||
area: overlay
|
|
||||||
|
|
||||||
- The open subtitle sidebar no longer re-fetches the whole subtitle list and re-queries mpv about 12 times a second. It polls only the current time and line, and reloads the list when the subtitle track, file, or parsed cues change (plus a slow ~2 s fallback), cutting idle sidebar IPC and renderer work during playback.
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
type: changed
|
||||||
|
breaking: true
|
||||||
|
area: stats
|
||||||
|
|
||||||
|
- Reject requests from untrusted browser origins and hosts before stats data, media, or Anki operations run, and require JSON for mutation bodies.
|
||||||
|
- Load the in-app stats overlay from the local server so it uses the same origin protection as the browser dashboard.
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
type: fixed
|
|
||||||
area: stats
|
|
||||||
|
|
||||||
- Subtitle lines recorded before halfwidth katakana widening now show fullwidth katakana in the stats dashboard (word/kanji occurrences, sentence search), and cards mined from stats history get the fullwidth sentence and word.
|
|
||||||
- Sentence search matches katakana in either width, so searching アンタ also finds older lines stored as アンタ.
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: fixed
|
||||||
|
area: subsync
|
||||||
|
|
||||||
|
- Subsync no longer fails with `Protocol "file:" not supported` on a subtitle that was dropped onto mpv. mpv reports such a track as a percent-encoded `file://` URL, which subsync read as a stream and tried to fetch over HTTP; the URL is now decoded back to its path, so both the retimed target and an alass reference work. A `file://` video path is treated as local too, which restores the video reference and ffsubsync for a dropped file.
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
type: fixed
|
||||||
|
area: subsync
|
||||||
|
|
||||||
|
- Subsync now works when mpv loaded a subtitle track from a URL, which is how Aniyomi extension streams and Jellyfin add theirs. The track is downloaded to a temporary file first — reusing mpv's own request headers, so authenticated and referer-gated hosts stay reachable — instead of being rejected with "Subtitle file not found: https://…". This applies to both the sync target and the alass reference, so a Jimaku or TsukiHime download can be retimed against a stream's own subtitles. Internal tracks of a stream also pass mpv's headers through to `ffmpeg`.
|
||||||
|
- Alass now works on tracks that arrive as WebVTT, which is what Aniyomi extension streams serve. Alass picks its parser from the file extension and has no WebVTT support, so it treated a `.vtt` reference as a video file and failed with "no audio stream in file". Both the target and the reference are rewritten as SRT for alass, keeping the cue text as-is, and the originals are left untouched.
|
||||||
|
- Leaving `subsync.alass_path`, `ffsubsync_path`, or `ffmpeg_path` empty now actually auto-discovers the binary, as the config help has always claimed. Previously it fell back to a hard-coded `/usr/bin/<tool>`, which does not exist on macOS and broke subsync for every default-config install there. Discovery searches `PATH` plus the usual install prefixes (a GUI launch inherits a minimal `PATH`) and accepts `alass-cli` as well as `alass`. An explicitly configured path is still used verbatim and never silently substituted.
|
||||||
|
- Subsync failures are written to the application log. Previously the only trace was an OSD toast that vanished after a few seconds, leaving nothing to diagnose from.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: fixed
|
||||||
|
area: subtitles
|
||||||
|
|
||||||
|
- Keep the subtitle sidebar near playback during gaps when the subtitle file has a cue starting at zero.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: docs
|
||||||
|
area: sync
|
||||||
|
|
||||||
|
- Documented compressed transfers, incremental sync cache storage, and compatibility with older peers.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: docs
|
||||||
|
area: stats
|
||||||
|
|
||||||
|
- Documented provider reassignment, merge compatibility, and TMDB credential command caching and retry cooldown.
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
type: added
|
||||||
|
area: stats
|
||||||
|
|
||||||
|
- Live-action dramas and movies in the stats Library now get posters, synopses, and titles from TMDB. Release builds include a project key, so it works out of the box; `tmdb.apiKey` (or `tmdb.apiKeyCommand`) overrides it, and is required when running from source.
|
||||||
|
- Unlinked titles that AniList cannot match are looked up on TMDB automatically when the parsed filename matches a Japanese live-action title exactly; otherwise use the new **Link to TMDB** action on a title to pick it by hand.
|
||||||
|
- Entries linked to the same TMDB title are merged into one card even when they came from different season folders, and the Library kind selector gained a Live Action option alongside Anime and YouTube.
|
||||||
|
- Provider reassignment preserves the previous link and artwork if the replacement download fails, and refreshes completion totals when the episode count changes. Merges and sync keep conflicting AniList and TMDB identities separate, and the merge dialog explains when a selection mixes the two instead of failing.
|
||||||
|
- TMDB credential commands cache successful output and wait 30 seconds before retrying failed or empty output, using the bundled key in the meantime when available.
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
type: fixed
|
|
||||||
area: overlay
|
|
||||||
|
|
||||||
- Hyprland and Sway window tracking no longer freezes the app when `hyprctl` or `swaymsg` is slow or hangs: polls now run in the background with a timeout and no longer pile up.
|
|
||||||
- The Hyprland/Sway trackers read each mpv process's command line once instead of spawning `ps` on every poll.
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
type: fixed
|
|
||||||
area: overlay
|
|
||||||
|
|
||||||
- Halfwidth katakana in subtitles (common in broadcast-derived Japanese subs, e.g. アンタ, ダキニ) now displays as normal fullwidth katakana, so lines no longer mix squashed and normal-width text. Mined sentences and stats get the fullwidth form too.
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: docs
|
||||||
|
area: anki
|
||||||
|
|
||||||
|
- Documented the separate word-audio mapping for animated-image synchronization and that existing images need regeneration to pick up the corrected freeze.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: changed
|
||||||
|
area: yomitan
|
||||||
|
|
||||||
|
- Updated bundled Yomitan with upstream 26.9.8 changes, including historical Japanese kana transformations, Ukrainian language support, and improvements to Anki duplicate searches and audio retrieval.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
type: docs
|
||||||
|
area: stats
|
||||||
|
|
||||||
|
- Document YouTube channel filtering and video statistics in the Library.
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
type: added
|
||||||
|
area: stats
|
||||||
|
|
||||||
|
- Store YouTube channels as a separate media kind and migrate existing channel entries without changing viewing history or manual video assignments, including channels created after temporarily returning to an older build.
|
||||||
|
- Add All Titles, Anime, and YouTube Library filters, identify channel pages, and keep channels out of AniList matching, season repair, and duplicate recommendations.
|
||||||
|
- Keep same-title anime and YouTube records separate in storage and sync while repairing legacy channel classification.
|
||||||
|
- Refuse merges and video moves that would mix an anime entry with a YouTube channel; the move picker and merge selection only combine entries of the same kind.
|
||||||
+22
-12
@@ -6,15 +6,6 @@
|
|||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
|
|
||||||
// ==========================================
|
|
||||||
// Subtitle Selection
|
|
||||||
// Select primary and secondary mpv subtitle tracks from the overlay.
|
|
||||||
// Hot-reload: enabling or disabling updates the session shortcut immediately.
|
|
||||||
// ==========================================
|
|
||||||
"subtitleSelection": {
|
|
||||||
"enabled": false // Use the SubMiner modal to select primary and secondary subtitle tracks. When enabled, its shortcut overrides mpv subtitle selection. Values: true | false
|
|
||||||
}, // Select primary and secondary mpv subtitle tracks from the overlay.
|
|
||||||
|
|
||||||
// ==========================================
|
// ==========================================
|
||||||
// Japanese Subtitle Generation
|
// Japanese Subtitle Generation
|
||||||
// Generate timed Japanese subtitles from local audio using whisper.cpp.
|
// Generate timed Japanese subtitles from local audio using whisper.cpp.
|
||||||
@@ -232,7 +223,6 @@
|
|||||||
"openRuntimeOptions": "CommandOrControl+Shift+O", // Accelerator that opens the runtime options modal.
|
"openRuntimeOptions": "CommandOrControl+Shift+O", // Accelerator that opens the runtime options modal.
|
||||||
"openJimaku": "Ctrl+Shift+J", // Accelerator that opens the Jimaku subtitle search modal.
|
"openJimaku": "Ctrl+Shift+J", // Accelerator that opens the Jimaku subtitle search modal.
|
||||||
"openTsukihime": "Ctrl+Shift+T", // Accelerator that opens the TsukiHime subtitle search modal (configured secondary/Japanese primary tabs).
|
"openTsukihime": "Ctrl+Shift+T", // Accelerator that opens the TsukiHime subtitle search modal (configured secondary/Japanese primary tabs).
|
||||||
"openSubtitleSelection": "g-s", // Open subtitle selection when enabled. Use g-s to press g then s. Set null to unbind.
|
|
||||||
"openSubtitleGeneration": "Ctrl+Shift+G", // Accelerator that opens the standalone Japanese subtitle generation modal.
|
"openSubtitleGeneration": "Ctrl+Shift+G", // Accelerator that opens the standalone Japanese subtitle generation modal.
|
||||||
"openSessionHelp": "CommandOrControl+Slash", // Accelerator that opens the session help / keybinding cheatsheet.
|
"openSessionHelp": "CommandOrControl+Slash", // Accelerator that opens the session help / keybinding cheatsheet.
|
||||||
"openControllerSelect": "Alt+C", // Accelerator that opens the controller selection and learn-mode modal.
|
"openControllerSelect": "Alt+C", // Accelerator that opens the controller selection and learn-mode modal.
|
||||||
@@ -369,6 +359,12 @@
|
|||||||
"__playlist-browser-open"
|
"__playlist-browser-open"
|
||||||
] // Command setting.
|
] // Command setting.
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"key": "Ctrl+Alt+KeyA", // Key setting.
|
||||||
|
"command": [
|
||||||
|
"__anime-browser-open"
|
||||||
|
] // Command setting.
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"key": "Ctrl+Shift+KeyH", // Key setting.
|
"key": "Ctrl+Shift+KeyH", // Key setting.
|
||||||
"command": [
|
"command": [
|
||||||
@@ -646,6 +642,21 @@
|
|||||||
} // Lapis kiku setting.
|
} // Lapis kiku setting.
|
||||||
}, // Automatic Anki updates and media generation options.
|
}, // Automatic Anki updates and media generation options.
|
||||||
|
|
||||||
|
// ==========================================
|
||||||
|
// Anime Browser
|
||||||
|
// Anime browser sources. SubMiner ships no extension repositories and bundles no sources;
|
||||||
|
// add a repository index URL here (or drop .apk files in the extensions directory) to have any.
|
||||||
|
// Hot-reload: autoOpenJimaku applies to the next episode; other anime changes apply the next time the anime browser opens.
|
||||||
|
// ==========================================
|
||||||
|
"anime": {
|
||||||
|
"autoOpenJimaku": false, // Pause Anime Browser playback and open Jimaku when an episode loads. Playback resumes after a subtitle loads or the modal closes only when auto-open initiated the pause. Values: true | false
|
||||||
|
"extensionsDir": "", // Directory holding Aniyomi extension .apk files. Empty uses <userData>/anime-extensions.
|
||||||
|
"repos": [], // Extension repository index URLs (any https .json index, e.g. https://.../index.min.json). Empty by default; SubMiner ships no repositories.
|
||||||
|
"preferredQuality": "", // Preferred stream quality label, matched as a substring (for example: 1080). Empty uses the source order.
|
||||||
|
"defaultSource": "", // Source the Anime Browser selects when it opens: a source id (<package>:<source>) or "all" for every installed source. Empty selects the first installed source. "Set default" in the Extensions tab writes this value.
|
||||||
|
"bridgeDir": "" // Directory holding an M-Extension-Server bundle (java runtime plus server jar) to run instead of the copy SubMiner downloads. Empty checks the package-manager install (Arch: mangatan-extension-server), then <userData>/anime-bridge.
|
||||||
|
}, // Anime browser sources. SubMiner ships no extension repositories and bundles no sources;
|
||||||
|
|
||||||
// ==========================================
|
// ==========================================
|
||||||
// Jimaku
|
// Jimaku
|
||||||
// Jimaku API configuration and defaults.
|
// Jimaku API configuration and defaults.
|
||||||
@@ -682,14 +693,13 @@
|
|||||||
// ==========================================
|
// ==========================================
|
||||||
// YouTube Playback Settings
|
// YouTube Playback Settings
|
||||||
// Defaults for managed subtitle language preferences and YouTube subtitle loading.
|
// Defaults for managed subtitle language preferences and YouTube subtitle loading.
|
||||||
// Hot-reload: primarySubLanguages and subtitleSource apply to the next YouTube subtitle load.
|
// Hot-reload: primarySubLanguages applies to the next YouTube subtitle load.
|
||||||
// ==========================================
|
// ==========================================
|
||||||
"youtube": {
|
"youtube": {
|
||||||
"primarySubLanguages": [
|
"primarySubLanguages": [
|
||||||
"ja",
|
"ja",
|
||||||
"jpn"
|
"jpn"
|
||||||
], // Comma-separated primary subtitle language priority for managed subtitle auto-selection.
|
], // Comma-separated primary subtitle language priority for managed subtitle auto-selection.
|
||||||
"subtitleSource": "youtube", // Where primary YouTube subtitles come from. Whisper transcribes the audio locally using the subtitleGeneration settings. Values: youtube | whisper
|
|
||||||
"mediaCache": {
|
"mediaCache": {
|
||||||
"mode": "direct", // How YouTube card audio/images are extracted. Values: direct | background
|
"mode": "direct", // How YouTube card audio/images are extracted. Values: direct | background
|
||||||
"maxHeight": 720 // Maximum video height downloaded for the YouTube background media cache. Set to 0 for unlimited.
|
"maxHeight": 720 // Maximum video height downloaded for the YouTube background media cache. Set to 0 for unlimited.
|
||||||
|
|||||||
+194
-13
@@ -1,6 +1,6 @@
|
|||||||
import { spawnSync } from 'node:child_process';
|
import { spawnSync } from 'node:child_process';
|
||||||
import { existsSync } from 'node:fs';
|
import { existsSync, readFileSync, statSync } from 'node:fs';
|
||||||
import { join } from 'node:path';
|
import { extname, join, posix, resolve, sep } from 'node:path';
|
||||||
import type { DefaultTheme, HeadConfig, TransformContext, UserConfig } from 'vitepress';
|
import type { DefaultTheme, HeadConfig, TransformContext, UserConfig } from 'vitepress';
|
||||||
|
|
||||||
const DOCS_HOSTNAME = 'https://docs.subminer.moe';
|
const DOCS_HOSTNAME = 'https://docs.subminer.moe';
|
||||||
@@ -14,6 +14,12 @@ const PLAUSIBLE_INIT_SCRIPT = [
|
|||||||
|
|
||||||
type DocsChannel = 'stable-root' | 'stable-archive' | 'main';
|
type DocsChannel = 'stable-root' | 'stable-archive' | 'main';
|
||||||
|
|
||||||
|
type VersionManifest = {
|
||||||
|
latestStable: string;
|
||||||
|
channels: Array<{ label: string; path: string }>;
|
||||||
|
versions: Array<{ version: string; path: string }>;
|
||||||
|
};
|
||||||
|
|
||||||
function optionalEnv(value: string | undefined): string | undefined {
|
function optionalEnv(value: string | undefined): string | undefined {
|
||||||
return value && value !== 'undefined' ? value : undefined;
|
return value && value !== 'undefined' ? value : undefined;
|
||||||
}
|
}
|
||||||
@@ -26,6 +32,17 @@ const docsSourceDir = optionalEnv(process.env.SUBMINER_DOCS_SOURCE_DIR) ?? proce
|
|||||||
const repoDocsDir = optionalEnv(process.env.SUBMINER_DOCS_REPO_DIR) ?? process.cwd();
|
const repoDocsDir = optionalEnv(process.env.SUBMINER_DOCS_REPO_DIR) ?? process.cwd();
|
||||||
const channel = normalizeChannel(optionalEnv(process.env.SUBMINER_DOCS_CHANNEL));
|
const channel = normalizeChannel(optionalEnv(process.env.SUBMINER_DOCS_CHANNEL));
|
||||||
const docsVersion = optionalEnv(process.env.SUBMINER_DOCS_VERSION);
|
const docsVersion = optionalEnv(process.env.SUBMINER_DOCS_VERSION);
|
||||||
|
const latestStable = optionalEnv(process.env.SUBMINER_DOCS_LATEST_STABLE) ?? 'v0.18.0';
|
||||||
|
const versionManifest = parseVersionManifest(process.env.SUBMINER_DOCS_VERSION_MANIFEST);
|
||||||
|
const versionLinkOrigin =
|
||||||
|
optionalEnv(process.env.SUBMINER_DOCS_VERSION_LINK_ORIGIN) ?? 'production';
|
||||||
|
|
||||||
|
function getLocalArchiveDir(): string {
|
||||||
|
return resolve(
|
||||||
|
optionalEnv(process.env.SUBMINER_DOCS_LOCAL_ARCHIVE_DIR) ??
|
||||||
|
join(docsSourceDir, '..', '.tmp/docs-versioned-site'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function normalizeBase(value: string): string {
|
function normalizeBase(value: string): string {
|
||||||
if (!value || value === '/') return '/';
|
if (!value || value === '/') return '/';
|
||||||
@@ -37,6 +54,21 @@ function normalizeChannel(value: string | undefined): DocsChannel {
|
|||||||
return 'stable-root';
|
return 'stable-root';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function parseVersionManifest(value: string | undefined): VersionManifest {
|
||||||
|
if (!value || value === 'undefined') {
|
||||||
|
return {
|
||||||
|
latestStable,
|
||||||
|
channels: [
|
||||||
|
{ label: 'Latest stable', path: '/' },
|
||||||
|
{ label: 'main', path: '/main/' },
|
||||||
|
],
|
||||||
|
versions: [{ version: latestStable, path: `/v/${latestStable.replace(/^v/, '')}/` }],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return JSON.parse(value) as VersionManifest;
|
||||||
|
}
|
||||||
|
|
||||||
function withDocsBase(path: string): string {
|
function withDocsBase(path: string): string {
|
||||||
if (/^[a-z]+:\/\//i.test(path)) return path;
|
if (/^[a-z]+:\/\//i.test(path)) return path;
|
||||||
const normalizedPath = path.startsWith('/') ? path : `/${path}`;
|
const normalizedPath = path.startsWith('/') ? path : `/${path}`;
|
||||||
@@ -132,16 +164,137 @@ function filterSidebar(items: DefaultTheme.SidebarItem[]): DefaultTheme.SidebarI
|
|||||||
.filter((item): item is DefaultTheme.SidebarItem => Boolean(item));
|
.filter((item): item is DefaultTheme.SidebarItem => Boolean(item));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Version navigation targets other builds (root, `/main/`, `/versions`), so it links to
|
function versionSwitchLink(path: string): string {
|
||||||
// production by absolute URL: base-relative links would stay inside this build, and
|
if (/^[a-z]+:\/\//i.test(path)) return path;
|
||||||
// `target: '_self'` makes the VitePress router do a full page load. The list is
|
const normalizedPath = path.startsWith('/') ? path : `/${path}`;
|
||||||
// deliberately static; the full release list lives on the root-only `/versions` page
|
if (versionLinkOrigin === 'local') return localVersionSwitchLink(normalizedPath);
|
||||||
// so frozen `/v/<version>/` archives never need a rebuild when a new tag ships.
|
return `${DOCS_HOSTNAME}${normalizedPath}`;
|
||||||
const versionItems: DefaultTheme.NavItemWithLink[] = [
|
}
|
||||||
{ text: 'Latest stable', link: `${DOCS_HOSTNAME}/` },
|
|
||||||
{ text: 'main', link: `${DOCS_HOSTNAME}/main/` },
|
function localVersionSwitchLink(path: string): string {
|
||||||
{ text: 'All versions', link: `${DOCS_HOSTNAME}/versions` },
|
if (base === '/') return path;
|
||||||
].map((item) => ({ ...item, target: '_self', noIcon: true }));
|
|
||||||
|
const basePath = base.replace(/\/$/, '');
|
||||||
|
const targetPath = path === '/' ? '/' : path.replace(/\/$/, '');
|
||||||
|
const relativePath = posix.relative(basePath, targetPath) || '.';
|
||||||
|
|
||||||
|
return path.endsWith('/') ? `${relativePath}/` : relativePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
function shouldHandleLocalVersionRoute(pathname: string): boolean {
|
||||||
|
if (base !== '/' || channel !== 'stable-root') return false;
|
||||||
|
return /^\/main(?:\/|$)/.test(pathname) || /^\/v\/[^/]+(?:\/|$)/.test(pathname);
|
||||||
|
}
|
||||||
|
|
||||||
|
function contentTypeForPath(path: string): string {
|
||||||
|
switch (extname(path)) {
|
||||||
|
case '.css':
|
||||||
|
return 'text/css; charset=utf-8';
|
||||||
|
case '.gif':
|
||||||
|
return 'image/gif';
|
||||||
|
case '.ico':
|
||||||
|
return 'image/x-icon';
|
||||||
|
case '.jpg':
|
||||||
|
case '.jpeg':
|
||||||
|
return 'image/jpeg';
|
||||||
|
case '.js':
|
||||||
|
case '.mjs':
|
||||||
|
return 'text/javascript; charset=utf-8';
|
||||||
|
case '.json':
|
||||||
|
case '.jsonc':
|
||||||
|
return 'application/json; charset=utf-8';
|
||||||
|
case '.mp4':
|
||||||
|
return 'video/mp4';
|
||||||
|
case '.png':
|
||||||
|
return 'image/png';
|
||||||
|
case '.svg':
|
||||||
|
return 'image/svg+xml';
|
||||||
|
case '.ttf':
|
||||||
|
return 'font/ttf';
|
||||||
|
case '.webm':
|
||||||
|
return 'video/webm';
|
||||||
|
case '.woff':
|
||||||
|
return 'font/woff';
|
||||||
|
case '.woff2':
|
||||||
|
return 'font/woff2';
|
||||||
|
case '.xml':
|
||||||
|
return 'application/xml; charset=utf-8';
|
||||||
|
default:
|
||||||
|
return 'text/html; charset=utf-8';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function isFile(path: string): boolean {
|
||||||
|
try {
|
||||||
|
return statSync(path).isFile();
|
||||||
|
} catch {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function archiveFileForPathname(pathname: string): string | null {
|
||||||
|
if (!shouldHandleLocalVersionRoute(pathname)) return null;
|
||||||
|
|
||||||
|
const localArchiveDir = getLocalArchiveDir();
|
||||||
|
const routePath = decodeURIComponent(pathname).replace(/^\/+/, '');
|
||||||
|
const filePath = resolve(localArchiveDir, routePath);
|
||||||
|
if (filePath !== localArchiveDir && !filePath.startsWith(`${localArchiveDir}${sep}`)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const candidates = pathname.endsWith('/')
|
||||||
|
? [join(filePath, 'index.html')]
|
||||||
|
: extname(filePath)
|
||||||
|
? [filePath]
|
||||||
|
: [`${filePath}.html`, join(filePath, 'index.html')];
|
||||||
|
|
||||||
|
return candidates.find(isFile) ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function serveLocalArchiveRoute(pathname: string, response: DevServerResponse): boolean {
|
||||||
|
if (
|
||||||
|
(optionalEnv(process.env.SUBMINER_DOCS_VERSION_LINK_ORIGIN) ?? versionLinkOrigin) !== 'local'
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const filePath = archiveFileForPathname(pathname);
|
||||||
|
if (!filePath) return false;
|
||||||
|
|
||||||
|
response.statusCode = 200;
|
||||||
|
response.setHeader('Content-Type', contentTypeForPath(filePath));
|
||||||
|
response.end(readFileSync(filePath));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
type DevServerResponse = {
|
||||||
|
statusCode: number;
|
||||||
|
setHeader(name: string, value: string): void;
|
||||||
|
end(chunk?: string | Uint8Array): void;
|
||||||
|
};
|
||||||
|
|
||||||
|
const versionItems = [
|
||||||
|
{
|
||||||
|
text: `Latest stable (${versionManifest.latestStable})`,
|
||||||
|
link: versionSwitchLink('/'),
|
||||||
|
target: '_self',
|
||||||
|
noIcon: true,
|
||||||
|
},
|
||||||
|
...versionManifest.channels
|
||||||
|
.filter((entry) => entry.label !== 'Latest stable')
|
||||||
|
.map((entry) => ({
|
||||||
|
text: entry.label,
|
||||||
|
link: versionSwitchLink(entry.path),
|
||||||
|
target: '_self',
|
||||||
|
noIcon: true,
|
||||||
|
})),
|
||||||
|
...versionManifest.versions.map((entry) => ({
|
||||||
|
text: entry.version,
|
||||||
|
link: versionSwitchLink(entry.path),
|
||||||
|
target: '_self',
|
||||||
|
noIcon: true,
|
||||||
|
})),
|
||||||
|
];
|
||||||
|
|
||||||
function sitemapUrlToPage(url: string): string {
|
function sitemapUrlToPage(url: string): string {
|
||||||
const route = url.replace(/\.html$/, '').replace(/^\/+|\/+$/g, '');
|
const route = url.replace(/\.html$/, '').replace(/^\/+|\/+$/g, '');
|
||||||
@@ -183,7 +336,7 @@ const nav: DefaultTheme.NavItem[] = [
|
|||||||
{ text: 'Configuration', link: '/configuration' },
|
{ text: 'Configuration', link: '/configuration' },
|
||||||
{ text: 'Changelog', link: '/changelog' },
|
{ text: 'Changelog', link: '/changelog' },
|
||||||
{ text: 'Troubleshooting', link: '/troubleshooting' },
|
{ text: 'Troubleshooting', link: '/troubleshooting' },
|
||||||
{ text: docsVersion ?? 'main', items: versionItems },
|
{ text: docsVersion ?? (channel === 'main' ? 'main' : latestStable), items: versionItems },
|
||||||
];
|
];
|
||||||
|
|
||||||
const sidebar: DefaultTheme.SidebarItem[] = [
|
const sidebar: DefaultTheme.SidebarItem[] = [
|
||||||
@@ -215,6 +368,7 @@ const sidebar: DefaultTheme.SidebarItem[] = [
|
|||||||
{ text: 'Anki', link: '/anki-integration' },
|
{ text: 'Anki', link: '/anki-integration' },
|
||||||
{ text: 'Jellyfin', link: '/jellyfin-integration' },
|
{ text: 'Jellyfin', link: '/jellyfin-integration' },
|
||||||
{ text: 'YouTube', link: '/youtube-integration' },
|
{ text: 'YouTube', link: '/youtube-integration' },
|
||||||
|
{ text: 'Anime Browser', link: '/anime-browser' },
|
||||||
{ text: 'Jimaku', link: '/jimaku-integration' },
|
{ text: 'Jimaku', link: '/jimaku-integration' },
|
||||||
{ text: 'Subtitle Generation', link: '/subtitle-generation' },
|
{ text: 'Subtitle Generation', link: '/subtitle-generation' },
|
||||||
{ text: 'TsukiHime', link: '/tsukihime-integration' },
|
{ text: 'TsukiHime', link: '/tsukihime-integration' },
|
||||||
@@ -241,6 +395,33 @@ const config: UserConfig = {
|
|||||||
'SubMiner: an MPV immersion-mining overlay with Yomitan and AnkiConnect integration.',
|
'SubMiner: an MPV immersion-mining overlay with Yomitan and AnkiConnect integration.',
|
||||||
base,
|
base,
|
||||||
...(outDir ? { outDir } : {}),
|
...(outDir ? { outDir } : {}),
|
||||||
|
vite: {
|
||||||
|
plugins: [
|
||||||
|
{
|
||||||
|
name: 'subminer-docs-local-version-redirects',
|
||||||
|
configureServer(server) {
|
||||||
|
server.middlewares.use((request, response, next) => {
|
||||||
|
const requestUrl = new URL(request.url ?? '/', 'http://localhost');
|
||||||
|
if (serveLocalArchiveRoute(requestUrl.pathname, response)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!shouldHandleLocalVersionRoute(requestUrl.pathname)) {
|
||||||
|
next();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
response.statusCode = 302;
|
||||||
|
response.setHeader(
|
||||||
|
'Location',
|
||||||
|
`${DOCS_HOSTNAME}${requestUrl.pathname}${requestUrl.search}`,
|
||||||
|
);
|
||||||
|
response.end();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
head: [
|
head: [
|
||||||
['link', { rel: 'preconnect', href: PLAUSIBLE_PROXY_HOSTNAME }],
|
['link', { rel: 'preconnect', href: PLAUSIBLE_PROXY_HOSTNAME }],
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { useRoute, useData } from 'vitepress';
|
import { useRoute, useData } from 'vitepress';
|
||||||
import { computed, onMounted, ref } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { formatStatusLineDate, formatStatusLineFilePath } from '../status-line';
|
import { formatStatusLineFilePath } from '../status-line';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { frontmatter } = useData();
|
const { page, frontmatter } = useData();
|
||||||
|
|
||||||
const mode = computed(() => {
|
const mode = computed(() => {
|
||||||
const layout = frontmatter.value.layout;
|
const layout = frontmatter.value.layout;
|
||||||
@@ -23,10 +23,10 @@ const section = computed(() => {
|
|||||||
return parts[0] || 'root';
|
return parts[0] || 'root';
|
||||||
});
|
});
|
||||||
|
|
||||||
// Set on the client only, so the prerendered HTML never bakes in the build date.
|
const lastUpdated = computed(() => {
|
||||||
const today = ref('');
|
if (!page.value.lastUpdated) return '';
|
||||||
onMounted(() => {
|
const date = new Date(page.value.lastUpdated);
|
||||||
today.value = formatStatusLineDate(new Date());
|
return date.toISOString().slice(0, 10);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -40,8 +40,8 @@ onMounted(() => {
|
|||||||
<div class="tui-statusline__right">
|
<div class="tui-statusline__right">
|
||||||
<span class="tui-statusline__section">{{ section }}</span>
|
<span class="tui-statusline__section">{{ section }}</span>
|
||||||
<span class="tui-statusline__sep"></span>
|
<span class="tui-statusline__sep"></span>
|
||||||
<span v-if="today" class="tui-statusline__date">{{ today }}</span>
|
<span v-if="lastUpdated" class="tui-statusline__date">{{ lastUpdated }}</span>
|
||||||
<span v-if="today" class="tui-statusline__sep"></span>
|
<span v-if="lastUpdated" class="tui-statusline__sep"></span>
|
||||||
<span class="tui-statusline__branch">GPL-3.0</span>
|
<span class="tui-statusline__branch">GPL-3.0</span>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { expect, test } from 'bun:test';
|
import { expect, test } from 'bun:test';
|
||||||
import { formatStatusLineDate, formatStatusLineFilePath } from './status-line';
|
import { formatStatusLineFilePath } from './status-line';
|
||||||
|
|
||||||
test('status line file path formats root home as index markdown', () => {
|
test('status line file path formats root home as index markdown', () => {
|
||||||
expect(formatStatusLineFilePath('/')).toBe('index.md');
|
expect(formatStatusLineFilePath('/')).toBe('index.md');
|
||||||
@@ -10,9 +10,7 @@ test('status line file path formats version archive home without trailing slash'
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('status line file path keeps normal docs routes as markdown files', () => {
|
test('status line file path keeps normal docs routes as markdown files', () => {
|
||||||
expect(formatStatusLineFilePath('/v/0.12.0/configuration')).toBe('v/0.12.0/configuration.md');
|
expect(formatStatusLineFilePath('/v/0.12.0/configuration')).toBe(
|
||||||
});
|
'v/0.12.0/configuration.md',
|
||||||
|
);
|
||||||
test('status line date uses the local calendar day, zero padded', () => {
|
|
||||||
expect(formatStatusLineDate(new Date(2026, 0, 5, 23, 59))).toBe('2026-01-05');
|
|
||||||
});
|
});
|
||||||
@@ -2,10 +2,3 @@ export function formatStatusLineFilePath(routePath: string): string {
|
|||||||
if (routePath === '/') return 'index.md';
|
if (routePath === '/') return 'index.md';
|
||||||
return `${routePath.replace(/^\/|\/$/g, '')}.md`;
|
return `${routePath.replace(/^\/|\/$/g, '')}.md`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Local calendar date as YYYY-MM-DD (toISOString would give the UTC date).
|
|
||||||
export function formatStatusLineDate(date: Date): string {
|
|
||||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
||||||
const day = String(date.getDate()).padStart(2, '0');
|
|
||||||
return `${date.getFullYear()}-${month}-${day}`;
|
|
||||||
}
|
|
||||||
+1
-16
@@ -40,23 +40,8 @@ The public docs root is stable-only:
|
|||||||
- `/` serves the latest stable release docs.
|
- `/` serves the latest stable release docs.
|
||||||
- `/main/` serves development docs from `main`.
|
- `/main/` serves development docs from `main`.
|
||||||
- `/v/<version>/` serves stable release archives.
|
- `/v/<version>/` serves stable release archives.
|
||||||
- `/versions` (root build only) lists every published version.
|
|
||||||
- Prerelease tags do not update the docs site.
|
- Prerelease tags do not update the docs site.
|
||||||
|
|
||||||
Only `/` is indexable. `/main/` and every `/v/<version>/` page carries a self-referential canonical plus `noindex,follow`, repeated as an `X-Robots-Tag` header (by the generated `_headers` file for `/main/`, by the archive function for `/v/`). They stay crawlable so their links still resolve, but ~30 archived copies of every page would otherwise consume the crawl budget the current docs need. Only the root build emits `sitemap.xml`, and its `<lastmod>` dates come from `git log` against the tracked checkout at the released tag, because the build renders from an untracked snapshot that VitePress cannot date itself.
|
Only `/` is indexable. `/main/` and every `/v/<version>/` page carries a self-referential canonical plus `noindex,follow`, and the generated `_headers` file repeats that as an `X-Robots-Tag`. They stay crawlable so their links still resolve, but ~30 archived copies of every page would otherwise consume the crawl budget the current docs need. Only the root build emits `sitemap.xml`, and its `<lastmod>` dates come from `git log` against the tracked checkout at the released tag, because the build renders from an untracked snapshot that VitePress cannot date itself.
|
||||||
|
|
||||||
Keep Cloudflare Git auto-deploy disabled. The production deploy is `.github/workflows/docs-pages.yml`, which uploads `.tmp/docs-versioned-site` with `--branch main` so tag-triggered runs update Production instead of creating preview deployments.
|
Keep Cloudflare Git auto-deploy disabled. The production deploy is `.github/workflows/docs-pages.yml`, which uploads `.tmp/docs-versioned-site` with `--branch main` so tag-triggered runs update Production instead of creating preview deployments.
|
||||||
|
|
||||||
### Stable archives in R2
|
|
||||||
|
|
||||||
`/v/<version>/` archives are not part of the Pages deployment. Each one is built once, uploaded to an R2 bucket under `v/<version>/`, and served by the Pages Function in `functions/v/[[path]].ts`. Each deploy builds only archives the bucket is missing (an archive counts as present once its `_archive.json` marker exists), plus the root and `/main/` builds. Archive nav links to `/versions` instead of listing releases, so a new tag never invalidates old archives.
|
|
||||||
|
|
||||||
To re-render archives on purpose (theme change, docs fix), run the `Docs Pages` workflow manually with `rebuild_archives` set to comma-separated tags or `all`.
|
|
||||||
|
|
||||||
One-time setup:
|
|
||||||
|
|
||||||
- R2 bucket for archives; its name goes in the `DOCS_ARCHIVE_R2_BUCKET` repository variable.
|
|
||||||
- R2 API token with Object Read & Write on that bucket; its S3 credentials go in the `DOCS_ARCHIVE_R2_ACCESS_KEY_ID` and `DOCS_ARCHIVE_R2_SECRET_ACCESS_KEY` repository secrets.
|
|
||||||
- Pages project: Settings > Bindings > R2 bucket, variable name `DOCS_ARCHIVES`, pointing at the same bucket.
|
|
||||||
|
|
||||||
The first deploy after setup builds and uploads every stable archive; later deploys only add new tags.
|
|
||||||
@@ -1,68 +1,137 @@
|
|||||||
# AniList integration
|
# AniList integration
|
||||||
|
|
||||||
SubMiner updates your [AniList](https://anilist.co) watch progress when you finish an episode. The same connection supplies cover art for the stats dashboard and names for the [character dictionary](/character-dictionary).
|
SubMiner syncs your watch progress to [AniList](https://anilist.co). Finish an episode and it reads the title and episode number off the filename, finds the matching AniList entry, and updates your progress through the GraphQL API. A failed update retries in the background with exponential backoff.
|
||||||
|
|
||||||
|
The same AniList data feeds [cover art](#cover-art) in the stats dashboard and the [Character Dictionary](/character-dictionary) for in-overlay name lookup.
|
||||||
|
|
||||||
|
[AniList](https://anilist.co) is a free anime tracking site. The **access token** is a private key SubMiner keeps so it can update your list for you. You approve it once during setup, and your AniList password never touches SubMiner.
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
1. Set `anilist.enabled` to `true`:
|
AniList integration is opt-in. To enable it:
|
||||||
|
|
||||||
```jsonc
|
1. Set `anilist.enabled` to `true` in your config.
|
||||||
{
|
2. Leave `anilist.accessToken` empty and restart SubMiner (or run `--anilist-setup`).
|
||||||
"anilist": {
|
3. Approve access in the AniList authorization page.
|
||||||
"enabled": true,
|
4. The callback returns to SubMiner via the `subminer://anilist-setup?...` protocol URL, and SubMiner stores the token automatically.
|
||||||
},
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Restart SubMiner. With no token stored, it opens the AniList setup window. You can also open it from the tray (**Configure AniList**) or with `subminer app --anilist-setup`.
|
```jsonc
|
||||||
3. Approve access on the AniList page. SubMiner receives the token through a `subminer://` link and stores it encrypted.
|
{
|
||||||
|
"anilist": {
|
||||||
|
"enabled": true,
|
||||||
|
"accessToken": "",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
If the setup window does not render, SubMiner opens the authorization page in your browser instead. To skip the flow entirely, paste a token into `anilist.accessToken`.
|
The access token is encrypted at rest using Electron's `safeStorage` API. On Linux this defaults to `gnome-libsecret`; override the backend with `--password-store=<backend>` (for example `--password-store=basic_text`).
|
||||||
|
|
||||||
On Linux, the token is stored with `gnome-libsecret` by default. If your keyring is unavailable, start it (gnome-keyring or KWallet) or launch SubMiner with `--password-store=basic_text`.
|
If the embedded auth UI fails to render, SubMiner opens the authorize URL in your default browser and shows fallback instructions in-app.
|
||||||
|
|
||||||
## How updates work
|
::: tip
|
||||||
|
You can also set `anilist.accessToken` directly in config to skip the setup flow entirely. When blank, SubMiner uses the locally stored encrypted token.
|
||||||
|
:::
|
||||||
|
|
||||||
An episode counts as watched after 85% of its length and at least 10 minutes of playback. SubMiner then:
|
## How tracking works
|
||||||
|
|
||||||
1. Reads the title, season, and episode from the file name and folder. Install [guessit](https://github.com/guessit-io/guessit) for better parsing. A folder named `Season 2` is a strong season hint.
|
SubMiner watches playback and pushes an AniList progress update once an episode counts as watched. That means at least 85% of its duration, and at least 10 minutes either way.
|
||||||
2. Finds the matching AniList entry. For season 2 and later, it follows the show's sequels.
|
|
||||||
3. Sets your progress to that episode and marks the entry Watching, or Completed on the final episode.
|
|
||||||
|
|
||||||
The show must already be on your Planning or Watching list. SubMiner does not add new entries, and it never lowers your progress.
|
The update flow:
|
||||||
|
|
||||||
Failed updates are saved and retried in the background, up to 8 times with growing delays. The queue survives restarts.
|
1. **Title detection** - SubMiner extracts the anime title, season, and episode number from the media filename and path. Season folders such as `Season 2` are treated as a strong season signal. SubMiner tries [`guessit`](https://github.com/guessit-io/guessit) first for accurate parsing, then falls back to an internal filename parser if guessit is unavailable.
|
||||||
|
2. **AniList search** - The base title (with any `Season N` / `SN` marker stripped) is searched against the AniList GraphQL API, and SubMiner picks the best match by comparing titles (romaji, English, native, synonyms) and filtering by episode count. AniList has no notion of numbered seasons - sequels are separate entries with their own titles (`Zoku`, `Kan`, `2nd Season`), so searching `<title> Season 3` finds nothing. For season 2 and later, SubMiner instead walks `SEQUEL` relations from the season 1 entry, preferring the TV line, and falls back to ordering the franchise's TV entries by air date when the relation chain is incomplete. If neither locates the season, SubMiner **skips the update** rather than writing progress to the season 1 entry, and tells you to pin the right entry with a [character dictionary override](/character-dictionary#correcting-anilist-matches).
|
||||||
|
3. **Progress check** - SubMiner fetches your current list entry for the matched media. The media must already be in Planning or Watching; otherwise SubMiner shows an MPV message explaining that the update is not possible. If your recorded progress already meets or exceeds the detected episode, the update is skipped.
|
||||||
|
4. **Mutation** - A `SaveMediaListEntry` mutation sets the new progress and marks the entry as `CURRENT`, or `COMPLETED` when the watched episode is the final episode of the season (the "already at this progress" skip is bypassed for the final episode so completion still lands).
|
||||||
|
|
||||||
## Fixing a wrong match
|
## Update queue and retry
|
||||||
|
|
||||||
If a cover or title in the stats Library is wrong, open the title and use **Change AniList Entry**.
|
Failed AniList updates are persisted to a retry queue on disk and retried with exponential backoff.
|
||||||
|
|
||||||
If SubMiner cannot find a later season, it skips the update rather than writing progress to season 1. Pin the right entry with the character dictionary's AniList override. See [Character dictionary](/character-dictionary).
|
Updates are skipped if the media path cannot produce a safe, nonempty identity. Invalid entries are discarded when loading or adding to the retry queue.
|
||||||
|
|
||||||
## Commands
|
| Parameter | Value |
|
||||||
|
| ---------------- | ---------- |
|
||||||
|
| Initial backoff | 30 seconds |
|
||||||
|
| Maximum backoff | 6 hours |
|
||||||
|
| Maximum attempts | 8 |
|
||||||
|
| Queue capacity | 500 items |
|
||||||
|
|
||||||
| Command | What it does |
|
After 8 failed attempts, the update is moved to a dead-letter queue and no longer retried automatically. The queue is persisted across restarts so no updates are lost if SubMiner exits before a retry succeeds.
|
||||||
| ------------------------------------ | --------------------------------------- |
|
|
||||||
| `subminer app --anilist-setup` | Open the AniList setup window |
|
|
||||||
| `subminer app --anilist-status` | Show token state and retry queue counts |
|
|
||||||
| `subminer app --anilist-logout` | Remove the stored token |
|
|
||||||
| `subminer app --anilist-retry-queue` | Retry one queued update now |
|
|
||||||
|
|
||||||
## Options
|
Use `--anilist-retry-queue` to manually process one ready item from the queue.
|
||||||
|
|
||||||
| Key | What it does |
|
## Cover art
|
||||||
| --------------------- | ------------------------------------------------------------- |
|
|
||||||
| `anilist.enabled` | Turns on progress updates. |
|
|
||||||
| `anilist.accessToken` | Token override. Leave empty to use the token stored by setup. |
|
|
||||||
|
|
||||||
Character dictionary settings live under `anilist.characterDictionary` and are covered on the [Character dictionary](/character-dictionary) page. See [Configuration](/configuration#anilist) for defaults.
|
SubMiner fetches cover art from AniList for display in the stats dashboard. When a new video starts playing, the cover art fetcher:
|
||||||
|
|
||||||
|
1. Checks the local database for cached art.
|
||||||
|
2. If missing, parses the media title (guessit then fallback) and searches the AniList API.
|
||||||
|
3. Downloads the cover image from the AniList CDN and caches it locally (both URL and blob).
|
||||||
|
4. Stores AniList metadata (romaji/English titles, total episodes) alongside the cover for dashboard display.
|
||||||
|
|
||||||
|
A no-match result is cached for 5 minutes before SubMiner retries, preventing repeated API calls for unrecognized media.
|
||||||
|
|
||||||
|
When AniList has no match, SubMiner tries [TMDB](/configuration#tmdb) next so live-action dramas and movies get a poster and synopsis too. See [Immersion tracking](/immersion-tracking#library) for how live-action entries are grouped.
|
||||||
|
|
||||||
|
If the automatic match is wrong, use **Change AniList Entry** on a title in the stats Library. Relinking rewrites the cached art for every episode of that title, and both the detail view and the Library grid pick up the new cover right away: the grid refetches after a relink, and cover responses carry an ETag and are revalidated on each request instead of being cached for a day.
|
||||||
|
|
||||||
|
## Rate limiting
|
||||||
|
|
||||||
|
All AniList API calls go through a shared rate limiter that enforces a sliding window of 20 requests per minute. The limiter also reads AniList's `X-RateLimit-Remaining` and `Retry-After` response headers and pauses requests when the server signals throttling. This applies to both episode tracking and cover art fetching.
|
||||||
|
|
||||||
|
## Configuration reference
|
||||||
|
|
||||||
|
```jsonc
|
||||||
|
{
|
||||||
|
"anilist": {
|
||||||
|
"enabled": true,
|
||||||
|
"accessToken": "",
|
||||||
|
"characterDictionary": {
|
||||||
|
"maxLoaded": 3,
|
||||||
|
"profileScope": "all",
|
||||||
|
"collapsibleSections": {
|
||||||
|
"description": false,
|
||||||
|
"characterInformation": false,
|
||||||
|
"voicedBy": false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
| Option | Values | Description |
|
||||||
|
| ------------------------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------ |
|
||||||
|
| `enabled` | `true`, `false` | Enable AniList post-watch progress updates (default: `false`) |
|
||||||
|
| `accessToken` | string | Explicit AniList access token override; when blank, SubMiner uses the stored encrypted token (default: `""`) |
|
||||||
|
| `characterDictionary.maxLoaded` | number | Number of recent media snapshots kept in the merged dictionary (default: `3`) |
|
||||||
|
| `characterDictionary.refreshTtlHours` | number | Hours before a cached media snapshot is refreshed (default: `168`, clamped to 1–8760) |
|
||||||
|
| `characterDictionary.evictionPolicy` | `"delete"`, `"disable"` | What happens to snapshots evicted beyond `maxLoaded` (default: `"delete"`) |
|
||||||
|
| `characterDictionary.profileScope` | `"all"`, `"active"` | Apply dictionary to all Yomitan profiles or only the active one |
|
||||||
|
| `characterDictionary.collapsibleSections.*` | `true`, `false` | Control which dictionary entry sections start expanded |
|
||||||
|
|
||||||
|
There is no `characterDictionary.enabled` key: character dictionary sync is enabled by `subtitleStyle.nameMatchEnabled`. See the [Character Dictionary](/character-dictionary) page for full details on the character dictionary feature, including name generation, matching, auto-sync lifecycle, and dictionary entry format.
|
||||||
|
|
||||||
|
## CLI commands
|
||||||
|
|
||||||
|
| Command | Description |
|
||||||
|
| ----------------------- | ------------------------------------------------------------- |
|
||||||
|
| `--anilist-setup` | Open AniList setup/auth flow helper window |
|
||||||
|
| `--anilist-status` | Print current token resolution state and retry queue counters |
|
||||||
|
| `--anilist-logout` | Clear stored AniList token from local persisted state |
|
||||||
|
| `--anilist-retry-queue` | Process one ready retry queue item immediately |
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
**No update after an episode.** Check that `anilist.enabled` is `true` and that you watched at least 85% of the episode.
|
- **Updates not triggering:** Confirm `anilist.enabled` is `true`. SubMiner requires at least 85% of the episode watched and a minimum of 10 minutes. Short episodes or partial watches will not trigger an update.
|
||||||
|
- **Update not possible:** Add the season to your AniList Planning or Watching list first. SubMiner will not create new AniList list entries automatically.
|
||||||
|
- **Wrong episode or title matched:** Detection quality is best when `guessit` is installed and on your `PATH`. Without it, SubMiner falls back to internal filename parsing which can be less accurate with unusual naming conventions.
|
||||||
|
- **Token issues:** Run `--anilist-status` to check token state. If the token is invalid or expired, run `--anilist-setup` or `--anilist-logout` and re-authenticate.
|
||||||
|
- **Updates failing repeatedly:** Run `--anilist-status` to see retry queue counters. Items that fail 8 times are moved to the dead-letter queue. Check network connectivity and AniList API status.
|
||||||
|
- **Cover art missing:** Cover art is fetched on a best-effort basis using title matching. If the filename is hard to parse, the search may return no results. The fetcher retries after 5 minutes.
|
||||||
|
- **Encryption unavailable on Linux:** If you see warnings about safeStorage, try `--password-store=basic_text` as a workaround, or start your desktop keyring (gnome-keyring, KWallet).
|
||||||
|
|
||||||
**"AniList update not possible."** Add the show to your Planning or Watching list, then mark the episode watched again.
|
## Related
|
||||||
|
|
||||||
**Wrong show or episode.** Install guessit and make sure it is on your `PATH`. Unusual file names parse poorly without it.
|
- [Character Dictionary](/character-dictionary) - AniList-powered character name dictionary for Yomitan
|
||||||
|
- [Configuration Reference](/configuration) - full config options
|
||||||
**Token errors.** Run `subminer app --anilist-status`. If the token is invalid, run `--anilist-logout`, then `--anilist-setup`.
|
- [Jellyfin Integration](/jellyfin-integration) - media server integration
|
||||||
@@ -0,0 +1,419 @@
|
|||||||
|
# Anime Browser
|
||||||
|
|
||||||
|
Search anime sources, pick an episode, and play it in mpv with SubMiner's overlay
|
||||||
|
and mining tools attached — the same way a local file or a Jellyfin stream works.
|
||||||
|
|
||||||
|
Open it with `subminer anime`, with `SubMiner.AppImage --anime`, or from
|
||||||
|
**Browse Anime** in the tray menu. The window stays open while you watch, so you
|
||||||
|
can queue the next episode without reopening it.
|
||||||
|
|
||||||
|
During playback, `Ctrl+Alt+A` toggles the same browser as a modal inside the mpv
|
||||||
|
player bounds. It uses a dedicated modal surface, so it stays above fullscreen
|
||||||
|
playback and closes like the other in-player tools. Toggling it off keeps its
|
||||||
|
current page and scroll position ready for the next toggle. The standalone
|
||||||
|
window and the modal keep their own search, selected source, tab, and scroll
|
||||||
|
state, so using one does not replace or cancel what you were doing in the other.
|
||||||
|
|
||||||
|
Both surfaces use the same playback queue, source configuration, and stats
|
||||||
|
history. Queue changes and the currently playing episode appear in both
|
||||||
|
immediately, and watched marks come from the same history that playback and the
|
||||||
|
stats window update. Closing and reopening the modal therefore picks up progress
|
||||||
|
made from either browser surface.
|
||||||
|
|
||||||
|
While the window is open, SubMiner shows a tray icon and — on macOS — appears
|
||||||
|
in the Cmd+Tab switcher and the Dock (macOS ties the two together), so you can
|
||||||
|
flip between the browser and mpv. SubMiner normally hides itself from the Dock
|
||||||
|
because the subtitle overlay needs that to float above fullscreen video; it
|
||||||
|
hides again when the window closes during playback.
|
||||||
|
|
||||||
|
Launching an episode starts a full SubMiner playback session, the same as
|
||||||
|
playing a local file: the overlay and mining tools attach, and the tray icon
|
||||||
|
stays available. In standalone `subminer anime` mode, closing the window while
|
||||||
|
a video is playing leaves playback running — reopen the browser from the tray
|
||||||
|
(**Browse Anime**). The app only exits with the window when nothing is playing.
|
||||||
|
|
||||||
|
## How it works
|
||||||
|
|
||||||
|
SubMiner does not implement any anime source itself. It runs **Aniyomi extension
|
||||||
|
APKs** through a bundled JVM sidecar ([M-Extension-Server][mes]), asks the
|
||||||
|
selected extension to resolve an episode, and hands the resulting URL to mpv.
|
||||||
|
|
||||||
|
```
|
||||||
|
extension APK → bridge (JVM) → { url, headers } → mpv → SubMiner overlay
|
||||||
|
```
|
||||||
|
|
||||||
|
Because the extension resolves the stream, whichever sources you install decide
|
||||||
|
what is available. SubMiner runs the installed extensions locally and nothing
|
||||||
|
more.
|
||||||
|
|
||||||
|
## Installing extensions
|
||||||
|
|
||||||
|
**SubMiner ships no extension repositories and bundles no sources.** There is no
|
||||||
|
default repository, no suggested list, and no discovery. Until you add one, the
|
||||||
|
browser has nothing to search — that is deliberate. Every repository and
|
||||||
|
extension comes from you, and SubMiner is not affiliated with any of the sites
|
||||||
|
they connect to.
|
||||||
|
|
||||||
|
There are two ways to add extensions.
|
||||||
|
|
||||||
|
### From a repository
|
||||||
|
|
||||||
|
The window has three tabs — **Browse**, **Extensions**, and **Source settings** —
|
||||||
|
and each one fills the window, so a long extension list is not squeezed in above
|
||||||
|
the search results.
|
||||||
|
|
||||||
|
Open the **Extensions** tab, paste a repository index URL, and choose
|
||||||
|
**Add repository**. The URL must be `https` and point at a `.json` index file —
|
||||||
|
`index.min.json` is the common Aniyomi name, but repositories are free to publish
|
||||||
|
under another one (for example `video.min.json`). Anything else is rejected
|
||||||
|
immediately rather than failing later. Everything before the file name is treated
|
||||||
|
as the repository root, so `.apk` and icon URLs are resolved relative to it.
|
||||||
|
|
||||||
|
Extensions your repositories offer but you do not have appear under
|
||||||
|
**Available**, each with **Install**. Repositories are stored in config under
|
||||||
|
`anime.repos`, so you can also manage them there and keep them in a dotfile.
|
||||||
|
|
||||||
|
Every row carries the extension's icon, as the repository publishes it, so a
|
||||||
|
site is recognisable before you read the name. A repository row shows its host's
|
||||||
|
favicon instead. Icons are the only part of a row that is fetched from the
|
||||||
|
network, and a row whose icon is missing falls back to the first letter of its
|
||||||
|
name rather than an empty box.
|
||||||
|
|
||||||
|
A repository index lists every language it knows about, which is far more than
|
||||||
|
any one person reads, so the **Available** list has a language chip row above
|
||||||
|
it. Pick one or more languages to narrow it, or **All** to clear the filter;
|
||||||
|
picking a language replaces **All** rather than sitting beside it. Rows name the
|
||||||
|
language in full ("Japanese" rather than `ja`), extensions whose sources span
|
||||||
|
languages are grouped under **Multi-language**, and the Available heading counts
|
||||||
|
how many of the offered extensions the filter leaves.
|
||||||
|
|
||||||
|
### Managing what is installed
|
||||||
|
|
||||||
|
The Extensions tab opens with an **Installed** section listing everything in the
|
||||||
|
extensions directory, with the sources each one provides and a **Remove**
|
||||||
|
button. It is built from the directory rather than from a repository, so an
|
||||||
|
extension you dropped in by hand — or one whose repository you have since
|
||||||
|
removed — is still listed and still removable. An installed extension borrows
|
||||||
|
its icon from the catalogue, so one no repository carries shows its monogram.
|
||||||
|
|
||||||
|
SubMiner compares the APK's Android version code with the newest build in the
|
||||||
|
configured repositories. **Update** is clickable only when the repository has a
|
||||||
|
newer build. A current extension says **Up to date**. If an unusual APK has no
|
||||||
|
readable version code, its disabled button says **Version unknown**. **Update
|
||||||
|
all** installs every newer build in one pass and disables itself when there is
|
||||||
|
nothing to update.
|
||||||
|
|
||||||
|
### From a file
|
||||||
|
|
||||||
|
Drop Aniyomi `.apk` files into the extensions directory, shown at the top of the
|
||||||
|
Extensions tab. It defaults to `<userData>/anime-extensions` — on macOS,
|
||||||
|
`~/Library/Application Support/SubMiner/anime-extensions` — and can be moved with
|
||||||
|
`anime.extensionsDir`.
|
||||||
|
|
||||||
|
A single APK may provide several sources; each appears separately in the
|
||||||
|
**Source** picker. Extensions that fail to load are listed in the Installed
|
||||||
|
section with the reason, so a broken APK is visible rather than silently
|
||||||
|
missing.
|
||||||
|
|
||||||
|
An extension that fails to load is skipped rather than blocking the others, so
|
||||||
|
one bad APK will not hide the rest.
|
||||||
|
|
||||||
|
### Default source
|
||||||
|
|
||||||
|
The browser opens on the first installed source. To open on a different one,
|
||||||
|
press **Set default** on its row in the Installed list; the row then carries a
|
||||||
|
**default** tag, and only one source can carry it. The choice is written to
|
||||||
|
`anime.defaultSource` and applies the next time a browser window or the
|
||||||
|
in-player modal opens. With more than one source installed, an **All sources**
|
||||||
|
row at the top of the list can be the default too. A default that is no longer
|
||||||
|
installed falls back to the first source.
|
||||||
|
|
||||||
|
## Searching every source at once
|
||||||
|
|
||||||
|
With more than one source installed, the **Source** picker gains an
|
||||||
|
**All sources** entry. Searching with it selected runs the query against every
|
||||||
|
installed source at once, and each source's results appear the moment that
|
||||||
|
source answers — a fast source is on screen while a slow one is still
|
||||||
|
resolving. The status bar counts sources as they finish
|
||||||
|
(`Searching… 3/5 sources · 42 results`).
|
||||||
|
|
||||||
|
Each cover is labelled with the source it came from, and opening one always
|
||||||
|
queries that source, whatever the picker says afterwards.
|
||||||
|
|
||||||
|
A source that errors is named in the status bar and the rest still show their
|
||||||
|
results; one extension that needs a login cannot blank the grid. If every
|
||||||
|
source fails, the first error is shown in full.
|
||||||
|
|
||||||
|
Typing a new search while one is still running simply starts over: results
|
||||||
|
from the superseded search are discarded, even if its sources answer late.
|
||||||
|
|
||||||
|
When a source reports another page, **Load more** appears below the covers.
|
||||||
|
It appends the next page without duplicating entries that already arrived in
|
||||||
|
the live result stream. A failed next-page request remains available to retry.
|
||||||
|
|
||||||
|
Source settings belong to a single extension, so the **Source settings** tab
|
||||||
|
asks you to pick one while **All sources** is selected.
|
||||||
|
|
||||||
|
## Finding an episode, and what you have watched
|
||||||
|
|
||||||
|
An episode list can run to hundreds of entries, so the episode header carries a
|
||||||
|
filter box:
|
||||||
|
|
||||||
|
- A number, `12`, keeps that episode. Sources that report no numbers at all
|
||||||
|
are still searched by name, so `12` also matches `Episode 12` in a title.
|
||||||
|
- A range, `12-18`, keeps the episodes between the two, in either order
|
||||||
|
(`18-12` reads the same). Episodes the source gave no number are left out of
|
||||||
|
a range.
|
||||||
|
- Anything else is a case-insensitive substring of the episode name, so `beach`
|
||||||
|
finds `OVA: Beach Special`.
|
||||||
|
|
||||||
|
The counter next to **Episodes** reads `6 of 25` while a filter is applied.
|
||||||
|
Pressing Escape in the filter box clears it; pressing it anywhere else goes back
|
||||||
|
to the results grid.
|
||||||
|
|
||||||
|
Episodes you have already watched are dimmed and marked `✓ watched`, with a
|
||||||
|
count in the header. This is not a separate list the browser keeps: it reads the
|
||||||
|
same stats history the rest of SubMiner writes to, where an episode is marked
|
||||||
|
watched once a session runs past the completion threshold. Streams are recorded
|
||||||
|
under a stable per-episode identity, so the mark survives the stream URL
|
||||||
|
changing between playbacks, and it is the same mark the stats window and
|
||||||
|
`--mark-watched` use.
|
||||||
|
|
||||||
|
Because playback marks an episode partway through the session, the marks
|
||||||
|
refresh when the browser window comes back to the front: finish an episode in
|
||||||
|
mpv, switch back, and it is marked. With
|
||||||
|
[immersion tracking](configuration.md) disabled there is no history to read, so
|
||||||
|
no episode is marked.
|
||||||
|
|
||||||
|
### Marking by hand, and catching up
|
||||||
|
|
||||||
|
Right-click an episode for:
|
||||||
|
|
||||||
|
- **Mark watched** / **Mark unwatched**: the single episode, whichever way it
|
||||||
|
is not already.
|
||||||
|
- **Mark this and N below watched** / **... unwatched**: that episode and every
|
||||||
|
episode listed below it. Sources list newest first, so "below" is the back
|
||||||
|
catalogue: right-click the last episode you saw and mark everything down to
|
||||||
|
the start, which is how you catch up a series you watched somewhere else.
|
||||||
|
|
||||||
|
A filter narrows what you are looking at, not what you mark: a span always
|
||||||
|
covers the full episode list, and the status bar says how many episodes it
|
||||||
|
touched. The oldest episode has nothing below it, so it only offers the single
|
||||||
|
entry. Escape closes the menu.
|
||||||
|
|
||||||
|
Marking an episode you have never played creates its stats row so the mark has
|
||||||
|
somewhere to live. That row carries the same series, season and episode fields
|
||||||
|
playback would have recorded, and both stats library views join the lifetime
|
||||||
|
tables, so a manually marked episode does not appear there as watch time you
|
||||||
|
never spent. Clearing a mark never creates anything.
|
||||||
|
|
||||||
|
Marks are written to the stats history, so with immersion tracking disabled
|
||||||
|
there is nowhere to write them and the status bar says so.
|
||||||
|
|
||||||
|
## Settings
|
||||||
|
|
||||||
|
| Key | Purpose |
|
||||||
|
| ------------------------ | ------------------------------------------------------------------------ |
|
||||||
|
| `anime.autoOpenJimaku` | Pause new episodes and open Jimaku for Japanese subtitles. |
|
||||||
|
| `anime.repos` | Repository index URLs. Empty by default. |
|
||||||
|
| `anime.extensionsDir` | Where APKs are read from. Empty uses `<userData>/anime-extensions`. |
|
||||||
|
| `anime.preferredQuality` | Preferred stream label, matched as a substring (for example `1080`). |
|
||||||
|
| `anime.defaultSource` | Source the browser opens on: a source id or `all`. Empty uses the first. |
|
||||||
|
| `anime.bridgeDir` | A bridge bundle to run instead of the downloaded one. Empty by default. |
|
||||||
|
|
||||||
|
Enable `anime.autoOpenJimaku` to hand each newly loaded Anime Browser episode
|
||||||
|
to Jimaku. SubMiner pauses playback on its first frame, waits for mpv's video
|
||||||
|
window to appear, closes the in-player browser if it is open, hides the
|
||||||
|
standalone browser window, and opens Jimaku with the source title, season, and
|
||||||
|
episode already filled in. Playback resumes after the selected subtitle loads.
|
||||||
|
Closing Jimaku also releases the automatic pause, while playback that was
|
||||||
|
already paused stays paused. A stream that never shows a window resumes without
|
||||||
|
opening Jimaku. Reopen the browser window with `subminer anime`, the tray
|
||||||
|
entry, or the shortcut to keep browsing.
|
||||||
|
|
||||||
|
## Source settings
|
||||||
|
|
||||||
|
Most extensions need configuration before they return anything — a server
|
||||||
|
address and credentials, a preferred quality, a language filter. Open the
|
||||||
|
**Source settings** tab to edit them. Changes save as you make them and
|
||||||
|
persist across restarts in `<userData>/anime-source-preferences.json`.
|
||||||
|
|
||||||
|
Each save is handed back to the extension, so it can react: the Jellyfin source
|
||||||
|
logs in when the address and password land, then fills in its media-library
|
||||||
|
picker. Password-like fields are masked. Because that file can hold
|
||||||
|
credentials, it is written with owner-only permissions. Values are scoped to
|
||||||
|
the exact extension package and source, so two extensions that reuse the same
|
||||||
|
internal source ID cannot read each other's settings. Preferences saved by an
|
||||||
|
older build without package ownership are discarded; re-enter those source
|
||||||
|
settings once after upgrading.
|
||||||
|
|
||||||
|
## The bridge
|
||||||
|
|
||||||
|
SubMiner looks for the server in three places, in order, and runs the first
|
||||||
|
one it finds:
|
||||||
|
|
||||||
|
1. `anime.bridgeDir`, if set. It must hold a Java runtime and the
|
||||||
|
`MExtensionServer-*.jar`, laid out as upstream ships them. A directory that
|
||||||
|
holds neither is an error rather than a silent fallback.
|
||||||
|
2. A package-manager install. On Arch that is the AUR
|
||||||
|
[`mangatan-extension-server`](https://aur.archlinux.org/packages/mangatan-extension-server)
|
||||||
|
package, which Mangatan also uses, at `/usr/share/mangatan/extension_server`.
|
||||||
|
Installing it means no download, and pacman keeps the bridge current. The
|
||||||
|
`subminer-bin` package lists it as an optional dependency.
|
||||||
|
3. SubMiner's own copy in `<userData>/anime-bridge`. The first launch downloads
|
||||||
|
the newest upstream release that ships a bundle for your platform (~130 MB,
|
||||||
|
containing the server and a matching Java runtime, so no system JDK is
|
||||||
|
required), the same way Mangatan does. Releases older than the oldest server
|
||||||
|
SubMiner is known to work with are skipped. Progress appears in the banner
|
||||||
|
at the top of the window.
|
||||||
|
|
||||||
|
The **Bridge** note at the bottom of the Extensions tab says which one is in
|
||||||
|
use, its version, and who updates it.
|
||||||
|
|
||||||
|
### Updating the bridge
|
||||||
|
|
||||||
|
Only the copy SubMiner downloaded is ever updated by SubMiner. A package-manager
|
||||||
|
install or an `anime.bridgeDir` belongs to whoever put it there.
|
||||||
|
|
||||||
|
Once the bridge is running, SubMiner asks GitHub for the newest release and
|
||||||
|
compares it with the installed version, including package-manager installs and
|
||||||
|
custom bridge directories. When upstream has published a newer release, the
|
||||||
|
banner reads "Extension bridge v… is installed; v… is available".
|
||||||
|
|
||||||
|
For an AUR bridge, the banner directs you to update `mangatan-extension-server`
|
||||||
|
through your AUR helper, for example `paru -S mangatan-extension-server`, then
|
||||||
|
restart SubMiner. Custom installations get a reminder to use their package
|
||||||
|
manager or original installation method. These notices have no in-app update
|
||||||
|
button. The check uses upstream releases, so AUR packaging may lag behind the
|
||||||
|
notice. External installations with an unreadable version do not show a notice.
|
||||||
|
|
||||||
|
For SubMiner's own copy, the banner includes an **Update to v…** button.
|
||||||
|
Clicking it downloads the new release beside the
|
||||||
|
running bridge, so a failed download changes nothing, then stops the bridge,
|
||||||
|
swaps the directories, and starts it again. The restart takes a few seconds
|
||||||
|
and kills the stream of an episode that is playing, the same as when the
|
||||||
|
bridge exits for any other reason; the queue and browser state survive. The
|
||||||
|
check is one unauthenticated GitHub API call per bridge start; if it fails
|
||||||
|
(offline, rate limited) it is logged and no update is offered until the next
|
||||||
|
start.
|
||||||
|
|
||||||
|
Upstream publishes no checksums, so the download is trusted the way Mangatan
|
||||||
|
and the AUR package trust it: TLS to GitHub and the maintainer's account. That
|
||||||
|
is the same trust running the server implies in the first place.
|
||||||
|
|
||||||
|
The bridge stays running while the window is open. Resolved video URLs point at
|
||||||
|
its own loopback proxy so the extension's cookies and headers apply, which means
|
||||||
|
those URLs stop working once it exits — the window keeps it alive for the whole
|
||||||
|
session.
|
||||||
|
|
||||||
|
If the bridge dies anyway (killed by hand, crashed, or stopped mid-operation),
|
||||||
|
the exit is detected and named in the status bar, and the next request starts a
|
||||||
|
new one. Playback already in flight still ends when its stream URL dies, but the
|
||||||
|
browser recovers without an app restart.
|
||||||
|
|
||||||
|
Two known limits:
|
||||||
|
|
||||||
|
- There is no Android WebView, so extensions that need one (typically for
|
||||||
|
Cloudflare challenges) will fail with an error from the source.
|
||||||
|
- Bundles are published for macOS (arm64, x64), Linux (x64), and Windows (x64).
|
||||||
|
Other platforms are unsupported outright.
|
||||||
|
|
||||||
|
## Playback
|
||||||
|
|
||||||
|
Selecting an episode resolves the best available stream, applies the source's
|
||||||
|
required headers as mpv `http-header-fields`, and loads it. The headers are
|
||||||
|
readable back off mpv, so Anki card audio and screenshots fetch correctly too.
|
||||||
|
|
||||||
|
HLS streams are routed through a small local proxy before mpv sees them. Some
|
||||||
|
hosts disguise their video segments by prepending a fake image header (a real
|
||||||
|
1x1 PNG) so scrapers back off; Aniyomi's own player strips this, but ffmpeg
|
||||||
|
probes the segment as a picture and playback dies with "no audio or video data
|
||||||
|
played". The proxy scans each segment for the first genuine MPEG-TS packet run
|
||||||
|
and drops whatever junk sits in front of it. Segments that are not TS (fMP4,
|
||||||
|
subtitles, encryption keys) pass through untouched, and direct-file streams
|
||||||
|
skip the proxy entirely. Segment URLs disguised behind fake extensions
|
||||||
|
(`.image`, `.jpg`, `.css`, and friends) are exposed locally with a `.ts`
|
||||||
|
suffix so current ffmpeg releases accept them when Anki extracts audio,
|
||||||
|
screenshots, or animated images from the playing stream.
|
||||||
|
|
||||||
|
"Playing" in the status bar means playing: after handing mpv the stream,
|
||||||
|
SubMiner waits until mpv actually configures a video output before reporting
|
||||||
|
success. If mpv gives up instead — a dead host, an undecodable stream — the
|
||||||
|
browser shows mpv's error rather than pretending playback started (a failed
|
||||||
|
load leaves no mpv window, because the player idles windowless).
|
||||||
|
Slow streams stay in the loading state while mpv is still opening them, even
|
||||||
|
after the initial playback confirmation deadline. Loading ends when video
|
||||||
|
appears, mpv reports an error or returns to idle, or another episode replaces
|
||||||
|
the request.
|
||||||
|
|
||||||
|
Failed requests appear in a dismissible panel at the bottom of the browser.
|
||||||
|
It explains the failed action and suggests a next step. Expand **Technical
|
||||||
|
details** to read the bridge or mpv error when reporting a problem. Missing
|
||||||
|
bridge APIs and incomplete extension data have distinct explanations; an
|
||||||
|
update may be needed, but a compatible release may not yet be available.
|
||||||
|
|
||||||
|
Choosing **Queue** resolves the episode and appends the playable stream to mpv's
|
||||||
|
own playlist immediately, while its subtitle tracks cache in the background.
|
||||||
|
That makes mpv's next command available at once and lets the next episode begin
|
||||||
|
automatically when the current one ends, without waiting for another source
|
||||||
|
request. Resolved stream URLs can be short-lived, so a very long queue can still
|
||||||
|
outlive what its source issued; dequeue and queue that episode again to refresh
|
||||||
|
it.
|
||||||
|
|
||||||
|
### Japanese audio, and switching tracks
|
||||||
|
|
||||||
|
Sources often return a dub and the original audio as two separate entries — or
|
||||||
|
as two audio tracks of one stream — and the dub is frequently listed first.
|
||||||
|
SubMiner always aims at the Japanese audio:
|
||||||
|
|
||||||
|
- Entries labelled as a dub are skipped as long as another entry exists. This
|
||||||
|
outranks `anime.preferredQuality`: a 1080p dub is the wrong file, not a better
|
||||||
|
one. If every entry is a dub, it still plays.
|
||||||
|
- mpv's `alang` is set to `ja,jpn,jp,japanese` before the file loads, so a
|
||||||
|
stream carrying several audio tracks starts on the Japanese one. With no
|
||||||
|
Japanese track, mpv falls back to the first one as usual.
|
||||||
|
- Any audio or subtitle tracks the extension supplies separately are added to
|
||||||
|
mpv with `audio-add` / `sub-add`, tagged with their language, and the
|
||||||
|
Japanese one is selected.
|
||||||
|
|
||||||
|
The primary subtitle slot is reserved for Japanese — it is what the overlay
|
||||||
|
mines. A source that only carries, say, English subtitles does not get them
|
||||||
|
promoted to primary; instead the track is added with a normalized language tag
|
||||||
|
(`English` → `en`), and the regular [dual-subtitle settings](configuration.md)
|
||||||
|
apply: with `secondarySub.autoLoadSecondarySub` enabled and the language listed
|
||||||
|
in `secondarySub.secondarySubLanguages`, it is picked up as the secondary
|
||||||
|
subtitle, exactly as it would be for a local file.
|
||||||
|
|
||||||
|
Every track is added, including the ones that are not selected, so all of them
|
||||||
|
appear in mpv's track menu and can be switched by hand while watching
|
||||||
|
(`#` cycles audio, `j` cycles subtitles by default).
|
||||||
|
|
||||||
|
The extension hands over subtitle tracks as URLs, but SubMiner downloads each
|
||||||
|
one to a temporary directory and gives mpv the local file. mpv is happy either
|
||||||
|
way; [Subsync](/troubleshooting#subtitle-sync-subsync) is not, because alass
|
||||||
|
needs a file on disk to use as the timing reference. A track that fails to
|
||||||
|
download falls back to its URL so the episode still plays, the format is
|
||||||
|
detected from the file's own content rather than its URL, and the directory is
|
||||||
|
removed when the next episode starts or the app exits.
|
||||||
|
|
||||||
|
### Generating Japanese subtitles
|
||||||
|
|
||||||
|
While an episode is playing, press **Ctrl+Shift+G** to [generate Japanese subtitles](/subtitle-generation#generating-for-anime-streams) from its audio. SubMiner fetches the complete episode audio, transcribes it locally with whisper.cpp, and loads the resulting SRT if the same stream is still playing. Generated subtitles stay in the application cache. This requires a finite HTTP/HTTPS stream with an internal audio track; live streams and separately attached audio tracks are not supported.
|
||||||
|
|
||||||
|
### Series, season, and episode
|
||||||
|
|
||||||
|
The episode's identity travels with it instead of being guessed back out of the
|
||||||
|
stream URL, which carries nothing but a proxy path and a file extension. The
|
||||||
|
title and episode label from the source's own listing are split into series,
|
||||||
|
season, and episode number once, at launch, and everything downstream reads
|
||||||
|
those fields:
|
||||||
|
|
||||||
|
- mpv's title reads `Series S03E04 - Episode Name`.
|
||||||
|
- Stats group by series, and rewatching an episode reuses its entry instead of
|
||||||
|
creating a new one.
|
||||||
|
- The [Jimaku](/jimaku-integration) and [TsukiHime](/tsukihime-integration)
|
||||||
|
modals open with Title, Season, and Episode already filled in, so a subtitle
|
||||||
|
search is one keypress rather than a retype.
|
||||||
|
- [AniList](/anilist-integration) progress updates use those fields directly.
|
||||||
|
|
||||||
|
[mes]: https://github.com/1Selxo/M-Extension-Server
|
||||||
@@ -1,39 +1,53 @@
|
|||||||
# AniSkip integration
|
# AniSkip integration
|
||||||
|
|
||||||
SubMiner looks up opening timestamps on [AniSkip](https://aniskip.com) so you can skip an anime's intro with one key.
|
SubMiner looks up anime intro timings from [AniSkip](https://aniskip.com) so you can jump past the OP with one key.
|
||||||
|
|
||||||
|
Intro detection runs in the SubMiner app over the mpv IPC socket. It works whenever the overlay is connected to mpv, not only at launch, and covers every local file loaded during the session including playlist advances.
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
AniSkip is on by default. To turn it off or change the key:
|
AniSkip is enabled by default. Disable it or change the skip key in your config:
|
||||||
|
|
||||||
```jsonc
|
```jsonc
|
||||||
{
|
{
|
||||||
"mpv": {
|
"mpv": {
|
||||||
"aniskipEnabled": true,
|
"aniskipEnabled": true, // default: true
|
||||||
"aniskipButtonKey": "TAB",
|
"aniskipButtonKey": "TAB",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Both settings apply immediately, without restarting mpv. For better title and episode detection, install [guessit](https://github.com/guessit-io/guessit):
|
Both settings hot-reload: changing them in your config takes effect immediately without restarting playback or mpv.
|
||||||
|
|
||||||
|
For best title and episode detection, install [`guessit`](https://github.com/guessit-io/guessit):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 -m pip install --user guessit
|
python3 -m pip install --user guessit
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
Without `guessit`, SubMiner falls back to its own filename parser. That handles the usual release naming, but unusual formats slip past it.
|
||||||
|
|
||||||
When a local file loads, SubMiner reads the title and episode from the file name, finds the show on MyAnimeList, and asks AniSkip for the intro's timestamps. Streams and URLs are skipped.
|
## How it works
|
||||||
|
|
||||||
If AniSkip has an intro, SubMiner adds `AniSkip Intro Start` and `AniSkip Intro End` chapters. When the intro starts, mpv shows "You can skip by pressing TAB" (with your key) for 3 seconds. Press the key any time during the intro to jump to its end.
|
On each local file load:
|
||||||
|
|
||||||
With a custom key other than `TAB` or `y-k`, `y-k` also skips.
|
1. SubMiner infers the anime title, season, and episode number from the filename and path (using `guessit` if available, otherwise the built-in parser). Remote URLs are skipped entirely.
|
||||||
|
2. The title is matched against MyAnimeList to resolve a MAL id.
|
||||||
|
3. SubMiner queries the AniSkip API for an OP skip interval for that MAL id and episode.
|
||||||
|
4. If an interval is found, SubMiner adds `AniSkip Intro Start` and `AniSkip Intro End` chapter markers to the current file and binds the skip key (`mpv.aniskipButtonKey`, default `TAB`).
|
||||||
|
5. At the start of the intro, an OSD prompt appears for 3 seconds: `You can skip by pressing TAB` (reflects your configured key). Pressing the key at any point during the intro seeks to the intro end.
|
||||||
|
|
||||||
|
When a custom key (other than `TAB` or `y-k`) is configured, the legacy `y-k` chord is also bound as a fallback skip trigger.
|
||||||
|
|
||||||
|
Results are cached per file for the app session. Only a definitive "no intro found" is cached, so a failed lookup gets retried on the next load rather than sticking. If mpv reloads the same file, SubMiner re-applies the chapter markers without hitting the API again.
|
||||||
|
|
||||||
## Triggering from mpv
|
## Triggering from mpv
|
||||||
|
|
||||||
| Command | What it does |
|
AniSkip actions are also reachable from mpv script-messages:
|
||||||
| ----------------------------------------- | ------------------------------------------------------- |
|
|
||||||
| `script-message subminer-skip-intro` | Skip to the end of the intro |
|
|
||||||
| `script-message subminer-aniskip-refresh` | Look up the current file again, ignoring cached results |
|
|
||||||
|
|
||||||
Use `subminer-aniskip-refresh` after a lookup failed or matched the wrong show.
|
| Command | Effect |
|
||||||
|
| ------- | ------ |
|
||||||
|
| `script-message subminer-skip-intro` | Skip to the intro end immediately (same as pressing the key) |
|
||||||
|
| `script-message subminer-aniskip-refresh` | Force a fresh lookup for the current file, discarding any cached result |
|
||||||
|
|
||||||
|
The SubMiner app handles both over the IPC socket.
|
||||||
+331
-128
@@ -1,34 +1,51 @@
|
|||||||
# Anki integration
|
# Anki integration
|
||||||
|
|
||||||
SubMiner talks to Anki through the [AnkiConnect](https://ankiweb.net/shared/info/2055492159) add-on. It fills new cards with the sentence, an audio clip, and a screenshot, and can create sentence cards and merge duplicate words. It is built for the [Lapis](https://github.com/donkuri/lapis), [Kiku](https://kiku.youyoumu.my.id/), and [Senren](https://github.com/BrenoAqua/Senren) note types, but works with any note type once you map its fields.
|
SubMiner uses the [AnkiConnect](https://ankiweb.net/shared/info/2055492159) add-on to create and update Anki cards with sentence context, audio, and screenshots.
|
||||||
|
This project is built primarily for [Kiku](https://kiku.youyoumu.my.id/) and [Lapis](https://github.com/donkuri/lapis) note types, including sentence-card and field-grouping behavior.
|
||||||
|
|
||||||
For the day-to-day flow, see [Mining workflow](/mining-workflow). Every key on this page, with its default, is listed in the [AnkiConnect config reference](/configuration#ankiconnect).
|
::: tip New to these terms?
|
||||||
|
|
||||||
|
- **Anki** is the flashcard app where your study cards live.
|
||||||
|
- **AnkiConnect** is a free add-on that lets other programs (like SubMiner) talk to Anki over a local connection. SubMiner needs it installed to add or edit cards.
|
||||||
|
- A **note type** (also called a "model") is the template that defines what a card looks like - for example the Kiku or Lapis templates many Japanese learners use.
|
||||||
|
- A **field** is one labeled slot in that template, such as `Sentence`, `Expression`, or `Picture`. SubMiner fills these fields when it mines a card.
|
||||||
|
:::
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
1. Install [Anki](https://apps.ankiweb.net/).
|
1. Install [Anki](https://apps.ankiweb.net/).
|
||||||
2. Install AnkiConnect (add-on code `2055492159`).
|
2. Install the [AnkiConnect](https://ankiweb.net/shared/info/2055492159) add-on (code: `2055492159`).
|
||||||
3. Install FFmpeg and make sure it is on your `PATH`. SubMiner uses it for audio and images.
|
3. Keep Anki running while using SubMiner.
|
||||||
4. Keep Anki running while you mine.
|
|
||||||
|
|
||||||
If you changed AnkiConnect's port, set `ankiConnect.url` to match.
|
AnkiConnect listens on `http://127.0.0.1:8765` by default. If you changed the port in AnkiConnect's settings, update `ankiConnect.url` in your SubMiner config.
|
||||||
|
|
||||||
## How cards get filled
|
AnkiConnect and Kiku/Senren settings follow the [configuration validation rules](/configuration#configuration-file): invalid values produce a warning and fall back to the option's default. Use JSON booleans such as `true`, not strings such as `"true"`, and a positive number for `ankiConnect.pollingRate`.
|
||||||
|
|
||||||
When Yomitan adds a note, SubMiner fills the sentence, audio, image, and MiscInfo fields. It finds new notes in one of two ways:
|
## Auto-enrichment transport
|
||||||
|
|
||||||
- **Proxy (default).** SubMiner runs a local AnkiConnect-compatible server. Yomitan sends notes through it, and SubMiner fills each one right after Anki accepts it.
|
When you add a word via Yomitan, SubMiner detects the new card and fills in the sentence, audio, and image fields automatically. Two detection methods are available:
|
||||||
- **Polling.** With `ankiConnect.proxy.enabled` set to `false`, SubMiner asks AnkiConnect for recently added notes every `ankiConnect.pollingRate` milliseconds.
|
|
||||||
|
|
||||||
Set `ankiConnect.behavior.autoUpdateNewCards` to `false` to stop automatic filling and update cards by hand with `Ctrl/Cmd+V` instead.
|
**Proxy mode** (default) - SubMiner runs a small local server between Yomitan and Anki. Yomitan sends the new card to SubMiner, SubMiner fills in the media fields, and the finished card goes on to Anki. There is no polling delay.
|
||||||
|
|
||||||
`ankiConnect.deck` limits enrichment and duplicate checks to one deck. If it is empty, SubMiner uses Yomitan's mining deck when it can read it, and otherwise searches all decks.
|
**Polling mode** (fallback, when the proxy is disabled) - SubMiner asks AnkiConnect every few seconds whether new cards showed up, then fills them in. Less to configure, at the cost of roughly a 3 second delay.
|
||||||
|
|
||||||
### Proxy mode setup (Yomitan / texthooker) {#proxy-mode-setup-yomitan-texthooker}
|
Use proxy mode unless your Yomitan runs in a browser rather than the bundled instance, in which case polling is the simpler path.
|
||||||
|
|
||||||
|
In both modes, the enrichment workflow is the same:
|
||||||
|
|
||||||
|
1. Checks if a duplicate expression already exists (for field grouping).
|
||||||
|
2. Updates the sentence field with the current subtitle.
|
||||||
|
3. Generates and uploads audio and image media.
|
||||||
|
4. Writes metadata to the miscInfo field.
|
||||||
|
|
||||||
|
Polling mode uses the query `"deck:<ankiConnect.deck>" added:1` to find recently added cards. If no deck is configured, it searches all decks (`added:1`). In Settings, the AnkiConnect deck dropdown auto-fills and persists Yomitan's current mining deck when available, then falls back to the decks reported by AnkiConnect; stats-dashboard mining also falls back to Yomitan's mining deck when `ankiConnect.deck` is empty.
|
||||||
|
Known-word sync scope is controlled by `ankiConnect.knownWords.decks`.
|
||||||
|
|
||||||
|
### Proxy mode setup (Yomitan / texthooker)
|
||||||
|
|
||||||
```jsonc
|
```jsonc
|
||||||
"ankiConnect": {
|
"ankiConnect": {
|
||||||
"url": "http://127.0.0.1:8765",
|
"url": "http://127.0.0.1:8765", // real AnkiConnect
|
||||||
"proxy": {
|
"proxy": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"host": "127.0.0.1",
|
"host": "127.0.0.1",
|
||||||
@@ -38,185 +55,371 @@ Set `ankiConnect.behavior.autoUpdateNewCards` to `false` to stop automatic filli
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Clients must send notes to the proxy (`http://127.0.0.1:8766` here), not to AnkiConnect directly.
|
Then point Yomitan/clients to `http://127.0.0.1:8766` instead of `8765`.
|
||||||
|
|
||||||
- **Bundled Yomitan.** SubMiner sets the active Yomitan profile's Anki server for you. With the proxy on, it always points the profile at the proxy. With the proxy off, it sets `ankiConnect.url`, but only if the profile's server is blank or the stock `http://127.0.0.1:8765`.
|
When SubMiner loads the bundled Yomitan extension, it also attempts to update the **currently active Yomitan profile**'s Anki server to the active SubMiner endpoint (falling back to `profiles[0]` if the active-profile index is invalid):
|
||||||
- **Browser Yomitan or other clients.** Set the Anki server to the proxy URL yourself. To leave your main profile alone, create a separate Yomitan profile for SubMiner, set its Anki server (Settings, Anki) to the proxy URL, and make it active while you mine.
|
|
||||||
|
|
||||||
### Proxy troubleshooting
|
- proxy URL when `ankiConnect.proxy.enabled` is `true`
|
||||||
|
- direct `ankiConnect.url` when proxy mode is disabled
|
||||||
|
|
||||||
If cards are not getting filled:
|
To avoid clobbering custom setups, this auto-update only changes the profile when its current server is blank or the stock Yomitan default (`http://127.0.0.1:8765`).
|
||||||
|
|
||||||
1. Check that the proxy is listening while SubMiner runs:
|
For browser-based Yomitan or other external clients (for example Texthooker in a normal browser profile), set their Anki server to the same proxy URL separately: `http://127.0.0.1:8766` (or your configured `proxy.host` + `proxy.port`).
|
||||||
|
|
||||||
```bash
|
### Browser/Yomitan external setup (separate profile)
|
||||||
ss -ltnp | grep 8766
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Check that requests pass through to Anki:
|
If you want SubMiner to use proxy mode without touching your main/default Yomitan profile, create or select a separate Yomitan profile just for SubMiner and set its Anki server to the proxy URL.
|
||||||
|
|
||||||
```bash
|
That profile isolation gives you both benefits:
|
||||||
curl -sS http://127.0.0.1:8766 \
|
|
||||||
-H 'content-type: application/json' \
|
|
||||||
-d '{"action":"version","version":2}'
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Read the app log (`app-YYYY-MM-DD.log`) in the logs folder. See [Troubleshooting](/troubleshooting) for where logs live.
|
- SubMiner can auto-enrich immediately via proxy.
|
||||||
|
- Your default Yomitan profile keeps its existing Anki server setting.
|
||||||
|
|
||||||
|
In Yomitan, go to Settings → Profile and:
|
||||||
|
|
||||||
|
1. Create a profile for SubMiner (or choose one dedicated profile).
|
||||||
|
2. Open Anki settings for that profile.
|
||||||
|
3. Set server to `http://127.0.0.1:8766` (or your configured proxy URL).
|
||||||
|
4. Save and make that profile active when using SubMiner.
|
||||||
|
|
||||||
|
This is only for non-bundled, external/browser Yomitan or other clients. The bundled profile auto-update logic only targets the active profile when its server is blank or still default.
|
||||||
|
|
||||||
|
### Proxy troubleshooting (quick checks)
|
||||||
|
|
||||||
|
If auto-enrichment appears to do nothing:
|
||||||
|
|
||||||
|
1. Confirm proxy listener is running while SubMiner is active:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ss -ltnp | rg 8766
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Confirm requests can pass through the proxy:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -sS http://127.0.0.1:8766 \
|
||||||
|
-H 'content-type: application/json' \
|
||||||
|
-d '{"action":"version","version":2}'
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Check the log sinks in `~/.config/SubMiner/logs/`:
|
||||||
|
|
||||||
|
- App runtime log: `app-YYYY-MM-DD.log`
|
||||||
|
- Launcher log: `launcher-YYYY-MM-DD.log`
|
||||||
|
- mpv log: `mpv-YYYY-MM-DD.log`
|
||||||
|
|
||||||
|
4. Check that the config JSONC parses and the logging shape is right:
|
||||||
|
|
||||||
|
```jsonc
|
||||||
|
"logging": {
|
||||||
|
"level": "debug"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
`"logging": "debug"` is invalid for current schema and can break reload/start behavior.
|
||||||
|
|
||||||
## Field mapping
|
## Field mapping
|
||||||
|
|
||||||
`ankiConnect.fields` maps SubMiner's data to fields on your note type.
|
SubMiner maps its data to your Anki note fields. Configure these under `ankiConnect.fields`:
|
||||||
|
|
||||||
| Key | Receives |
|
|
||||||
| ------------------ | ------------------------------------------------------------------------- |
|
|
||||||
| `fields.word` | The mined word |
|
|
||||||
| `fields.audio` | Sentence audio cut from the video |
|
|
||||||
| `fields.wordAudio` | Read only: Yomitan's word audio, used to time animated images (see below) |
|
|
||||||
| `fields.image` | Screenshot or animated clip |
|
|
||||||
| `fields.sentence` | Subtitle text |
|
|
||||||
| `fields.miscInfo` | Text from `ankiConnect.metadata.pattern` |
|
|
||||||
|
|
||||||
```jsonc
|
```jsonc
|
||||||
"ankiConnect": {
|
"ankiConnect": {
|
||||||
"fields": {
|
"fields": {
|
||||||
"audio": "SentenceAudio",
|
"word": "Expression", // mined word / expression text
|
||||||
"sentence": "Sentence"
|
"audio": "SentenceAudio", // sentence audio clip cut from the video
|
||||||
|
"wordAudio": "ExpressionAudio", // existing Yomitan word audio, read for animation sync
|
||||||
|
"image": "Picture", // screenshot or animated clip
|
||||||
|
"sentence": "Sentence", // subtitle text
|
||||||
|
"miscInfo": "MiscInfo" // metadata (filename, timestamp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Field names are matched case-insensitively. A mapped field that is missing from the note type is skipped.
|
`fields.audio` receives the **sentence** audio SubMiner cuts from the video, not word audio. Yomitan writes its own dictionary audio when you mine, so point this at a separate field such as `SentenceAudio` to keep the two apart. The built-in default is still `ExpressionAudio`, which collides with Yomitan on note types that use that field for word audio.
|
||||||
|
|
||||||
`fields.audio` gets sentence audio, not word audio. Yomitan writes its own dictionary audio into your note, so point `fields.audio` at a separate field such as `SentenceAudio`. The default, `ExpressionAudio`, is the field many note types use for Yomitan's word audio, so leaving it would overwrite that audio.
|
Field names are matched against your Anki note type case-insensitively (an exact match wins, then a lowercase comparison). If a configured field does not exist on the note type, SubMiner skips it without error.
|
||||||
|
|
||||||
`ankiConnect.tags` adds tags to every mined or updated card. Set it to `[]` to add none.
|
`fields.wordAudio` selects the existing dictionary-audio field used to calculate the animated image's opening freeze. This mapping only reads audio; `fields.audio` still controls where generated sentence audio is written. See [config.example.jsonc](/config.example.jsonc) for defaults.
|
||||||
|
|
||||||
`ankiConnect.metadata.pattern` builds the MiscInfo text. Tokens: `%f` file name, `%F` file name with extension, `%t` timestamp, `%T` timestamp with milliseconds, `<br>` line break.
|
These mappings always control normal word-card enrichment, including Yomitan proxy/polling updates and manual clipboard updates. Enabling Lapis or Kiku does not replace the configured word-card sentence and audio fields with `Sentence` and `SentenceAudio`. The dedicated sentence-card and audio-card shortcuts still use those Lapis/Kiku field names.
|
||||||
|
|
||||||
## Media
|
Two related options live alongside `fields`: `ankiConnect.deck` (target deck; empty falls back as described above) and `ankiConnect.tags` (tags added to mined cards, default `["SubMiner"]`; set `[]` to disable tagging). The `miscInfo` content is controlled by `ankiConnect.metadata.pattern` (default `[SubMiner] %f (%t)`; tokens: `%f` filename, `%F` filename with extension, `%t` timestamp, `%T` timestamp with milliseconds, `<br>` newline).
|
||||||
|
|
||||||
| Key | What it does |
|
### Minimal config
|
||||||
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- |
|
|
||||||
| `media.generateAudio` | Cut sentence audio (MP3) from the subtitle's start and end time |
|
|
||||||
| `media.audioPadding` | Seconds added before and after the clip |
|
|
||||||
| `media.fallbackDuration` | Clip length when the subtitle has no timing |
|
|
||||||
| `media.maxMediaDuration` | Longest allowed clip, in seconds (`0` removes the cap) |
|
|
||||||
| `media.normalizeAudio` | Normalize clip loudness |
|
|
||||||
| `media.mirrorMpvVolume` | Scale the clip by mpv's current volume, so quiet playback gives quiet clips |
|
|
||||||
| `media.generateImage` | Capture an image |
|
|
||||||
| `media.imageType` | `static` for one frame, `avif` for an animated clip of the line |
|
|
||||||
| `media.imageFormat` | Static format: `jpg`, `png`, or `webp` |
|
|
||||||
| `media.imageQuality` | Static image quality |
|
|
||||||
| `media.imageMaxWidth` / `Height` | Static size limit (`0` keeps source size) |
|
|
||||||
| `media.animatedFps` | Animated clip frame rate |
|
|
||||||
| `media.animatedMaxWidth` / `Height` | Animated size limit (`0` keeps aspect ratio) |
|
|
||||||
| `media.animatedCrf` | Animated quality, `0` to `63`, lower is better |
|
|
||||||
| `media.syncAnimatedImageToWordAudio` | Hold the first frame for the length of the word audio in `fields.wordAudio`, so the motion starts with the sentence audio |
|
|
||||||
| `media.reviewTiming` | Pause and let you adjust the clip before media is made (see below) |
|
|
||||||
|
|
||||||
Animated AVIF needs an FFmpeg build with an AV1 encoder (`libaom-av1`, `libsvtav1`, or `librav1e`).
|
If you only want sentence and audio on your cards:
|
||||||
|
|
||||||
Media settings apply to the next card without a restart.
|
```jsonc
|
||||||
|
"ankiConnect": {
|
||||||
|
"enabled": true,
|
||||||
|
"fields": {
|
||||||
|
"sentence": "Sentence",
|
||||||
|
"audio": "SentenceAudio"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### Review media timing
|
## Media generation
|
||||||
|
|
||||||
With `media.reviewTiming` on, SubMiner pauses before making media for word, sentence, and audio cards and opens a review dialog. You can also toggle it for the current session with **Review Media Timing** in the runtime options palette (`Ctrl/Cmd+Shift+O`). Clipboard updates and stats-dashboard mining skip the review.
|
SubMiner shells out to FFmpeg for audio clips and screenshots, so FFmpeg has to be installed and on `PATH`.
|
||||||
|
|
||||||
The dialog shows the clip over a speech waveform. When the waveform loads, an untouched clip end moves back to just after the last speech in the line. The orange bars still mark the subtitle's original start and end.
|
For remote streams such as Jellyfin playback, SubMiner downloads the clip's time window once into a temporary Matroska file (a stream copy, no re-encoding) and reads the timing review waveform, audio preview, audio, and image from that file instead of fetching the stream again for each step. The window covers the clip plus padding, plus the visible timeline in timing review, and grows when you reveal more of the timeline. It is deleted when a different window replaces it, after ten minutes without use, or when SubMiner exits. If the download fails, media generation reads the remote stream directly as before.
|
||||||
|
|
||||||
During preview, the yellow cursor follows the audio player's position through the selected range and stays at the end when playback finishes. Buffering pauses the cursor too. If the player stops reporting progress for 15 seconds, the preview stops so you can retry.
|
### Audio
|
||||||
|
|
||||||
| Action | How |
|
Audio is extracted from the video file using the subtitle's start and end timestamps. Padding is opt-in; keep it at `0` when you want sentence audio to start exactly at the mined sentence.
|
||||||
| ------------------------ | --------------------------------------------------------------------- |
|
|
||||||
| Trim | Drag either edge, or click the waveform to move the nearer edge there |
|
|
||||||
| Nudge an edge | Arrow keys on a focused edge (100 ms, `Shift` for 500 ms) |
|
|
||||||
| Slide the clip | Drag the middle |
|
|
||||||
| Show more timeline | Earlier / Later |
|
|
||||||
| Pick the screenshot | Screenshot slider or Frame buttons (static images only) |
|
|
||||||
| Add previous / next line | `P` / `N` (`Shift+P` / `Shift+N` removes) |
|
|
||||||
| Preview | `Space` |
|
|
||||||
| Confirm | `Enter` |
|
|
||||||
| Cancel | `Escape` |
|
|
||||||
|
|
||||||
The confirmed range is used as is, with no extra padding. Added lines go into the sentence field. Reset restores the original timing and removes added lines.
|
```jsonc
|
||||||
|
"ankiConnect": {
|
||||||
|
"media": {
|
||||||
|
"generateAudio": true,
|
||||||
|
"normalizeAudio": true, // normalize generated clip loudness
|
||||||
|
"mirrorMpvVolume": true, // apply the current mpv volume level
|
||||||
|
"reviewTiming": false, // review and adjust timing before media generation
|
||||||
|
"audioPadding": 0, // optional seconds before and after subtitle timing
|
||||||
|
"maxMediaDuration": 30 // cap total duration in seconds
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
When you cancel, you can go back to editing, keep the original timing, create the card without media, or discard it. Discard deletes the Yomitan note or audio card, and skips creation for a sentence card.
|
Output format: MP3 at 44100 Hz. If the video has multiple audio streams, SubMiner uses the active stream. Generated sentence audio is loudness-normalized to -23 LUFS by default during extraction; set `normalizeAudio` to `false` to keep raw source loudness. When subtitle timing is missing, clips fall back to `media.fallbackDuration` seconds (default `3`). Changing these settings applies to the next extraction without restarting SubMiner.
|
||||||
|
|
||||||
### Update behavior
|
`mirrorMpvVolume` is also enabled by default. Immediately before extracting each playback-overlay card's audio, SubMiner reads mpv's numeric `volume` and applies mpv's cubic software-volume curve after loudness normalization. For example, mpv volume `50` produces `0.5³ = 0.125` gain. Amplified output above mpv volume `100` is limited to a `-1 dBFS` ceiling before MP3 encoding to prevent clipping. It ignores mpv's separate `mute` state. If the volume property is missing, invalid, or unavailable, extraction continues with unity scaling; disabling this option skips the query and volume filter. Changing this setting applies to the next extraction without restarting SubMiner. YouTube cards queued for a background media-cache download retain the volume captured when the card was mined. Stats-dashboard mining does not currently have access to the active mpv property client, so it does not apply mpv volume scaling.
|
||||||
|
|
||||||
| Key | What it does |
|
The audio is uploaded to Anki's media folder and inserted as `[sound:audio_<timestamp>.mp3]`.
|
||||||
| ----------------------------- | ---------------------------------------------------- |
|
|
||||||
| `behavior.overwriteAudio` | Replace existing audio instead of adding to it |
|
|
||||||
| `behavior.overwriteImage` | Replace the existing image instead of adding to it |
|
|
||||||
| `behavior.mediaInsertMode` | `append` or `prepend` new media when not overwriting |
|
|
||||||
| `behavior.autoUpdateNewCards` | Fill new Yomitan notes automatically |
|
|
||||||
| `behavior.highlightWord` | Bold the mined word in the sentence field |
|
|
||||||
| `behavior.notificationType` | `overlay`, `system`, `both`, or `none` |
|
|
||||||
|
|
||||||
Manual clipboard updates (`Ctrl/Cmd+V`) always replace the sentence audio, whatever `overwriteAudio` says.
|
Overlay and stats-dashboard mining use the same `media.maxMediaDuration` limit. See the [configuration example](/config.example.jsonc) for its default and how to disable the cap.
|
||||||
|
|
||||||
## Sentence cards (Lapis) {#sentence-cards-lapis}
|
Set `media.reviewTiming` to `true` to pause playback and check the clip before its media is generated. It applies to word, sentence, and audio cards.
|
||||||
|
|
||||||
`Ctrl/Cmd+S` creates a standalone sentence card from the current line, and `Ctrl/Cmd+Shift+S` then a digit combines several lines. The card uses the note type named in `ankiConnect.isLapis.sentenceCardModel`, which must exist in Anki. If it is empty, no card is created.
|
The review opens on the subtitle range plus your configured audio padding. Subtitles usually hang around after the dialogue has stopped, so once the waveform loads, an untouched clip end pulls back to just after the last speech in the line. The Line end rail still marks the original subtitle timing, Reset puts it back, and a line whose speech runs right through its end is left alone.
|
||||||
|
|
||||||
|
**Adjusting the clip.** Drag either edge to trim, drag the middle to slide the whole clip without changing its length, or click anywhere on the waveform to snap the nearer edge there. A focused edge also moves with the arrow keys: 100 ms per press, or 500 ms with Shift. The 100 ms buttons do the same thing. Earlier and Later each reveal two more seconds of timeline without moving the selection.
|
||||||
|
|
||||||
|
**Choosing the screenshot.** With still images enabled, drag the screenshot slider or use the Frame buttons to choose a video frame independently of the audio. Earlier and Later reveal more time for both sliders. The image follows the audio midpoint until you pick a frame, then stays fixed while you trim audio. Reset below the image restores automatic selection; the audio Reset affects only the audio. The screenshot slider also supports arrow keys, Home, and End.
|
||||||
|
|
||||||
|
The picker supports local video and seekable remote streams, including Jellyfin, without seeking the main player. A selected frame must load before you can confirm; if it fails, choose another frame or Reset. The picker is hidden when image generation is disabled or animated AVIF is selected. Animated images continue to use the reviewed audio range.
|
||||||
|
|
||||||
|
**Keys.** Space previews the selection with a playhead sweeping the clip. The preview ends when the hidden player has actually played the last sample, so Bluetooth output latency does not clip the tail. Enter confirms and Escape cancels.
|
||||||
|
|
||||||
|
**The waveform.** SubMiner reads a center channel when one carries dialogue and falls back to a mono mix otherwise, keeps only the 250 to 3500 Hz speech band, and draws each slice's loudness against the clip's own noise floor. Steady background music flattens out and dialogue stands up, which makes it much easier to tell adjacent lines apart. The mined subtitle appears as a tinted band with labeled line-start and line-end rails. If waveform analysis fails, the timing controls still work.
|
||||||
|
|
||||||
|
The range you confirm is used exactly as-is; SubMiner does not add audio padding a second time. Static screenshots take its midpoint, and animated AVIF clips cover the whole range.
|
||||||
|
|
||||||
|
**Pulling in adjacent lines.** Press `P` or `N`, or use the Prev and Next steppers above the sentence preview, to add the previous or next subtitle line. Repeat for as many lines as exist. Shift+`P` and Shift+`N` remove them again. The sentence preview lists every included line with the mined one highlighted, so you always see the sentence field before confirming. The clip bounds and the waveform rails follow the outermost added line, keeping the review's audio padding.
|
||||||
|
|
||||||
|
Confirming writes the combined lines to the sentence field. Reset drops the added lines along with any timing changes. Adjacent lines come from the parsed subtitle track when one is loaded; otherwise you only get lines that already played. A clip capped by `media.maxMediaDuration` still keeps the full combined sentence even when the audio cannot stretch to cover every added line.
|
||||||
|
|
||||||
|
**Canceling.** You can go back to editing, finish with the original timing, create the card without audio or an image, or discard it. Discard deletes an existing Yomitan or audio card, and skips creation entirely for a direct sentence card. A failed audio preview does not block confirmation or card creation.
|
||||||
|
|
||||||
|
Clipboard updates and stats-dashboard mining never open timing review. The option is off by default and hot-reloads. **Review Media Timing** in the runtime options palette (`Ctrl/Cmd+Shift+O`) toggles it for the current session.
|
||||||
|
|
||||||
|
If SubMiner closes the overlay while a timing review is still loading, it cancels pending setup and modal retries and restores playback if the review paused it. A new timing review can start after the overlay reopens.
|
||||||
|
|
||||||
|
### Screenshots (static)
|
||||||
|
|
||||||
|
A single frame is captured at the current playback position.
|
||||||
|
|
||||||
|
```jsonc
|
||||||
|
"ankiConnect": {
|
||||||
|
"media": {
|
||||||
|
"generateImage": true,
|
||||||
|
"imageType": "static",
|
||||||
|
"imageFormat": "jpg", // "jpg", "png", or "webp"
|
||||||
|
"imageQuality": 92, // 1–100
|
||||||
|
"imageMaxWidth": 0, // 0 = preserve source resolution
|
||||||
|
"imageMaxHeight": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Animated clips (AVIF)
|
||||||
|
|
||||||
|
SubMiner can produce an animated AVIF spanning the subtitle duration instead of a still frame.
|
||||||
|
|
||||||
|
```jsonc
|
||||||
|
"ankiConnect": {
|
||||||
|
"media": {
|
||||||
|
"generateImage": true,
|
||||||
|
"imageType": "avif",
|
||||||
|
"animatedFps": 10,
|
||||||
|
"animatedMaxWidth": 640,
|
||||||
|
"animatedMaxHeight": 0, // 0 = preserve aspect ratio
|
||||||
|
"animatedCrf": 35 // 0–63, lower = better quality
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Animated AVIF requires an AV1 encoder (`libaom-av1`, `libsvtav1`, or `librav1e`) in your FFmpeg build. Generation timeout is 60 seconds. `media.syncAnimatedImageToWordAudio` (default `true`) prepends a frozen first frame matching the existing audio duration in `fields.wordAudio`, so the motion starts together with the sentence audio. The freeze is baked into the image when mined; changing the mapping does not repair previously generated images.
|
||||||
|
|
||||||
|
### Behavior options
|
||||||
|
|
||||||
|
```jsonc
|
||||||
|
"ankiConnect": {
|
||||||
|
"behavior": {
|
||||||
|
"overwriteAudio": true, // replace existing audio, or append
|
||||||
|
"overwriteImage": true, // replace existing image, or append
|
||||||
|
"mediaInsertMode": "append", // "append" or "prepend" to field content
|
||||||
|
"autoUpdateNewCards": true, // auto-update when new card detected
|
||||||
|
"highlightWord": true, // bold the mined word inside the sentence field
|
||||||
|
"notificationType": "overlay" // "overlay", "system", "both", or "none"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
`both` now means overlay + system notification. `osd` and `osd-system` are legacy config-file-only values; set `notificationType` to `"osd-system"` in `config.jsonc` if you previously used `both` and want to keep mpv OSD + system notifications. The Settings window shows `osd` or `osd-system` when already configured, but only offers `overlay`, `system`, `both`, and `none` as normal choices.
|
||||||
|
|
||||||
|
When media is available, mined-card overlay and system notifications include the same current-frame thumbnail.
|
||||||
|
|
||||||
|
`overwriteAudio` applies to automatic card updates and duplicate-card enrichment. Manual clipboard subtitle updates (`Ctrl/Cmd+C`, then `Ctrl/Cmd+V`) always replace generated sentence audio in `ankiConnect.fields.audio`, even when `overwriteAudio` is disabled.
|
||||||
|
|
||||||
|
## Sentence cards (Lapis)
|
||||||
|
|
||||||
|
SubMiner can create standalone sentence cards (without a word/expression) using a separate note type. This is designed for use with [Lapis](https://github.com/donkuri/Lapis) and similar sentence-focused note types.
|
||||||
|
|
||||||
|
::: warning Required config
|
||||||
|
Sentence card creation and audio card marking require a non-empty `ankiConnect.isLapis.sentenceCardModel` naming a note type that exists in Anki (default: `"Lapis"`). If the model is empty or missing, the `Ctrl/Cmd+S` and `Ctrl/Cmd+Shift+A` shortcuts will not create cards.
|
||||||
|
:::
|
||||||
|
|
||||||
```jsonc
|
```jsonc
|
||||||
"ankiConnect": {
|
"ankiConnect": {
|
||||||
"isLapis": {
|
"isLapis": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"sentenceCardModel": "Lapis"
|
"sentenceCardModel": "Lapis" // default; point at your Lapis/Kiku note type
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Sentence cards and audio cards (`Ctrl/Cmd+Shift+A`) always write to the `Sentence` and `SentenceAudio` fields. Normal word cards keep using your `ankiConnect.fields` mapping.
|
Trigger with the mine sentence shortcut (`Ctrl/Cmd+S` by default). The card is created directly via AnkiConnect with the sentence, audio, and image filled in.
|
||||||
|
|
||||||
|
The dedicated sentence-card and audio-card shortcuts use the Lapis/Kiku-compatible `Sentence` and `SentenceAudio` fields. This does not affect the configured fields used to enrich normal word cards.
|
||||||
|
|
||||||
|
To mine multiple subtitle lines as one sentence card, use `Ctrl/Cmd+Shift+S` followed by a digit (1–9) to select how many recent lines to combine.
|
||||||
|
|
||||||
## Word card type (Kiku/Lapis)
|
## Word card type (Kiku/Lapis)
|
||||||
|
|
||||||
When `isKiku` or `isLapis` is enabled, SubMiner sets a card-type flag on word cards it fills. Choose the flag with `ankiConnect.lapisKiku.wordCardKind`:
|
Word cards get a card-type flag when SubMiner fills their sentence, whether that comes from Yomitan auto-enrichment, a manual clipboard update, or stats-dashboard word mining. By default the flag is `IsWordAndSentenceCard`; pick a different one with `ankiConnect.lapisKiku.wordCardKind`.
|
||||||
|
|
||||||
| Value | Flag |
|
```jsonc
|
||||||
| ------------------- | ----------------------- |
|
"ankiConnect": {
|
||||||
| `word-and-sentence` | `IsWordAndSentenceCard` |
|
"isKiku": { "enabled": true },
|
||||||
| `click` | `IsClickCard` |
|
"lapisKiku": {
|
||||||
| `sentence` | `IsSentenceCard` |
|
"wordCardKind": "click" // word-and-sentence (default), click, sentence, audio, none
|
||||||
| `audio` | `IsAudioCard` |
|
}
|
||||||
| `none` | Leaves flags alone |
|
}
|
||||||
|
```
|
||||||
|
|
||||||
The other card-type flags are cleared. Sentence cards and audio cards keep their own flag.
|
`click` marks `IsClickCard`, `sentence` marks `IsSentenceCard`, `audio` marks `IsAudioCard`, and `none` leaves the flags untouched for templates that manage them elsewhere. Whichever flag is chosen, the other card-type flags are cleared so the note never claims two card types. The setting is only read when `isKiku` or `isLapis` is enabled, and cards mined with Mine Sentence or Mine Audio keep their own flag.
|
||||||
|
|
||||||
## Field grouping (Kiku/Senren) {#field-grouping-kiku-senren}
|
## Field grouping (Kiku/Senren)
|
||||||
|
|
||||||
When you mine a word that already has a card, SubMiner can merge the new card into the old one. The sentence, audio, image, and MiscInfo from both cards are kept as grouped entries, and the template lets you switch between them. This works with [Kiku](https://github.com/youyoumu/kiku) and [Senren](https://github.com/BrenoAqua/Senren) (which calls it [scene switching](https://github.com/BrenoAqua/Senren/blob/main/docs/scene_switching.md)).
|
When you mine the same word multiple times, SubMiner can merge the cards instead of creating duplicates. This is designed for note types that support grouped fields: [Kiku](https://github.com/youyoumu/kiku) and [Senren](https://github.com/BrenoAqua/Senren) (which calls the feature scene switching).
|
||||||
|
|
||||||
Enable one of them. They write different markup to the same fields, so only one can be on. If both are enabled, Kiku is used and SubMiner logs a config warning.
|
|
||||||
|
|
||||||
```jsonc
|
```jsonc
|
||||||
"ankiConnect": {
|
"ankiConnect": {
|
||||||
"isKiku": {
|
"isKiku": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"fieldGrouping": "manual",
|
"fieldGrouping": "manual", // "auto", "manual", or "disabled"
|
||||||
"deleteDuplicateInAuto": true
|
"deleteDuplicateInAuto": true // delete new card after auto-merge
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
For Senren, use the same keys under `isSenren`.
|
For Senren note types, enable `isSenren` instead. Kiku and Senren write incompatible markup into the same fields, so only one can be enabled at a time; if both are enabled, Kiku wins and a config warning is emitted.
|
||||||
|
|
||||||
| `fieldGrouping` | Behavior |
|
```jsonc
|
||||||
| --------------- | ------------------------------------------------------------------------------- |
|
"ankiConnect": {
|
||||||
| `disabled` | No duplicate check |
|
"isSenren": {
|
||||||
| `auto` | Merge into the existing card. With `deleteDuplicateInAuto`, delete the new card |
|
"enabled": true,
|
||||||
| `manual` | Show both cards, let you choose which to keep and preview the merge |
|
"fieldGrouping": "auto", // "auto" (default), "manual", or "disabled"
|
||||||
|
"deleteDuplicateInAuto": true // delete new card after auto-merge
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
The manual dialog cancels itself after 90 seconds. Identical entries are not deduplicated. Press `Ctrl/Cmd+G` to run the duplicate check on the last card yourself.
|
### Modes
|
||||||
|
|
||||||
| Key | Action |
|
**Disabled** (`"disabled"`): No duplicate detection. Each card is independent.
|
||||||
| ----------- | ------------------------------------- |
|
|
||||||
| `1` / `2` | Keep card 1 or card 2 |
|
|
||||||
| `Enter` | Confirm |
|
|
||||||
| `Backspace` | Back from the merge preview |
|
|
||||||
| `Esc` | Cancel and leave both cards unchanged |
|
|
||||||
|
|
||||||
## Config validation
|
**Auto** (`"auto"`): When a duplicate expression is found, SubMiner merges the new card into the existing one automatically. Both cards' sentences, audio clips, and images are preserved as grouped entries. If `deleteDuplicateInAuto` is true, the new card is deleted after merging.
|
||||||
|
|
||||||
Invalid `ankiConnect` values produce a warning and fall back to the default. Use JSON booleans (`true`, not `"true"`) and a positive number for `pollingRate`.
|
**Manual** (`"manual"`): A modal appears in the overlay showing both cards. You choose which card to keep, preview the merge result, then confirm. The modal has a 90-second timeout, after which it cancels automatically.
|
||||||
|
|
||||||
|
### What gets merged
|
||||||
|
|
||||||
|
| Field | Merge behavior |
|
||||||
|
| -------- | ----------------------------------------------- |
|
||||||
|
| Sentence | Both cards' sentences kept as grouped entries |
|
||||||
|
| Audio | Both cards' `[sound:...]` entries kept |
|
||||||
|
| Image | Both cards' images kept |
|
||||||
|
| MiscInfo | Both cards' source info kept as grouped entries |
|
||||||
|
|
||||||
|
Identical values from both cards are kept as separate grouped entries; the merge does not deduplicate.
|
||||||
|
|
||||||
|
The merge markup depends on the note type. Kiku entries are wrapped in `<span data-group-id="...">` spans ordered newest first. Senren entries follow the [scene switching](https://github.com/BrenoAqua/Senren/blob/main/docs/scene_switching.md) format: sentence, sentenceFurigana, and miscInfo entries use `group` spans when ordinal order is sufficient and numbered `groupN` spans when they need an absolute scene target. Audio and pictures are appended positionally, and the number of sentenceAudio entries drives Senren's scene count. Ungrouped legacy content is wrapped into a group span on first merge, and source `groupN` spans are rebased after the kept note's existing audio scenes.
|
||||||
|
|
||||||
|
### Keyboard shortcuts in the modal
|
||||||
|
|
||||||
|
| Key | Action |
|
||||||
|
| ----------- | ---------------------------------- |
|
||||||
|
| `1` / `2` | Select card 1 or card 2 to keep |
|
||||||
|
| `Enter` | Confirm selection |
|
||||||
|
| `Backspace` | Go back from the merge preview |
|
||||||
|
| `Esc` | Cancel (keep both cards unchanged) |
|
||||||
|
|
||||||
|
## Full config example
|
||||||
|
|
||||||
|
```jsonc
|
||||||
|
{
|
||||||
|
"ankiConnect": {
|
||||||
|
"enabled": true,
|
||||||
|
"url": "http://127.0.0.1:8765",
|
||||||
|
"pollingRate": 3000,
|
||||||
|
"deck": "",
|
||||||
|
"tags": ["SubMiner"],
|
||||||
|
"proxy": {
|
||||||
|
"enabled": true, // default
|
||||||
|
"host": "127.0.0.1",
|
||||||
|
"port": 8766,
|
||||||
|
"upstreamUrl": "http://127.0.0.1:8765",
|
||||||
|
},
|
||||||
|
"fields": {
|
||||||
|
"word": "Expression",
|
||||||
|
"audio": "SentenceAudio",
|
||||||
|
"image": "Picture",
|
||||||
|
"sentence": "Sentence",
|
||||||
|
"miscInfo": "MiscInfo",
|
||||||
|
},
|
||||||
|
"media": {
|
||||||
|
"generateAudio": true,
|
||||||
|
"generateImage": true,
|
||||||
|
"imageType": "static",
|
||||||
|
"imageFormat": "jpg",
|
||||||
|
"imageQuality": 92,
|
||||||
|
"normalizeAudio": true,
|
||||||
|
"mirrorMpvVolume": true,
|
||||||
|
"audioPadding": 0,
|
||||||
|
"maxMediaDuration": 30,
|
||||||
|
},
|
||||||
|
"behavior": {
|
||||||
|
"overwriteAudio": true,
|
||||||
|
"overwriteImage": true,
|
||||||
|
"mediaInsertMode": "append",
|
||||||
|
"autoUpdateNewCards": true,
|
||||||
|
"notificationType": "overlay",
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"pattern": "[SubMiner] %f (%t)",
|
||||||
|
},
|
||||||
|
"isKiku": {
|
||||||
|
"enabled": false,
|
||||||
|
"fieldGrouping": "disabled",
|
||||||
|
"deleteDuplicateInAuto": true,
|
||||||
|
},
|
||||||
|
"isLapis": {
|
||||||
|
"enabled": false,
|
||||||
|
"sentenceCardModel": "Lapis",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
```
|
||||||
+205
-77
@@ -1,55 +1,148 @@
|
|||||||
# Architecture
|
# Architecture
|
||||||
|
|
||||||
A contributor-facing map of how SubMiner is put together. The canonical internal guidance, including domain ownership and layering rules, is [`docs/architecture/README.md`](https://github.com/ksyasuda/SubMiner/blob/main/docs/architecture/README.md) in the repo.
|
This page is a contributor-facing architecture summary. Canonical internal architecture guidance lives in `docs/architecture/README.md` at the repo root.
|
||||||
|
|
||||||
SubMiner runs as three cooperating runtimes:
|
SubMiner is split into three cooperating runtimes:
|
||||||
|
|
||||||
- the Electron desktop app (`src/`): overlay, UI, and runtime orchestration
|
- Electron desktop app (`src/`) for overlay/UI/runtime orchestration.
|
||||||
- the launcher CLI (`launcher/`): mpv and app command workflows
|
- Launcher CLI (`launcher/`) for mpv/app command workflows.
|
||||||
- the mpv Lua plugin (`plugin/subminer/`): player-side controls and handoff to the app
|
- mpv Lua plugin (`plugin/subminer/main.lua` + module files) for player-side controls and IPC handoff.
|
||||||
|
|
||||||
Inside the app, `src/main.ts` is a composition root. It owns wiring and state, and delegates behavior to small runtime and domain modules that can be tested without Electron or mpv.
|
Within the desktop app, `src/main.ts` is a composition root that wires small runtime/domain modules plus core services.
|
||||||
|
|
||||||
## Project layout
|
## Goals
|
||||||
|
|
||||||
|
- Keep behavior stable while reducing coupling.
|
||||||
|
- Prefer small, single-purpose units that can be tested in isolation.
|
||||||
|
- Keep `main.ts` focused on wiring and state ownership, not implementation detail.
|
||||||
|
- Follow Unix-style composability:
|
||||||
|
- each service does one job
|
||||||
|
- services compose through explicit inputs/outputs
|
||||||
|
- orchestration is separate from implementation
|
||||||
|
|
||||||
|
## Project structure
|
||||||
|
|
||||||
```text
|
```text
|
||||||
launcher/
|
launcher/ # Standalone CLI launcher wrapper and mpv helpers
|
||||||
main.ts # entrypoint and command dispatch
|
commands/ # Command modules (doctor/config/mpv/jellyfin/playback/app passthrough/
|
||||||
commands/ # one module per subcommand (playback, jellyfin, stats, sync, ...)
|
# dictionary/history/logs/stats/update)
|
||||||
config/ # launcher config readers and CLI parser
|
config/ # Launcher config parsers + CLI parser builder
|
||||||
plugin/subminer/ # mpv plugin; main.lua loads init.lua, which boots the other modules
|
main.ts # Launcher entrypoint and command dispatch
|
||||||
|
plugin/
|
||||||
|
subminer/ # Modular mpv plugin (main · init · bootstrap · lifecycle · process
|
||||||
|
# state · messages · hover · ui · options · environment · log
|
||||||
|
# binary · session_bindings · version)
|
||||||
src/
|
src/
|
||||||
main-entry.ts # bootstrap wrapper that runs before main.js
|
main-entry.ts # Background-mode bootstrap wrapper before loading main.js
|
||||||
main.ts # composition root
|
main.ts # Entry point - delegates to runtime composers/domain modules
|
||||||
preload*.ts # preload bridges (overlay, settings, stats, sync, Jellyfin setup)
|
preload.ts # Electron preload bridge
|
||||||
main/ # main-process runtime modules and IPC/CLI wiring
|
types.ts # Shared type definitions
|
||||||
boot/ # pre-ready boot helpers
|
main/ # Main-process composition/runtime adapters
|
||||||
runtime/composers/ # larger runtime clusters assembled for main.ts
|
boot/ # Pre-ready boot helpers
|
||||||
runtime/domains/ # domain barrels (startup, overlay, mpv, ipc, shortcuts, anilist, jellyfin, mining)
|
app-lifecycle.ts # App lifecycle + app-ready runtime runner factories
|
||||||
core/services/ # focused services: mpv client, overlay, tokenizer, mining, integrations, stats
|
character-dictionary-runtime.ts # Character-dictionary orchestration/public runtime API
|
||||||
core/utils/ # pure helpers
|
cli-runtime.ts # CLI command runtime service adapters
|
||||||
shared/ipc/ # IPC channel constants and payload validators
|
config-validation.ts # Startup/hot-reload config error formatting and fail-fast helpers
|
||||||
renderer/ # overlay renderer: subtitle rendering, input handlers, modals
|
dependencies.ts # Shared dependency builders for IPC/runtime services
|
||||||
config/ # definitions/ (defaults + option registries) and resolve/ (resolution pipeline)
|
ipc-runtime.ts # IPC runtime registration wrappers
|
||||||
cli/ # app CLI parsing and help output
|
overlay-runtime.ts # Overlay modal routing + active-window selection
|
||||||
settings/, syncui/ # settings and sync windows
|
overlay-shortcuts-runtime.ts # Overlay keyboard shortcut handling
|
||||||
window-trackers/ # Hyprland, Sway, X11, macOS, and Windows trackers
|
overlay-visibility-runtime.ts # Overlay visibility + tracker-driven bounds service
|
||||||
anki-integration/ # AnkiConnect proxy and note-update workflow
|
frequency-dictionary-runtime.ts # Frequency dictionary runtime adapter
|
||||||
jimaku/, subsync/, tsukihime/ # integration helpers
|
jlpt-runtime.ts # JLPT dictionary runtime adapter
|
||||||
types/ # shared domain types
|
media-runtime.ts # Media path/title/subtitle-position runtime service
|
||||||
stats/ # stats dashboard UI (Vite)
|
startup.ts # Startup bootstrap dependency builder
|
||||||
vendor/ # Yomitan fork, texthooker-ui, JLPT vocab
|
startup-lifecycle.ts # Lifecycle runtime runner adapter
|
||||||
|
state.ts # Application runtime state container + reducer transitions
|
||||||
|
subsync-runtime.ts # Subsync command runtime adapter
|
||||||
|
character-dictionary-runtime/ # Character-dictionary fetch/build/cache modules + focused tests
|
||||||
|
runtime/
|
||||||
|
composers/ # High-level composition clusters used by main.ts
|
||||||
|
domains/ # Domain barrel exports (startup/overlay/mpv/jellyfin/...)
|
||||||
|
registry.ts # Domain registry consumed by main.ts
|
||||||
|
core/
|
||||||
|
services/ # Focused runtime services (Electron adapters + pure logic)
|
||||||
|
anilist/ # AniList token store/update queue/update helpers
|
||||||
|
immersion-tracker/ # Immersion persistence/session/metadata modules
|
||||||
|
tokenizer/ # Tokenizer stage modules (selection/enrichment/annotation)
|
||||||
|
utils/ # Pure helpers and coercion/config utilities
|
||||||
|
cli/ # CLI parsing and help output
|
||||||
|
config/ # Config defaults/definitions, loading, parse, resolution pipeline
|
||||||
|
definitions/ # Domain-specific defaults + option registries
|
||||||
|
resolve/ # Domain-specific config resolution pipeline stages
|
||||||
|
shared/ipc/ # Cross-process IPC channel constants + payload validators
|
||||||
|
renderer/ # Overlay renderer (modularized UI/runtime)
|
||||||
|
handlers/ # Keyboard/mouse/gamepad interaction modules
|
||||||
|
modals/ # Modal flows (Anime Browser, Jimaku, Kiku, subsync, runtime options,
|
||||||
|
# session help, changelog, character dictionary, playlist browser, subtitle
|
||||||
|
# sidebar, YouTube track picker, controller config/debug/select)
|
||||||
|
positioning/ # Subtitle position controller (drag-to-reposition)
|
||||||
|
settings/ # Settings window UI (model, controls, markup)
|
||||||
|
types/ # Domain type modules (anki, config, integrations, ...)
|
||||||
|
window-trackers/ # Backend-specific tracker implementations (Hyprland, Sway, X11, macOS, Windows)
|
||||||
|
jimaku/ # Jimaku API integration helpers
|
||||||
|
subsync/ # Subtitle sync (alass/ffsubsync) helpers
|
||||||
|
anki-integration/ # AnkiConnect proxy server + note-update enrichment workflow
|
||||||
```
|
```
|
||||||
|
|
||||||
A few ownership notes that are hard to guess from file names:
|
### Service layer (`src/core/services/`)
|
||||||
|
|
||||||
- mpv access is split into transport (`mpv-transport.ts`), protocol (`mpv-protocol.ts`), and property modules under `src/core/services/`.
|
- **Overlay/window runtime:** `overlay-manager.ts`, `overlay-window.ts`, `overlay-visibility.ts`, `overlay-bridge.ts`, `overlay-runtime-init.ts`, `overlay-content-measurement.ts`
|
||||||
- The renderer keeps `renderer.ts` to orchestration. Keyboard, mouse, and gamepad input live in `renderer/handlers/`, and each modal flow has its own file in `renderer/modals/`.
|
- **Shortcuts/input:** `shortcut.ts`, `overlay-shortcut.ts`, `overlay-shortcut-handler.ts`, `shortcut-fallback.ts`, `numeric-shortcut.ts`
|
||||||
- AniSkip intro detection runs in the app (`src/main/runtime/aniskip-runtime.ts`), which drives mpv chapters and the skip key over the mpv IPC socket. The plugin does not handle it.
|
- **MPV runtime:** `mpv.ts`, `mpv-transport.ts`, `mpv-protocol.ts`, `mpv-properties.ts`, `mpv-render-metrics.ts`
|
||||||
|
- **Mining + Anki/Jimaku runtime:** `mining.ts`, `field-grouping.ts`, `field-grouping-overlay.ts`, `anki-jimaku.ts`, `anki-jimaku-ipc.ts`
|
||||||
|
- **Subtitle/token pipeline:** `subtitle-processing-controller.ts`, `subtitle-position.ts`, `subtitle-ws.ts`, `tokenizer.ts` + `tokenizer/*` stage modules (including `parser-enrichment-worker-runtime.ts` for async MeCab enrichment and `yomitan-parser-runtime.ts`)
|
||||||
|
- **Integrations:** `jimaku.ts`, `subsync.ts`, `subsync-runner.ts`, `texthooker.ts`, `jellyfin.ts`, `jellyfin-remote.ts`, `discord-presence.ts`, `yomitan-extension-loader.ts`, `yomitan-settings.ts`
|
||||||
|
- **Anki integration (repo `src/` root, not under `core/services/`):** `src/anki-integration.ts`, `src/anki-integration/anki-connect-proxy.ts` (local proxy for push-based auto-enrichment), `src/anki-integration/note-update-workflow.ts`
|
||||||
|
- **Config/runtime controls:** `config-hot-reload.ts`, `runtime-options-ipc.ts`, `cli-command.ts`, `startup.ts`
|
||||||
|
- **Domain submodules:** `anilist/*` (token/update queue/updater), `immersion-tracker/*` (storage/session/metadata/query/reducer)
|
||||||
|
|
||||||
## Component diagram
|
### Renderer layer (`src/renderer/`)
|
||||||
|
|
||||||
The main process drives one primary overlay window plus modal surfaces. Primary and secondary subtitle layers render in the same overlay renderer, connected to the main process through `preload.ts`. The launcher and mpv plugin run as separate processes and talk to the app through sockets or CLI passthrough.
|
The renderer keeps `renderer.ts` focused on orchestration. UI behavior is delegated to per-concern modules.
|
||||||
|
|
||||||
|
```text
|
||||||
|
src/renderer/
|
||||||
|
renderer.ts # Entrypoint/orchestration only
|
||||||
|
context.ts # Shared runtime context contract
|
||||||
|
state.ts # Centralized renderer mutable state (visible overlay only)
|
||||||
|
error-recovery.ts # Global renderer error boundary + recovery actions
|
||||||
|
overlay-content-measurement.ts # Reports rendered bounds to main process
|
||||||
|
subtitle-render.ts # Primary/secondary subtitle rendering + style application
|
||||||
|
positioning.ts # Facade export for positioning controller
|
||||||
|
yomitan-popup.ts # Yomitan popup iframe detection utilities
|
||||||
|
positioning/
|
||||||
|
controller.ts # Subtitle drag-position controller
|
||||||
|
position-state.ts # Position state helpers (yPercent)
|
||||||
|
handlers/
|
||||||
|
keyboard.ts # Keybindings, chord handling, modal key routing
|
||||||
|
mouse.ts # Hover/drag behavior, selection + observer wiring
|
||||||
|
gamepad-controller.ts # Gamepad/controller input handling
|
||||||
|
controller-binding-capture.ts # Controller binding capture flow
|
||||||
|
modals/
|
||||||
|
jimaku.ts # Jimaku modal flow
|
||||||
|
kiku.ts # Kiku field-grouping modal flow
|
||||||
|
runtime-options.ts # Runtime options modal flow
|
||||||
|
session-help.ts # Keyboard shortcuts/help modal flow
|
||||||
|
subsync.ts # Manual subsync modal flow
|
||||||
|
character-dictionary.ts # Character dictionary modal flow
|
||||||
|
playlist-browser.ts # Playlist browser modal flow
|
||||||
|
subtitle-sidebar.ts # Subtitle sidebar modal flow
|
||||||
|
youtube-track-picker.ts # YouTube subtitle track picker
|
||||||
|
controller-*.ts # Controller config/debug/select modals
|
||||||
|
utils/
|
||||||
|
dom.ts # Required DOM lookups + typed handles
|
||||||
|
platform.ts # Layer/platform capability detection
|
||||||
|
```
|
||||||
|
|
||||||
|
### Launcher + plugin runtimes
|
||||||
|
|
||||||
|
- `launcher/main.ts` dispatches commands through `launcher/commands/*` and shared config readers in `launcher/config/*`. It handles mpv startup, app passthrough, Jellyfin helper commands, and playback handoff.
|
||||||
|
- `plugin/subminer/main.lua` is the mpv entrypoint: it sets up the module path and loads `init.lua`, a thin shim that boots the modular Lua files: `bootstrap.lua` (startup), `lifecycle.lua` (connect/disconnect), `process.lua` (process management), `state.lua` (shared state), `messages.lua` (IPC), `hover.lua` (hover-token highlight rendering), `ui.lua` (OSD rendering), `options.lua` (config), `environment.lua` (detection), `log.lua` (logging), `binary.lua` (path resolution), `session_bindings.lua` (configurable session keybindings), `version.lua` (version metadata). AniSkip intro detection lives in the SubMiner app (`src/main/runtime/aniskip-runtime.ts`), which drives mpv chapters and the skip key over the IPC socket.
|
||||||
|
|
||||||
|
## Flow diagram
|
||||||
|
|
||||||
|
The main process orchestrates a single primary overlay window plus modal surfaces: `main.ts` delegates to composition modules that wire together domain services. Subtitle layers (primary + secondary bar) are rendered in the same overlay renderer process, connected through `preload.ts`. External runtimes (launcher CLI and mpv plugin) operate independently and communicate via IPC socket or CLI passthrough.
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
flowchart TB
|
flowchart TB
|
||||||
@@ -132,39 +225,63 @@ flowchart TB
|
|||||||
|
|
||||||
## Composition pattern
|
## Composition pattern
|
||||||
|
|
||||||
Runtime code uses dependency injection:
|
Most runtime code follows a dependency-injection pattern:
|
||||||
|
|
||||||
1. Put the logic in a service under `src/core/services/`, as pure or side-effect-bounded functions.
|
1. Define a service interface in `src/core/services/*`.
|
||||||
2. Build its runtime dependencies in a `src/main/` module. Pass simple dependencies inline; extract an adapter only when it adds behavior or gets reused.
|
2. Keep core logic in pure or side-effect-bounded functions.
|
||||||
3. Call the service from lifecycle or command wiring.
|
3. Build runtime deps in `src/main/` composition modules; extract an adapter/helper only when it adds meaningful behavior or reuse.
|
||||||
|
4. Call the service from lifecycle/command wiring points.
|
||||||
|
|
||||||
`main.ts` gets domain handlers through `createMainRuntimeRegistry()` (`src/main/runtime/registry.ts`), which exposes the barrels in `src/main/runtime/domains/`. Larger clusters, such as app-ready startup, mpv, Jellyfin, AniList tracking, shortcuts, and IPC, are assembled by composers in `src/main/runtime/composers/`. Many handlers take a `*MainDeps` object built by a `createBuild*MainDepsHandler` builder, which keeps side effects out of the unit under test.
|
The composition root (`src/main.ts`) delegates to focused modules in `src/main/` and `src/main/runtime/composers/`:
|
||||||
|
|
||||||
Composers declare their inputs with `ComposerInputs<T>` and results with `ComposerOutputs<T>` from `src/main/runtime/composers/contracts.ts`. A missing dependency then fails at compile time.
|
- `startup.ts` - argv/env processing and bootstrap flow
|
||||||
|
- `app-lifecycle.ts` - Electron lifecycle event registration
|
||||||
|
- `startup-lifecycle.ts` - app-ready initialization sequence
|
||||||
|
- `state.ts` - centralized application runtime state container
|
||||||
|
- `ipc-runtime.ts` - IPC channel registration and handler wiring
|
||||||
|
- `cli-runtime.ts` - CLI command parsing and dispatch
|
||||||
|
- `overlay-runtime.ts` - overlay window selection and modal state management
|
||||||
|
- `subsync-runtime.ts` - subsync command orchestration
|
||||||
|
- `runtime/composers/anilist-tracking-composer.ts` - AniList media tracking/probe/retry wiring
|
||||||
|
- `runtime/composers/jellyfin-runtime-composer.ts` - Jellyfin config/client/playback/command/setup composition wiring
|
||||||
|
- `runtime/composers/mpv-runtime-composer.ts` - MPV event/factory/tokenizer/warmup wiring
|
||||||
|
|
||||||
### IPC boundary
|
Composer modules share contract conventions via `src/main/runtime/composers/contracts.ts`:
|
||||||
|
|
||||||
Channel names live in `src/shared/ipc/contracts.ts` and payload validators in `src/shared/ipc/validators.ts`. Renderer payloads are validated at the IPC entry points (`src/core/services/ipc.ts`, `src/core/services/anki-jimaku-ipc.ts`) before any domain handler runs. See [IPC + runtime contracts](/ipc-contracts) for the full rules.
|
- composer input surfaces are declared with `ComposerInputs<T>` so required dependencies cannot be omitted at compile time
|
||||||
|
- composer outputs are declared with `ComposerOutputs<T>` to keep result contracts explicit and stable
|
||||||
|
- builder return payload extraction should use shared type helpers instead of inline ad-hoc inference
|
||||||
|
|
||||||
### Runtime state ownership
|
This keeps side effects explicit and makes behavior easy to unit-test with fakes.
|
||||||
|
|
||||||
Some domains, such as AniList token, queue, and media-guess state, use reducer-style transitions:
|
Additional conventions in the current code:
|
||||||
|
|
||||||
- Composition modules own the mutable state and expose narrow `get*`/`set*` accessors.
|
- `main.ts` uses `createMainRuntimeRegistry()` (`src/main/runtime/registry.ts`) to access domain handlers (`startup`, `overlay`, `mpv`, `ipc`, `shortcuts`, `anilist`, `jellyfin`, `mining`) without importing every runtime module directly.
|
||||||
- Handlers change another domain's state only through its transition helpers in `src/main/state.ts`, never by mutating the object directly.
|
- Domain barrels in `src/main/runtime/domains/*` re-export runtime handlers + main-deps builders, while composers in `src/main/runtime/composers/*` assemble larger runtime clusters.
|
||||||
- A transition may update derived counters or snapshots, but must leave metadata it does not own untouched.
|
- Many runtime handlers accept `*MainDeps` objects generated by `createBuild*MainDepsHandler` builders to isolate side effects and keep units testable.
|
||||||
- Tests for these domains check both the fields that should change and the ones that should not.
|
|
||||||
|
### IPC contract + validation boundary
|
||||||
|
|
||||||
|
- Central channel constants live in `src/shared/ipc/contracts.ts` and are consumed by both main (`ipcMain`) and renderer preload (`ipcRenderer`) wiring.
|
||||||
|
- Runtime payload parsers/type guards live in `src/shared/ipc/validators.ts`.
|
||||||
|
- Rule: renderer-supplied payloads must be validated at IPC entry points (`src/core/services/ipc.ts`, `src/core/services/anki-jimaku-ipc.ts`) before calling domain handlers.
|
||||||
|
- Malformed invoke payloads return explicit structured errors (for example `{ ok: false, error: ... }`) and malformed fire-and-forget payloads are ignored safely.
|
||||||
|
|
||||||
|
### Runtime state ownership (migrated domains)
|
||||||
|
|
||||||
|
For domains migrated to reducer-style transitions (for example AniList token/queue/media-guess runtime state), follow these rules:
|
||||||
|
|
||||||
|
- Composition/runtime modules own mutable state cells and expose narrow `get*`/`set*` accessors.
|
||||||
|
- Domain handlers do not mutate foreign state directly; they call explicit transition helpers that encode invariants.
|
||||||
|
- Transition helpers may sync derived counters/snapshots, but must preserve non-owned metadata unless the transition explicitly owns that metadata.
|
||||||
|
- Reducer boundary: when a domain has transition helpers in `src/main/state.ts`, new callsites should route updates through those helpers instead of ad-hoc object mutation in `main.ts` or composers.
|
||||||
|
- Tests for migrated domains should assert both the intended field changes and non-targeted field invariants.
|
||||||
|
|
||||||
## Playback startup flow
|
## Playback startup flow
|
||||||
|
|
||||||
A SubMiner-managed launch (the `subminer` launcher, the app's own playback, or the packaged Windows shortcut) starts mpv, injects the plugin, and brings up the overlay. The launcher reads `config.jsonc`, spawns mpv with the IPC socket and the bundled plugin, and passes runtime settings as `--script-opts`. The plugin never reads a config file: the shipped `subminer.conf` has no settings, so command-line options always win.
|
Before the app boots, something has to launch mpv, inject the plugin, and bring the overlay up. SubMiner-managed launches own this step - the `subminer` launcher, the app's own playback, and the packaged Windows shortcut all follow the same path. The launcher reads `config.jsonc`, spawns mpv with the IPC socket and the bundled plugin, and passes runtime settings as `--script-opts`. The plugin never reads a config file: the shipped `subminer.conf` is intentionally empty so command-line opts always win.
|
||||||
|
|
||||||
Once mpv is up, exactly one of two triggers starts the overlay:
|
Once mpv is up, exactly one of two triggers brings up the overlay. On a first launch the plugin's `file-loaded` hook self-starts the app once the socket is ready (because the launcher injected `auto_start=yes`). When the app is already running - or for explicit `--start-overlay` and YouTube flows - the launcher instead attaches over the control socket and suppresses the plugin's auto-start, so the two never fire together. Both converge on the same app bring-up, which then runs the Program Lifecycle below.
|
||||||
|
|
||||||
- On a first launch, the launcher sets `auto_start=yes` and the plugin's `file-loaded` hook starts the app once the socket is ready.
|
|
||||||
- When the app is already running, or for `--start-overlay` and YouTube flows, the launcher attaches over the app control socket and suppresses the plugin's auto-start.
|
|
||||||
|
|
||||||
Both paths end in the same app bring-up, which then runs the program lifecycle below.
|
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
flowchart TB
|
flowchart TB
|
||||||
@@ -195,17 +312,17 @@ flowchart TB
|
|||||||
Conn --> Show["Transparent overlay over mpv<br/>Yomitan lookup · mine"]:::overlay
|
Conn --> Show["Transparent overlay over mpv<br/>Yomitan lookup · mine"]:::overlay
|
||||||
```
|
```
|
||||||
|
|
||||||
The sockets in this flow are described in [IPC + runtime contracts](./ipc-contracts#runtime-sockets).
|
The runtime sockets in this flow are detailed in [IPC + Runtime Contracts](./ipc-contracts#runtime-sockets).
|
||||||
|
|
||||||
## Program lifecycle
|
## Program lifecycle
|
||||||
|
|
||||||
1. **Module init.** Before `app.ready`, the composition root registers protocols, sets platform flags, constructs services, and wires dependencies. `runAndApplyStartupState()` parses CLI args and detects the compositor backend.
|
- **Module-level init:** Before `app.ready`, the composition root registers protocols, sets platform flags, constructs all services, and wires dependency injection. `runAndApplyStartupState()` parses CLI args and detects the compositor backend.
|
||||||
2. **Startup.** `--generate-config` writes the template and exits. Otherwise `app-lifecycle.ts` takes the single-instance lock and registers Electron lifecycle hooks.
|
- **Startup:** If `--generate-config` is passed, it writes the template and exits. Otherwise `app-lifecycle.ts` acquires the single-instance lock and registers Electron lifecycle hooks.
|
||||||
3. **App ready.** `composeAppReadyRuntime()` reloads config strictly, resolves keybindings, creates the `MpvIpcClient` (which connects and observes subtitle and playback properties), and starts the runtime options manager, subtitle timing tracker, and immersion tracker.
|
- **Critical-path init:** Once `app.whenReady()` fires, `composeAppReadyRuntime()` runs strict config reload, resolves keybindings, creates the `MpvIpcClient` (which immediately connects and subscribes to mpv subtitle/playback properties via `observe_property`), and initializes the `RuntimeOptionsManager`, `SubtitleTimingTracker`, and `ImmersionTrackerService`.
|
||||||
4. **Overlay.** `initializeOverlayRuntime()` creates the overlay window, registers global shortcuts, and tracks mpv's window bounds through the active window tracker. `src/main/runtime/overlay-mpv-sub-visibility.ts` hides mpv's own subtitles while the overlay shows them.
|
- **Overlay runtime:** `initializeOverlayRuntime()` creates the primary overlay window (interactive Yomitan lookups and subtitle rendering), registers global shortcuts, and sets up bounds tracking via the active window tracker. mpv subtitle suppression is handled by a dedicated `overlay-mpv-sub-visibility` service.
|
||||||
5. **Background warmups.** MeCab, Yomitan, JLPT and frequency dictionaries, the optional Jellyfin remote session, Discord presence, AniList token refresh, and the optional AnkiConnect proxy start asynchronously. `startupWarmups` controls which run; its low-power mode defers everything except Yomitan.
|
- **Background warmups:** Non-critical services are launched asynchronously: MeCab tokenizer check (with async worker thread), Yomitan extension load, JLPT + frequency dictionary prewarm, optional Jellyfin remote session, Discord presence service, AniList token refresh, and optional AnkiConnect proxy server. Warmup coverage is configurable through `startupWarmups` (including low-power mode that defers all but Yomitan).
|
||||||
6. **Runtime.** Event-driven. mpv property changes, IPC messages, CLI commands, shortcuts, and config hot-reloads route through handlers and composers. Subtitle text goes through `SubtitleProcessingController` (normalize, tokenize, merge) and out to the overlay renderer and modals.
|
- **Runtime:** Event-driven. mpv property changes, IPC messages, CLI commands, overlay shortcuts, and hot-reload notifications route through runtime handlers/composers. Subtitle text flows through the `SubtitleProcessingController` (normalize → tokenize → merge), and results are sent to the main overlay renderer and modal surfaces.
|
||||||
7. **Shutdown.** `onWillQuitCleanup` tears down the tray, config watcher, shortcuts, WebSocket and texthooker servers, mpv socket, window tracker, and Yomitan parser window. It flushes the immersion tracker to SQLite and stops Jellyfin, Discord, and the AnkiConnect proxy.
|
- **Shutdown:** `onWillQuitCleanup` destroys tray + config watcher, unregisters shortcuts, stops WebSocket + texthooker servers, closes the mpv socket + flushes OSD log, stops the window tracker, closes the Yomitan parser window, flushes the immersion tracker (SQLite), stops Jellyfin/Discord services, stops the AnkiConnect proxy server, and cleans Anki/AniList state.
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
flowchart TB
|
flowchart TB
|
||||||
@@ -269,11 +386,11 @@ flowchart TB
|
|||||||
style Loop fill:#363a4f,stroke:#494d64,color:#cad3f5
|
style Loop fill:#363a4f,stroke:#494d64,color:#cad3f5
|
||||||
```
|
```
|
||||||
|
|
||||||
## Subtitle prefetch
|
## Subtitle prefetch pipeline
|
||||||
|
|
||||||
SubMiner tokenizes upcoming subtitle lines before they appear, so they render from a warm cache. `SubtitlePrefetchService` (`src/core/services/subtitle-prefetch.ts`) gets the cue list from the active track: an external subtitle file, or for local media an embedded text track extracted with ffmpeg. It parses the cues with `subtitle-cue-parser.ts`, picks a window of upcoming lines from the playback position, and tokenizes them through the live pipeline, storing results in the `SubtitleProcessingController` cache.
|
SubMiner can pre-tokenize upcoming subtitle lines before they appear on screen. When an external subtitle file (SRT, VTT, or ASS) is detected on the active track, the `SubtitlePrefetchService` parses all cues via the subtitle cue parser (`subtitle-cue-parser.ts`), identifies a priority window of upcoming lines based on the current playback position, and tokenizes them in the background through the same pipeline used for live subtitles. Results are stored directly into the `SubtitleProcessingController` cache, so when a subtitle actually appears during playback, it hits a warm cache and renders in ~30-50ms instead of ~200-320ms.
|
||||||
|
|
||||||
Live subtitle processing always takes priority; the prefetcher pauses while the on-screen line is being processed. It recomputes its window on seek and re-prefetches when the cache is invalidated, for example after a word is marked known.
|
The prefetcher yields to live subtitle processing (which always takes priority over background work) and re-computes its priority window on seek. Cache invalidation events (e.g. marking a word as known) trigger re-prefetching of the current window to keep results fresh.
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
flowchart TB
|
flowchart TB
|
||||||
@@ -282,7 +399,7 @@ flowchart TB
|
|||||||
classDef runtime fill:#8bd5ca,stroke:#494d64,color:#24273a,stroke-width:1.5px
|
classDef runtime fill:#8bd5ca,stroke:#494d64,color:#24273a,stroke-width:1.5px
|
||||||
classDef warmup fill:#eed49f,stroke:#494d64,color:#24273a,stroke-width:1.5px
|
classDef warmup fill:#eed49f,stroke:#494d64,color:#24273a,stroke-width:1.5px
|
||||||
|
|
||||||
SubFile["Subtitle Track"]:::init
|
SubFile["External Sub File"]:::init
|
||||||
Parse["Cue Parser"]:::phase
|
Parse["Cue Parser"]:::phase
|
||||||
Window["Upcoming Lines"]:::phase
|
Window["Upcoming Lines"]:::phase
|
||||||
Tokenize["Pre-tokenize"]:::warmup
|
Tokenize["Pre-tokenize"]:::warmup
|
||||||
@@ -299,11 +416,22 @@ flowchart TB
|
|||||||
style Render stroke-width:2px
|
style Render stroke-width:2px
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Why this design
|
||||||
|
|
||||||
|
- **Smaller blast radius:** changing one feature usually touches one service.
|
||||||
|
- **Better testability:** most behavior can be tested without Electron windows/mpv.
|
||||||
|
- **Better reviewability:** PRs can be scoped to one subsystem.
|
||||||
|
- **Backward compatibility:** CLI flags and IPC channels can remain stable while internals evolve.
|
||||||
|
- **Runtime registry + domain barrels:** `src/main/runtime/registry.ts` and `src/main/runtime/domains/*` reduce direct fan-in inside `main.ts` while keeping domain ownership explicit.
|
||||||
|
- **Extracted composition root:** `main.ts` delegates to focused modules under `src/main/` and `src/main/runtime/composers/` for lifecycle, IPC, overlay, mpv, shortcut, and integration wiring.
|
||||||
|
- **Split MPV service layers:** MPV internals are separated into transport (`mpv-transport.ts`), protocol (`mpv-protocol.ts`), and properties/render metrics modules for maintainability.
|
||||||
|
- **Config by domain:** defaults, option registries, and resolution are split by domain under `src/config/definitions/*` and `src/config/resolve/*`, keeping config evolution localized.
|
||||||
|
|
||||||
## Extension rules
|
## Extension rules
|
||||||
|
|
||||||
- Add behavior to a service in `src/core/services/` or a focused module under `src/main/runtime/`. Keep new logic out of `main.ts`.
|
- Add behavior to an existing service in `src/core/services/*` or create a focused runtime module under `src/main/runtime/*`; avoid ad-hoc logic in `main.ts`.
|
||||||
- For changes that span startup, overlay, mpv, or integration wiring, compose through `src/main/runtime/domains/` and `src/main/runtime/composers/` instead of wiring directly in `main.ts`.
|
- Add new cross-process channels in `src/shared/ipc/contracts.ts` first, validate payloads in `src/shared/ipc/validators.ts`, then wire handlers in IPC runtime modules.
|
||||||
- Add a cross-process channel in `src/shared/ipc/contracts.ts` first, validate it in `src/shared/ipc/validators.ts`, then wire the handler. See [IPC + runtime contracts](/ipc-contracts#add-a-new-ipc-action).
|
- See also the contributor IPC onboarding page: [IPC + Runtime Contracts](/ipc-contracts).
|
||||||
- Config is split by domain under `src/config/definitions/` and `src/config/resolve/`. Keep config changes in the matching domain file.
|
- If change spans startup/overlay/mpv/integration wiring, prefer composing through `src/main/runtime/domains/*` + `src/main/runtime/composers/*` rather than direct wiring in `main.ts`.
|
||||||
- Keep CLI flags and IPC channels stable unless a change is meant to break them.
|
- Keep service APIs explicit and narrowly scoped, and preserve existing CLI flag / IPC channel behavior unless the change is intentionally breaking.
|
||||||
- Add or update focused tests when a runtime boundary or contract changes, including malformed-payload tests for IPC.
|
- Add or update focused tests (including malformed-payload IPC tests) when runtime boundaries or contracts change.
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
import { expect, test } from 'bun:test';
|
|
||||||
import { onRequest, resolveArchiveRoute, type ArchiveBucket } from './functions/v/[[path]]';
|
|
||||||
|
|
||||||
// In-memory stand-in for the R2 binding, including the range and precondition behavior
|
|
||||||
// the function relies on.
|
|
||||||
function fakeBucket(objects: Record<string, string>): ArchiveBucket {
|
|
||||||
return {
|
|
||||||
async get(key, options) {
|
|
||||||
const content = objects[key];
|
|
||||||
if (content === undefined) return null;
|
|
||||||
const bytes = new TextEncoder().encode(content);
|
|
||||||
const httpEtag = `"${key}"`;
|
|
||||||
|
|
||||||
if (options?.onlyIf?.get('if-none-match') === httpEtag) {
|
|
||||||
return { size: bytes.length, httpEtag };
|
|
||||||
}
|
|
||||||
|
|
||||||
const rangeHeader = options?.range?.get('range');
|
|
||||||
const match = rangeHeader ? /^bytes=(\d+)-(\d*)$/.exec(rangeHeader) : null;
|
|
||||||
if (match) {
|
|
||||||
const offset = Number(match[1]);
|
|
||||||
const end = match[2] ? Number(match[2]) : bytes.length - 1;
|
|
||||||
const slice = bytes.slice(offset, end + 1);
|
|
||||||
return {
|
|
||||||
size: bytes.length,
|
|
||||||
httpEtag,
|
|
||||||
range: { offset, length: slice.length },
|
|
||||||
body: new Blob([slice]).stream(),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return { size: bytes.length, httpEtag, body: new Blob([bytes]).stream() };
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const bucket = fakeBucket({
|
|
||||||
'v/0.19.6/index.html': '<h1>home</h1>',
|
|
||||||
'v/0.19.6/usage.html': '<h1>usage</h1>',
|
|
||||||
'v/0.19.6/404.html': '<h1>missing</h1>',
|
|
||||||
'v/0.19.6/assets/app.abc123.js': 'console.log(1)',
|
|
||||||
});
|
|
||||||
|
|
||||||
function request(path: string, init?: RequestInit) {
|
|
||||||
return onRequest({
|
|
||||||
request: new Request(`https://docs.subminer.moe${path}`, init),
|
|
||||||
env: { DOCS_ARCHIVES: bucket },
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
test('archive routes follow the clean-URL layout of the built archives', () => {
|
|
||||||
expect(resolveArchiveRoute('/v/0.19.6/usage')).toEqual({
|
|
||||||
kind: 'lookup',
|
|
||||||
version: '0.19.6',
|
|
||||||
keys: ['v/0.19.6/usage.html', 'v/0.19.6/usage/index.html'],
|
|
||||||
});
|
|
||||||
expect(resolveArchiveRoute('/v/0.19.6/')).toEqual({
|
|
||||||
kind: 'lookup',
|
|
||||||
version: '0.19.6',
|
|
||||||
keys: ['v/0.19.6/index.html'],
|
|
||||||
});
|
|
||||||
expect(resolveArchiveRoute('/v/0.19.6', '?q=1')).toEqual({
|
|
||||||
kind: 'redirect',
|
|
||||||
location: '/v/0.19.6/?q=1',
|
|
||||||
status: 301,
|
|
||||||
});
|
|
||||||
expect(resolveArchiveRoute('/v/')).toEqual({
|
|
||||||
kind: 'redirect',
|
|
||||||
location: '/versions',
|
|
||||||
status: 302,
|
|
||||||
});
|
|
||||||
expect(resolveArchiveRoute('/v/0.19.6/%2e%2e/secret')).toEqual({ kind: 'not-found' });
|
|
||||||
expect(resolveArchiveRoute('/v/latest/')).toEqual({ kind: 'not-found' });
|
|
||||||
});
|
|
||||||
|
|
||||||
test('serves archive pages and hashed assets with their cache policy', async () => {
|
|
||||||
const page = await request('/v/0.19.6/usage');
|
|
||||||
expect(page.status).toBe(200);
|
|
||||||
expect(page.headers.get('content-type')).toBe('text/html; charset=utf-8');
|
|
||||||
expect(page.headers.get('cache-control')).toBe('public, max-age=3600');
|
|
||||||
expect(page.headers.get('x-robots-tag')).toBe('noindex, follow');
|
|
||||||
expect(await page.text()).toBe('<h1>usage</h1>');
|
|
||||||
|
|
||||||
const asset = await request('/v/0.19.6/assets/app.abc123.js');
|
|
||||||
expect(asset.headers.get('content-type')).toBe('text/javascript; charset=utf-8');
|
|
||||||
expect(asset.headers.get('cache-control')).toContain('immutable');
|
|
||||||
});
|
|
||||||
|
|
||||||
test('missing archive pages fall back to the archive 404 page', async () => {
|
|
||||||
const response = await request('/v/0.19.6/nope');
|
|
||||||
expect(response.status).toBe(404);
|
|
||||||
expect(await response.text()).toBe('<h1>missing</h1>');
|
|
||||||
|
|
||||||
const unknownVersion = await request('/v/0.1.0/usage');
|
|
||||||
expect(unknownVersion.status).toBe(404);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('supports byte ranges, conditional requests, and HEAD', async () => {
|
|
||||||
const partial = await request('/v/0.19.6/usage', { headers: { Range: 'bytes=4-8' } });
|
|
||||||
expect(partial.status).toBe(206);
|
|
||||||
expect(partial.headers.get('content-range')).toBe('bytes 4-8/14');
|
|
||||||
expect(await partial.text()).toBe('usage');
|
|
||||||
|
|
||||||
const notModified = await request('/v/0.19.6/usage', {
|
|
||||||
headers: { 'If-None-Match': '"v/0.19.6/usage.html"' },
|
|
||||||
});
|
|
||||||
expect(notModified.status).toBe(304);
|
|
||||||
|
|
||||||
const head = await request('/v/0.19.6/usage', { method: 'HEAD' });
|
|
||||||
expect(head.status).toBe(200);
|
|
||||||
expect(head.headers.get('content-length')).toBe('14');
|
|
||||||
expect(await head.text()).toBe('');
|
|
||||||
|
|
||||||
const post = await request('/v/0.19.6/usage', { method: 'POST' });
|
|
||||||
expect(post.status).toBe(405);
|
|
||||||
});
|
|
||||||
+8
-184
@@ -1,182 +1,6 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## v0.20.1 (2026-10-03)
|
## v0.19.6 (2026-09-04)
|
||||||
|
|
||||||
**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**
|
|
||||||
- **Japanese Subtitle Generation**:
|
|
||||||
- Generate Japanese SRT subtitles locally with whisper.cpp. Start it from a new modal (Ctrl+Shift+G), from the generate button in an empty subtitle sidebar, or with `subminer generate-subs`.
|
|
||||||
- Generation shows progress, can be cancelled, and loads the finished subtitles into mpv automatically.
|
|
||||||
- Pick an official multilingual Whisper model, including quantized variants, with size and accuracy guidance. You can download it in the app or point Settings at a model you already have.
|
|
||||||
- `large-v3-turbo` is recommended when CUDA support is detected, and `small` otherwise.
|
|
||||||
- whisper-cli, ffmpeg, and ffprobe are found on PATH unless you override them. SubMiner names any missing tools before a download starts.
|
|
||||||
- An optional "Focus on spoken dialogue" mode uses a separately downloaded Silero VAD model. It keeps audible sections it is unsure about, so dialogue under music is not dropped, but songs may also be transcribed.
|
|
||||||
- Long passages are split near speech starts or quiet pauses to reduce subtitles that appear too early. When an eligible embedded or external subtitle track is loaded in mpv, it guides the split points.
|
|
||||||
- Each passage runs in a fresh Whisper process, which prevents repeated-character output.
|
|
||||||
- **Subtitle Selection Modal**:
|
|
||||||
- An optional modal for choosing primary and secondary mpv subtitle tracks.
|
|
||||||
- Turn it on in Settings under Behavior, then press g followed by s to open it. Turning it off restores mpv's own subtitle selection binding.
|
|
||||||
- Single-key actions take priority over configured key sequence prefixes.
|
|
||||||
- Conflicting sequences are disabled with a warning, and the existing y commands stay reserved.
|
|
||||||
- **Subtitle Sidebar Copy**:
|
|
||||||
- Select dialogue across several sidebar rows and copy it without timestamps using Ctrl/Cmd+C or the Copy button.
|
|
||||||
- Selecting text does not seek playback and does not require mining a card.
|
|
||||||
- **Media Timing Review Screenshot Picker**:
|
|
||||||
- Choose the still screenshot separately from the audio range, with a live preview and its own time slider.
|
|
||||||
- Step through decoded frames one at a time to get the exact frame you want.
|
|
||||||
- Works with local video and with seekable remote streams such as Jellyfin.
|
|
||||||
- **mpv Keybindings in the Overlay**:
|
|
||||||
- The overlay now picks up keyboard bindings from mpv defaults, `input.conf`, and loaded scripts when they do not conflict with SubMiner.
|
|
||||||
- SubMiner controls and bindings you explicitly disabled take precedence.
|
|
||||||
- These bindings apply only to the current session and are not listed in the help menu.
|
|
||||||
- **Jimaku Live Action Search**: The Jimaku modal has new Anime and Live action tabs, so you can search Jimaku's live action catalogue as well as anime. Use Arrow Left and Arrow Right to switch tabs.
|
|
||||||
- **TMDB Live-Action Library**:
|
|
||||||
- Live-action dramas and movies in the stats Library now get posters, synopses, and titles from TMDB.
|
|
||||||
- Release builds include a project key. Setting `tmdb.apiKey` or `tmdb.apiKeyCommand` overrides it, and one of them is required when running from source.
|
|
||||||
- Titles that AniList cannot match are looked up on TMDB automatically when the parsed filename exactly matches a Japanese live-action title. For everything else, use the new **Link to TMDB** action.
|
|
||||||
- Entries linked to the same TMDB title merge into one card, and the Library kind selector has a new Live Action option.
|
|
||||||
- If a replacement download fails during provider reassignment, the previous link and artwork are kept. Merges and sync keep AniList and TMDB identities separate, and the merge dialog explains mixed selections instead of failing.
|
|
||||||
- **YouTube Library Kind**:
|
|
||||||
- YouTube channels are now their own Library media kind. Existing channel entries migrate automatically, and viewing history and manual video assignments are unchanged.
|
|
||||||
- New All Titles, Anime, and YouTube Library filters.
|
|
||||||
- Channels are excluded from AniList matching, season repair, and duplicate recommendations.
|
|
||||||
- Merges and video moves can no longer combine an anime entry with a YouTube channel.
|
|
||||||
|
|
||||||
**Changed**
|
|
||||||
- **Launcher Uses Bundled Bun**:
|
|
||||||
- Every installed and downloadable launcher now runs on the Bun runtime that ships with SubMiner. A system Bun is no longer needed.
|
|
||||||
- Recognized legacy launchers migrate automatically.
|
|
||||||
- Windows gets a `subminer.cmd` launcher download.
|
|
||||||
- First-run setup is reduced to one optional launcher control. Runtime repair guidance appears only when it is needed.
|
|
||||||
- **Faster Sync Transfers**:
|
|
||||||
- Sync between compatible macOS and Linux machines now uses compressed, incremental rsync transfers.
|
|
||||||
- The last snapshot received from each peer is cached, which reduces traffic on later syncs.
|
|
||||||
- Machines without a compatible rsync, including Windows, fall back to compressed scp.
|
|
||||||
- Older peers still work without the upload cache.
|
|
||||||
- Transfers abort after 30 minutes.
|
|
||||||
- **Stats Server Request Safety**:
|
|
||||||
- The stats server now accepts loopback hosts only and rejects requests from browser origins other than its own.
|
|
||||||
- Requests that change data must send an `application/json` body. Scripts that POST to the server need to set a JSON content type.
|
|
||||||
- The in-app stats overlay now loads from the local server, so it gets the same protection.
|
|
||||||
- Dashboards served through a reverse proxy or Tailscale Serve are no longer supported.
|
|
||||||
- **Smaller Downloads**:
|
|
||||||
- Installers and unpacked apps are smaller. Demo media, source maps, TypeScript sources, test fixtures, and unused Koffi binaries are no longer packaged.
|
|
||||||
- All windows now share one Japanese UI font.
|
|
||||||
- Release builds publish package size reports that compare against the previous release.
|
|
||||||
- **Bundled Yomitan**: Updated with upstream Yomitan 26.9.8 changes, including historical Japanese kana transformations, Ukrainian language support, and improvements to Anki duplicate searches and audio retrieval.
|
|
||||||
|
|
||||||
**Fixed**
|
|
||||||
- **Jellyfin 12 Compatibility**:
|
|
||||||
- Playback, subtitle, artwork, and remote-control requests now authenticate with the `ApiKey` query parameter, so the integration works on Jellyfin 12, where legacy authorization is off by default.
|
|
||||||
- "Play on SubMiner" stays available. The cast connection now answers keep-alive requests and reconnects when the server stops responding, instead of silently dying after about a minute.
|
|
||||||
- The Jellyfin "now playing" bar clears when you close or finish a cast video instead of running on to the end of the episode.
|
|
||||||
- Cards mined during Jellyfin playback get the episode title in the misc info field again instead of "Unknown media".
|
|
||||||
- **Jellyfin Privacy and Playback**:
|
|
||||||
- Jellyfin streams no longer leak titles taken from the stream URL, or stream URLs that contain credentials, into metadata lookups, Anki source fields, Discord presence, stats, or AniList retries.
|
|
||||||
- Previously cached metadata that contained credentials is cleaned up. Watch history and library assignments are not touched.
|
|
||||||
- Jellyfin playback and casting now use your configured mpv executable, so they work when mpv is installed outside PATH. Portable plugins next to that executable are detected.
|
|
||||||
- **Anki Mining**:
|
|
||||||
- New `ankiConnect.fields.wordAudio` setting reads word audio separately from the sentence audio field. This fixes animated images that started moving immediately when `fields.audio` pointed to `SentenceAudio`. Existing animated images need to be regenerated to pick up the fix.
|
|
||||||
- Sentence furigana on word cards stays in sync with the full stats-search context and with expanded timing review selections. Stale readings are cleared if regeneration fails.
|
|
||||||
- Closing the overlay while media timing review is still loading now cancels the review, resumes playback if the review paused it, and cleans up the hidden preview player.
|
|
||||||
- `ankiConnect.media.maxMediaDuration: 0` now means unlimited when mining from the stats dashboard, matching overlay mining.
|
|
||||||
- Invalid AnkiConnect, Kiku, and Senren settings are now rejected with a warning and fall back to defaults.
|
|
||||||
- **Stats Server Stability**:
|
|
||||||
- A port conflict is now reported in a status notification instead of crashing SubMiner.
|
|
||||||
- Simultaneous startup requests share one server start. Stopping the background server no longer disconnects dashboards open in the foreground.
|
|
||||||
- Shutdown waits only a limited time for active requests to finish.
|
|
||||||
- Malformed resource IDs, and ID lists with any invalid entries, are rejected before Library changes or cover backfills run.
|
|
||||||
- **Subtitle Sidebar**:
|
|
||||||
- Clicking a cue no longer leaves the row focused, and Space no longer seeks back to a focused cue. Enter still seeks to the focused cue, and Space keeps its configured playback action.
|
|
||||||
- The sidebar stays near the current playback position during gaps when the subtitle file has a cue that starts at zero.
|
|
||||||
- **Settings Save Feedback**:
|
|
||||||
- Settings marked LIVE no longer show false restart warnings, including for notifications and subtitle generation.
|
|
||||||
- When a save mixes live and restart-only changes, the live changes apply right away and only the changed sections that need a restart are listed.
|
|
||||||
- **Overlay Windows**:
|
|
||||||
- On Hyprland, recovery dialogs stay above SubMiner windows so overlay placement updates no longer cover their Wait and Close buttons.
|
|
||||||
- On Linux, a delayed close callback during teardown can no longer reopen the overlay.
|
|
||||||
- **First Launch on macOS**: SubMiner no longer exits on first launch when the config directory does not exist yet.
|
|
||||||
|
|
||||||
**Docs**
|
|
||||||
- **Launcher**: Documented the launcher install that uses the bundled runtime, migration from legacy launchers, package-managed updates, and the bundled Bun runtime's MIT and LGPL notices. The AUR package installs these notices under `/usr/share/licenses/subminer-bin`, and they are also included in `subminer-assets.tar.gz`.
|
|
||||||
- **Subtitle Generation**: Documented model choice, VAD behavior, splitting guided by a reference track, fallback behavior, and known limits.
|
|
||||||
- **Subtitle Selection**: Documented the subtitle selector setting, its shortcut override, and the primary and secondary track controls.
|
|
||||||
- **Settings**: Clarified save feedback for live settings, warnings for saves that mix live and restart-only changes, and how subtitle generation settings reload.
|
|
||||||
- **Jellyfin**:
|
|
||||||
- Clarified that Windows mpv playback and Jellyfin casting can use a configured executable path instead of PATH.
|
|
||||||
- Documented how Jellyfin media titles and stats identities keep stream credentials out of metadata.
|
|
||||||
- **Stats Library**:
|
|
||||||
- Documented TMDB linking, provider reassignment, merge compatibility, and caching of the credential command's output.
|
|
||||||
- Documented YouTube channel filtering and video statistics in the Library.
|
|
||||||
- **Mining**:
|
|
||||||
- Documented choosing the screenshot separately in media timing review.
|
|
||||||
- Documented the separate word audio field mapping, including that existing animated images need to be regenerated.
|
|
||||||
- **Sync**: Documented compressed transfers, where the incremental sync cache is stored, and compatibility with older peers.
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Internal changes</summary>
|
|
||||||
|
|
||||||
**Internal**
|
|
||||||
- Removed duplicate source and launcher smoke runs from the reusable CI quality gate. Every distinct test lane and failure artifact is kept.
|
|
||||||
- Replaced mislabeled dist source reruns with a small Electron-runtime smoke check. It covers compiled stats startup, the HTTP service, native SQLite, port conflicts, and cleanup.
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
## Previous Versions
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>v0.19.x</summary>
|
|
||||||
|
|
||||||
<h2>v0.19.6 (2026-09-04)</h2>
|
|
||||||
|
|
||||||
**Added**
|
**Added**
|
||||||
|
|
||||||
@@ -207,7 +31,7 @@
|
|||||||
- **Jellyfin Subtitle Sync**: Jellyfin subtitle files now load with zero mpv delay instead of inferring and saving an offset from Japanese and English cue timelines.
|
- **Jellyfin Subtitle Sync**: Jellyfin subtitle files now load with zero mpv delay instead of inferring and saving an offset from Japanese and English cue timelines.
|
||||||
- **Secondary Subtitle Visibility**: Native mpv secondary subtitles stay hidden when switching secondary subtitle tracks during playback.
|
- **Secondary Subtitle Visibility**: Native mpv secondary subtitles stay hidden when switching secondary subtitle tracks during playback.
|
||||||
|
|
||||||
<h2>v0.19.5 (2026-08-30)</h2>
|
## v0.19.5 (2026-08-30)
|
||||||
|
|
||||||
**Fixed**
|
**Fixed**
|
||||||
|
|
||||||
@@ -222,7 +46,7 @@
|
|||||||
- Long speech is paged instead of covering the video with a wall of text.
|
- Long speech is paged instead of covering the video with a wall of text.
|
||||||
- Explicitly timed sound cues like `[音楽]` no longer cover later dialogue.
|
- Explicitly timed sound cues like `[音楽]` no longer cover later dialogue.
|
||||||
|
|
||||||
<h2>v0.19.4 (2026-08-25)</h2>
|
## v0.19.4 (2026-08-25)
|
||||||
|
|
||||||
**Added**
|
**Added**
|
||||||
- **Library Merge & Move**: Duplicate library cards for the same show can now be combined. Select cards in the library grid and use "Merge Selected" to pick which entry to keep and move every episode onto it, preserving sessions, mined cards, and watch time. Episodes can also be reassigned individually via the "→" button, useful when a file lands under a stray title; manual assignments survive later filename parsing, Jellyfin refreshes, and season repair. Exact AniList title matches with compatible seasons now merge automatically, while fuzzy matches surface as dismissible "Possible duplicate" reviews instead of merging silently.
|
- **Library Merge & Move**: Duplicate library cards for the same show can now be combined. Select cards in the library grid and use "Merge Selected" to pick which entry to keep and move every episode onto it, preserving sessions, mined cards, and watch time. Episodes can also be reassigned individually via the "→" button, useful when a file lands under a stray title; manual assignments survive later filename parsing, Jellyfin refreshes, and season repair. Exact AniList title matches with compatible seasons now merge automatically, while fuzzy matches surface as dismissible "Possible duplicate" reviews instead of merging silently.
|
||||||
@@ -263,7 +87,7 @@
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<h2>v0.19.3 (2026-08-13)</h2>
|
## v0.19.3 (2026-08-13)
|
||||||
|
|
||||||
**Added**
|
**Added**
|
||||||
- Changelog Modal: Adds an in-app changelog you can open from the tray ("View Changelog") or the "What's New" button on the update notification, so the notification stays reachable while you read. It shows the newest published release notes (falling back to the bundled changelog if that fetch fails), folds older versions while keeping the current one expanded, and supports keyboard navigation (`J`/`K`/arrows, `Enter`, `R`, `Esc`).
|
- Changelog Modal: Adds an in-app changelog you can open from the tray ("View Changelog") or the "What's New" button on the update notification, so the notification stays reachable while you read. It shows the newest published release notes (falling back to the bundled changelog if that fetch fails), folds older versions while keeping the current one expanded, and supports keyboard navigation (`J`/`K`/arrows, `Enter`, `R`, `Esc`).
|
||||||
@@ -287,7 +111,7 @@
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<h2>v0.19.2 (2026-08-04)</h2>
|
## v0.19.2 (2026-08-04)
|
||||||
|
|
||||||
**Changed**
|
**Changed**
|
||||||
- Subsync: The sync modal now lets you choose both the reference subtitle (correct timing) and the out-of-sync subtitle to retime, for both alass and ffsubsync. alass can also use the loaded video's audio as a reference for local files. Retiming the secondary track now reloads the result into the secondary slot instead of overwriting the primary subtitle.
|
- Subsync: The sync modal now lets you choose both the reference subtitle (correct timing) and the out-of-sync subtitle to retime, for both alass and ffsubsync. alass can also use the loaded video's audio as a reference for local files. Retiming the secondary track now reloads the result into the secondary slot instead of overwriting the primary subtitle.
|
||||||
@@ -305,7 +129,7 @@
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<h2>v0.19.1 (2026-08-01)</h2>
|
## v0.19.1 (2026-08-01)
|
||||||
|
|
||||||
**Added**
|
**Added**
|
||||||
- Word Card Type: Adds a setting (Settings > Mining/Anki > Kiku/Lapis Features > "Word Card Type") to choose which card-type flag SubMiner marks on Kiku/Lapis word cards — `word-and-sentence` (default), `click`, `sentence`, `audio`, or `none`. Click cards (`IsClickCard`) can now be flagged, and setting any card-type flag clears the others so a note can't claim two types at once.
|
- Word Card Type: Adds a setting (Settings > Mining/Anki > Kiku/Lapis Features > "Word Card Type") to choose which card-type flag SubMiner marks on Kiku/Lapis word cards — `word-and-sentence` (default), `click`, `sentence`, `audio`, or `none`. Click cards (`IsClickCard`) can now be flagged, and setting any card-type flag clears the others so a note can't claim two types at once.
|
||||||
@@ -314,7 +138,7 @@
|
|||||||
- Yomitan Popup: Fixes the macOS Yomitan popup going inert after mining a card — clicks outside the popup no longer pass through to mpv, and scrolling over the popup scrolls its definitions instead of seeking playback.
|
- Yomitan Popup: Fixes the macOS Yomitan popup going inert after mining a card — clicks outside the popup no longer pass through to mpv, and scrolling over the popup scrolls its definitions instead of seeking playback.
|
||||||
- YouTube Playlist Links: Fixes opening a video from a playlist URL (e.g. a Watch Later link with `list=`/`index=`) timing out while probing subtitles, metadata, or the playback URL.
|
- YouTube Playlist Links: Fixes opening a video from a playlist URL (e.g. a Watch Later link with `list=`/`index=`) timing out while probing subtitles, metadata, or the playback URL.
|
||||||
|
|
||||||
<h2>v0.19.0 (2026-07-29)</h2>
|
## v0.19.0 (2026-07-29)
|
||||||
|
|
||||||
**Added**
|
**Added**
|
||||||
- Anki Maturity Highlighting: Known-word subtitle highlights can now be colored by Anki card maturity (new, learning, young, mature), similar to asbplayer. Tier thresholds and colors are configurable, with a runtime toggle and an updated help legend.
|
- Anki Maturity Highlighting: Known-word subtitle highlights can now be colored by Anki card maturity (new, learning, young, mature), similar to asbplayer. Tier thresholds and colors are configurable, with a runtime toggle and an updated help legend.
|
||||||
@@ -350,7 +174,7 @@
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
</details>
|
## Previous Versions
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>v0.18.x</summary>
|
<summary>v0.18.x</summary>
|
||||||
|
|||||||
@@ -1,104 +1,315 @@
|
|||||||
# Character dictionary
|
# Character dictionary
|
||||||
|
|
||||||
SubMiner builds a Yomitan dictionary of the characters in the show you are watching, using data from [AniList](https://anilist.co). Character names in subtitles get their own color, and hovering one shows the character's portrait, role, voice actor, and description.
|
SubMiner builds a Yomitan-compatible dictionary of a show's characters from [AniList](https://anilist.co), the online anime and manga database. Once it is loaded, character names in subtitles get recognized and highlighted, and hovering one shows the portrait, role, voice actor, and biography without leaving the overlay.
|
||||||
|
|
||||||
Ordinary dictionaries rarely contain character names, so without this every name counts as an unknown word and throws off [N+1 highlighting](/subtitle-annotations#n-1-word-highlighting).
|
Proper names rarely appear in ordinary dictionaries, so without this every character name reads as an unknown word. That wrecks N+1 highlighting, since a line naming two characters looks like a line with two unknowns. Recognizing them keeps the highlighting pointed at real vocabulary.
|
||||||
|
|
||||||
## Turning it on
|
The dictionary is generated per-media, merged across your recently-watched titles, and auto-imported into Yomitan. When a character name appears in a subtitle line, it gets highlighted and becomes available for hover-driven Yomitan profile lookup.
|
||||||
|
|
||||||
1. Set `subtitleStyle.nameMatchEnabled` to `true`, or turn it on in the Settings window under Annotation Display, Character Names.
|
## How it works
|
||||||
2. Optionally set `subtitleStyle.nameMatchImagesEnabled` to `true` to show a small portrait next to each name in the subtitle line.
|
|
||||||
3. Play an episode.
|
The feature has three stages: **snapshot**, **merge**, and **match**.
|
||||||
|
|
||||||
|
1. **Snapshot** - When you start watching a new title, SubMiner queries the AniList GraphQL API for the media's character list. Each character's names, reading, role, description, birthday, voice actors, and portrait are fetched and saved as a local JSON snapshot in `character-dictionaries/snapshots/anilist-{mediaId}.json`. Images are downloaded and base64-encoded into the snapshot.
|
||||||
|
|
||||||
|
2. **Merge** - SubMiner maintains a most-recently-used list of media IDs (default: 3). Snapshots from those titles are merged into a single Yomitan ZIP - `character-dictionaries/merged.zip` - which is always named "SubMiner Character Dictionary" so Yomitan treats it as a single stable dictionary across rebuilds.
|
||||||
|
|
||||||
|
3. **Match** - During subtitle rendering, Yomitan scans subtitle text against all loaded dictionaries including the character dictionary. SubMiner only accepts character entries for the current AniList media when that media ID is known, then flags matching tokens with `isNameMatch` and highlights them in the overlay with a distinct color.
|
||||||
|
|
||||||
|
## Enabling the feature
|
||||||
|
|
||||||
|
Character dictionary sync is disabled by default. To turn it on:
|
||||||
|
|
||||||
|
1. Enable **Name Match** in Settings → Subtitle Style, or set `subtitleStyle.nameMatchEnabled: true` in your config.
|
||||||
|
2. Start watching. SubMiner queries AniList's public GraphQL API, which needs no authentication, and imports the merged dictionary into Yomitan.
|
||||||
|
3. Optionally enable **Name Match Images** (Settings → Subtitle Style) to show inline circular character portraits next to matched names in subtitles.
|
||||||
|
|
||||||
```jsonc
|
```jsonc
|
||||||
{
|
{
|
||||||
"subtitleStyle": {
|
"subtitleStyle": {
|
||||||
"nameMatchEnabled": true,
|
"nameMatchEnabled": true,
|
||||||
"nameMatchImagesEnabled": true,
|
"nameMatchImagesEnabled": true, // optional - inline portraits
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
No AniList account is needed. Logging in to AniList is only for [watch progress sync](/anilist-integration).
|
::: tip
|
||||||
|
The first sync for a media title takes a few seconds while character data and portraits are fetched from AniList. Subsequent launches reuse the cached media match and snapshot without a fresh AniList lookup.
|
||||||
|
|
||||||
The character dictionary does not work when `yomitan.externalProfilePath` is set, because SubMiner then uses another app's Yomitan profile read-only.
|
Dictionary sync does not require a loaded Japanese subtitle track. Once Yomitan is ready, SubMiner can reuse an installed character dictionary even before the first subtitle is processed. If Yomitan readiness times out, the status reports a failure instead of staying on **Checking**.
|
||||||
|
:::
|
||||||
|
|
||||||
## What happens when you play something
|
::: info
|
||||||
|
AniList character data is fetched via public GraphQL queries - no account or access token is needed. AniList authentication is only required for the separate [watch-progress sync](/anilist-integration) feature.
|
||||||
|
:::
|
||||||
|
|
||||||
When a new show starts, SubMiner:
|
::: warning
|
||||||
|
If `yomitan.externalProfilePath` is set, SubMiner switches to read-only external-profile mode. In that mode SubMiner can reuse another app's installed Yomitan dictionaries/settings, but SubMiner's own character-dictionary features are fully disabled.
|
||||||
|
:::
|
||||||
|
|
||||||
1. Guesses the title from the filename and finds it on AniList.
|
## Name generation
|
||||||
2. Downloads the cast list and portraits.
|
|
||||||
3. Builds the dictionary and imports it into SubMiner's Yomitan.
|
|
||||||
|
|
||||||
A notification shows each step. Once it says the dictionary is ready, names match from the next subtitle line.
|
A single character produces many searchable terms so that names are recognized regardless of how they appear in dialogue. SubMiner generates variants for:
|
||||||
|
|
||||||
Each character gets entries for the full name, family name, given name, and common honorifics (`さん`, `君`, `ちゃん`, `先生`, and others), so `太郎さん` matches as well as `太郎`.
|
**Spacing and combination:**
|
||||||
|
|
||||||
SubMiner keeps your most recent shows loaded in one merged dictionary. `anilist.characterDictionary.maxLoaded` sets how many. Starting another show drops the oldest one. Only the current show's characters are highlighted.
|
- Full name with space: 須々木 心一
|
||||||
|
- Combined form: 須々木心一
|
||||||
|
- Family name alone: 須々木
|
||||||
|
- Given name alone: 心一
|
||||||
|
|
||||||
### How long it takes
|
Unspaced native names (AniList often stores 渡辺真奈美 without a separator) are split into family/given parts with MeCab when it is available: person-name POS tags (姓/名) decide the boundary, validated against AniList's romanized first/last name readings. Without MeCab, a length heuristic based on the romanized readings guesses the boundary. That guess can be ambiguous, since 東紫乃 could be 東+紫乃 or 東紫+乃, so SubMiner generates terms for the top two candidate boundaries and the real surname still matches. Snapshots built without MeCab are regenerated automatically once MeCab becomes available, upgrading them to the exact splits.
|
||||||
|
|
||||||
The first time you watch a show, most of the time goes into downloading portraits, one at a time. A typical cast takes seconds to a minute. A very large cast takes much longer: One Piece has over a thousand characters and takes around 10 minutes. After that the show is cached, and later episodes load it from disk.
|
**Middle-dot removal** (common in katakana foreign names):
|
||||||
|
|
||||||
|
- ア・リ・ス → アリス (combined), plus individual segments
|
||||||
|
|
||||||
|
**Honorific suffixes** - each base name is expanded with 15 common suffixes:
|
||||||
|
|
||||||
|
| Honorific | Reading |
|
||||||
|
| --------- | ---------- |
|
||||||
|
| さん | さん |
|
||||||
|
| 様 | さま |
|
||||||
|
| 先生 | せんせい |
|
||||||
|
| 先輩 | せんぱい |
|
||||||
|
| 後輩 | こうはい |
|
||||||
|
| 氏 | し |
|
||||||
|
| 君 | くん |
|
||||||
|
| くん | くん |
|
||||||
|
| ちゃん | ちゃん |
|
||||||
|
| たん | たん |
|
||||||
|
| 坊 | ぼう |
|
||||||
|
| 殿 | どの |
|
||||||
|
| 博士 | はかせ |
|
||||||
|
| 社長 | しゃちょう |
|
||||||
|
| 部長 | ぶちょう |
|
||||||
|
|
||||||
|
**Romanized names** - names stored in romaji on AniList are converted to kana aliases so they can match against Japanese subtitle text.
|
||||||
|
|
||||||
|
This means a character like "太郎" generates entries for 太郎, 太郎さん, 太郎先生, 太郎君, 太郎ちゃん, and so on - all with correct readings.
|
||||||
|
|
||||||
|
## Name matching
|
||||||
|
|
||||||
|
Name matching runs inside Yomitan's scanning pipeline during subtitle tokenization.
|
||||||
|
|
||||||
|
1. Yomitan receives subtitle text and scans for dictionary matches.
|
||||||
|
2. Entries from "SubMiner Character Dictionary" are checked with exact primary-source matching - the token must match the entry's `originalText` with `isPrimary: true` and `matchType: 'exact'`.
|
||||||
|
3. When the current AniList media ID is known, entries whose embedded media ID belongs to a different title are ignored for name matching and inline portraits.
|
||||||
|
4. Matched tokens are flagged `isNameMatch: true` and forwarded to the renderer.
|
||||||
|
5. If `subtitleStyle.nameMatchEnabled` is enabled, the renderer applies the name-match highlight color (default: `#f5bde6`).
|
||||||
|
6. If `subtitleStyle.nameMatchImagesEnabled` is enabled, the renderer also injects a small circular AniList portrait from the cached snapshot image data.
|
||||||
|
|
||||||
|
Older snapshot schema versions are regenerated automatically. Current-version snapshots are normally reused, but when `subtitleStyle.nameMatchImagesEnabled` is enabled SubMiner also checks whether the cached snapshot contains usable character portrait data. If it does not, the snapshot is refreshed so the merged dictionary can include images.
|
||||||
|
|
||||||
|
Name matches are visually distinct from [N+1 targeting, frequency highlighting, and JLPT tags](/subtitle-annotations) so you can tell at a glance whether a highlighted word is a character name or a vocabulary target.
|
||||||
|
|
||||||
|
**Key settings:**
|
||||||
|
|
||||||
|
| Option | Default | Description |
|
||||||
|
| -------------------------------------- | --------- | ----------------------------------------- |
|
||||||
|
| `subtitleStyle.nameMatchEnabled` | `false` | Enable dictionary sync and highlighting |
|
||||||
|
| `subtitleStyle.nameMatchImagesEnabled` | `false` | Show small AniList portraits beside names |
|
||||||
|
| `subtitleStyle.nameMatchColor` | `#f5bde6` | Highlight color for matched names |
|
||||||
|
|
||||||
|
## Inline character portraits
|
||||||
|
|
||||||
|
When `subtitleStyle.nameMatchImagesEnabled` is enabled, SubMiner injects a small circular portrait image directly into the subtitle line next to each matched character name.
|
||||||
|
|
||||||
|
Portraits are sourced from the local snapshot - they are embedded at snapshot-generation time and served from the cached ZIP, so no network request happens during playback. Images are downloaded from AniList CDN once per character and stored in `character-dictionaries/img/`.
|
||||||
|
|
||||||
|
If a snapshot was generated before portrait data was available (e.g. during an earlier version or offline sync), SubMiner detects the missing image data on the next media match and automatically refreshes the snapshot so portraits are included in the next merged dictionary build.
|
||||||
|
|
||||||
|
**To enable:**
|
||||||
|
|
||||||
|
- Settings → Subtitle Style → **Name Match Images**, or
|
||||||
|
- `subtitleStyle.nameMatchImagesEnabled: true` in config.
|
||||||
|
|
||||||
|
The portrait size is controlled by the surrounding subtitle font size and renders as a circle clipped from the character's AniList cover image.
|
||||||
|
|
||||||
|
::: tip
|
||||||
|
Inline portraits help you quickly associate names with faces while building vocabulary - especially useful for shows with large casts where you're still learning who's who.
|
||||||
|
:::
|
||||||
|
|
||||||
|
## Dictionary entries
|
||||||
|
|
||||||
|
Each character entry in the Yomitan dictionary includes structured content:
|
||||||
|
|
||||||
|
- **Name** - the matched Japanese name form
|
||||||
|
- **Known names** - generated non-honorific Japanese aliases for that character, excluding raw romanized/English aliases from lookup results
|
||||||
|
- **Role badge** - color-coded by role: main / "Protagonist" (score 100), primary / "Main Character" (75), side / "Side Character" (50), appears / "Minor Role" (25). AniList's MAIN maps to main, SUPPORTING to primary, and BACKGROUND to side.
|
||||||
|
- **Portrait** - character image from AniList, embedded in the ZIP
|
||||||
|
- **Description** - biography text from AniList (collapsible)
|
||||||
|
- **Character information** - age, birthday, gender, blood type (collapsible)
|
||||||
|
- **Voiced by** - voice actor name and portrait (collapsible)
|
||||||
|
|
||||||
|
The three collapsible sections can be configured to start open or closed:
|
||||||
|
|
||||||
|
```jsonc
|
||||||
|
{
|
||||||
|
"anilist": {
|
||||||
|
"characterDictionary": {
|
||||||
|
"collapsibleSections": {
|
||||||
|
"description": false,
|
||||||
|
"characterInformation": false,
|
||||||
|
"voicedBy": false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Auto-sync lifecycle
|
||||||
|
|
||||||
|
When `subtitleStyle.nameMatchEnabled` is `true`, SubMiner runs an auto-sync routine whenever the active media changes.
|
||||||
|
|
||||||
|
These phases are emitted through the configured notification surface. Some phases are skipped when unnecessary: `generating` only appears on a cache miss, `building` only appears when the merged ZIP must be rebuilt, and `importing` only appears when Yomitan needs a new dictionary import.
|
||||||
|
|
||||||
|
**Phases:**
|
||||||
|
|
||||||
|
1. **checking** - Is there already a cached snapshot for this media ID?
|
||||||
|
2. **generating** - No cache hit: fetch characters from AniList GraphQL, download portraits (250ms throttle between image requests), save snapshot JSON.
|
||||||
|
3. MRU update (no notification) - add the media ID to the most-recently-used list and evict old entries beyond `maxLoaded`.
|
||||||
|
4. **building** - Merge active snapshots into a single Yomitan ZIP. A SHA-1 revision hash is computed from the media set - if it matches the previously imported revision, the import is skipped.
|
||||||
|
5. **importing** - Push the ZIP into Yomitan when the installed revision differs. Dictionary checks and settings updates wait for the extension to be ready, independently of subtitle processing. Readiness and quick operations have bounded timeouts; imports have a separate budget that grows with the ZIP size.
|
||||||
|
6. **ready** - Dictionary is live. Character names will match on the next subtitle line.
|
||||||
|
|
||||||
|
**State tracking** is persisted in `character-dictionaries/auto-sync-state.json`. AniList media matches are cached separately in `character-dictionaries/anilist-resolution-cache.json` so snapshot hits do not need another AniList search.
|
||||||
|
|
||||||
|
```jsonc
|
||||||
|
{
|
||||||
|
"activeMediaIds": ["170942 - Frieren", "163134 - ...", "154587 - ..."],
|
||||||
|
"mergedRevision": "a1b2c3d4e5f6",
|
||||||
|
"mergedDictionaryTitle": "SubMiner Character Dictionary",
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
(Entries are `"<mediaId> - <title>"` label strings; bare numeric IDs from older versions are still read.)
|
||||||
|
|
||||||
|
The `maxLoaded` setting (default: 3) controls how many media snapshots stay in the active set. When you start a 4th title, the oldest is evicted and the merged dictionary is rebuilt without it.
|
||||||
|
|
||||||
|
## Manual generation
|
||||||
|
|
||||||
|
You can generate a character dictionary from the command line without auto-sync:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Generate for a file or directory
|
||||||
|
subminer dictionary /path/to/media
|
||||||
|
|
||||||
|
# Generate for current anime (AppImage)
|
||||||
|
SubMiner.AppImage --dictionary
|
||||||
|
```
|
||||||
|
|
||||||
|
This creates a standalone dictionary ZIP for the target media and saves it alongside the snapshots.
|
||||||
|
|
||||||
## Correcting AniList matches
|
## Correcting AniList matches
|
||||||
|
|
||||||
SubMiner can match the wrong show when a filename is ambiguous, for example `Re - ZERO, Starting Life in Another World (2016)` matching a different `Re...` series. To fix it:
|
SubMiner uses `guessit` to infer the anime title from the active filename before searching AniList. Some filenames can still resolve to the wrong title. For example, `Re - ZERO, Starting Life in Another World (2016)` can be misread as a different `Re...` series.
|
||||||
|
|
||||||
1. Press `Ctrl/Cmd+D` to open the character dictionary manager.
|
Use the in-app selector or CLI to pin the correct AniList media for the whole series:
|
||||||
2. Click **Override**, edit the title if needed, search, and pick the right result.
|
|
||||||
|
|
||||||
From the command line:
|
- In-app: open the manager with `Ctrl/Cmd+D`, use the **Override** tab/button, edit the prefilled title if needed, then search and choose the correct result.
|
||||||
|
- CLI: `--dictionary-candidates` still lists matches for the current filename guess.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# List AniList matches for a file
|
# List candidate AniList matches for a file
|
||||||
subminer dictionary --candidates "/path/to/episode.mkv"
|
subminer dictionary --candidates "/path/to/episode.mkv"
|
||||||
|
|
||||||
# Save the correct AniList ID for that series
|
# Save the correct AniList media ID for that series
|
||||||
subminer dictionary --select 21355 "/path/to/episode.mkv"
|
subminer dictionary --select 21355 "/path/to/episode.mkv"
|
||||||
|
|
||||||
|
# Equivalent direct app flags
|
||||||
|
SubMiner.AppImage --dictionary-candidates --dictionary-target "/path/to/episode.mkv"
|
||||||
|
SubMiner.AppImage --dictionary-select --dictionary-anilist-id 21355 --dictionary-target "/path/to/episode.mkv"
|
||||||
|
|
||||||
|
# Open the in-app selector from the running app
|
||||||
|
subminer app --session-action '{"actionId":"openCharacterDictionaryManager"}'
|
||||||
```
|
```
|
||||||
|
|
||||||
The override applies to every episode of that season in the same folder. Other seasons are not affected, even when they share the folder. The override also sets which entry [AniList watch progress](/anilist-integration) updates, so one fix covers both.
|
SubMiner stores manual selections in `character-dictionaries/anilist-overrides.json`. The episode's parent directory **and detected season** define the override scope, so later episodes in the same season keep the selected AniList ID even if their filename guesses differ, while a different season never inherits the override - including when every season sits in one flat folder. When you replace a wrong match, SubMiner removes that stale media ID from the merged dictionary's active set and rebuilds/imports the merged character dictionary.
|
||||||
|
|
||||||
## Managing loaded shows
|
An override also pins the entry used for [AniList watch progress](/anilist-integration), so correcting a wrong match once fixes both the character dictionary and progress tracking.
|
||||||
|
|
||||||
The manager (`Ctrl/Cmd+D`) lists the shows in the merged dictionary and marks the current one.
|
## Managing loaded entries
|
||||||
|
|
||||||
- **Remove** drops a show from the dictionary. You cannot remove the show you are watching.
|
Open the manager with `Ctrl/Cmd+D` (`shortcuts.openCharacterDictionaryManager`). The manager shows the merged dictionary's active MRU entries, marks the current anime, and lets you adjust eviction priority for the other loaded entries.
|
||||||
- **Up/Down** changes which show gets dropped first when a new one is added.
|
|
||||||
- **Override** replaces a show's AniList match.
|
|
||||||
|
|
||||||
## Generating from the command line
|
- **Remove** drops a non-current entry from the active merged dictionary and rebuilds/imports once.
|
||||||
|
- **Up/Down** changes MRU order for future eviction; the merged dictionary is rebuilt and re-imported after a reorder.
|
||||||
|
- **Override** opens the AniList selector for that entry's title so you can replace a saved loaded entry.
|
||||||
|
|
||||||
```bash
|
The current anime cannot be removed while you are watching it; it stays loaded until playback changes.
|
||||||
subminer dictionary /path/to/media
|
|
||||||
|
## File structure
|
||||||
|
|
||||||
|
All character dictionary data lives under `{userData}/character-dictionaries/`:
|
||||||
|
|
||||||
|
```text
|
||||||
|
character-dictionaries/
|
||||||
|
snapshots/
|
||||||
|
anilist-170942.json # Per-media character snapshot
|
||||||
|
anilist-163134.json
|
||||||
|
merged.zip # Active merged dictionary (imported into Yomitan)
|
||||||
|
auto-sync-state.json # Tracks active media IDs and revision
|
||||||
|
anilist-overrides.json # Manual series-to-AniList overrides
|
||||||
|
img/
|
||||||
|
m170942-c12345.jpg # Character portrait
|
||||||
|
m170942-va67890.jpg # Voice actor portrait
|
||||||
```
|
```
|
||||||
|
|
||||||
This builds a standalone dictionary file for that file or folder without playing it. With the AppImage directly, use `SubMiner.AppImage --dictionary`.
|
**Snapshot format** (v19, `CHARACTER_DICTIONARY_FORMAT_VERSION`): each snapshot contains the media ID, title, entry count, timestamp, an array of Yomitan term entries, and base64-encoded images. Snapshots with a different format version are regenerated.
|
||||||
|
|
||||||
## Configuration
|
**ZIP structure** follows the Yomitan dictionary format:
|
||||||
|
|
||||||
Defaults are in the [configuration reference](/configuration).
|
```text
|
||||||
|
merged.zip
|
||||||
|
index.json # { title, revision, format: 3, author: "SubMiner", description }
|
||||||
|
tag_bank_1.json # Tag definitions
|
||||||
|
term_bank_1.json # Up to 10,000 terms per bank
|
||||||
|
term_bank_2.json
|
||||||
|
img/ # Embedded character and VA portraits
|
||||||
|
```
|
||||||
|
|
||||||
| Key | What it does |
|
## Configuration reference
|
||||||
| ---------------------------------------------------------------------- | ------------------------------------------------ |
|
|
||||||
| `subtitleStyle.nameMatchEnabled` | Build the dictionary and color character names |
|
| Option | Default | Description |
|
||||||
| `subtitleStyle.nameMatchImagesEnabled` | Show a portrait next to matched names |
|
| ---------------------------------------------------------------------- | --------- | --------------------------------------------------------------- |
|
||||||
| `subtitleStyle.nameMatchColor` | Color for character names |
|
| `anilist.characterDictionary.maxLoaded` | `3` | Number of recent media snapshots kept in the merged dictionary |
|
||||||
| `anilist.characterDictionary.maxLoaded` | Number of recent shows kept in the dictionary |
|
| `anilist.characterDictionary.profileScope` | `"all"` | Apply dictionary to `"all"` Yomitan profiles or `"active"` only |
|
||||||
| `anilist.characterDictionary.collapsibleSections.description` | Show the description expanded in the popup |
|
| `anilist.characterDictionary.collapsibleSections.description` | `false` | Start Description section expanded |
|
||||||
| `anilist.characterDictionary.collapsibleSections.characterInformation` | Show age, birthday, and similar details expanded |
|
| `anilist.characterDictionary.collapsibleSections.characterInformation` | `false` | Start Character Information section expanded |
|
||||||
| `anilist.characterDictionary.collapsibleSections.voicedBy` | Show the voice actor section expanded |
|
| `anilist.characterDictionary.collapsibleSections.voicedBy` | `false` | Start Voiced By section expanded |
|
||||||
| `shortcuts.openCharacterDictionaryManager` | Shortcut for the manager |
|
| `subtitleStyle.nameMatchEnabled` | `false` | Enable character-dictionary sync and name highlighting |
|
||||||
|
| `subtitleStyle.nameMatchImagesEnabled` | `false` | Show small AniList portraits beside matched names |
|
||||||
|
| `subtitleStyle.nameMatchColor` | `#f5bde6` | Highlight color for character-name matches |
|
||||||
|
|
||||||
|
## Reference implementation
|
||||||
|
|
||||||
|
SubMiner's character dictionary builder is inspired by the [Japanese Character Name Dictionary](https://github.com/bee-san/Japanese_Character_Name_Dictionary) project - a standalone Rust web service that generates Yomitan character dictionaries from AniList and VNDB data.
|
||||||
|
|
||||||
|
The reference implementation covers the same ground: name variant generation, honorific expansion, structured Yomitan content, and portrait embedding. It also reads VNDB as a source for visual novel characters. Key differences:
|
||||||
|
|
||||||
|
| | SubMiner | Reference Implementation |
|
||||||
|
| ---------------------- | -------------------------------------------- | ------------------------------------- |
|
||||||
|
| **Runtime** | TypeScript, runs inside Electron | Rust, standalone web service |
|
||||||
|
| **Data sources** | AniList only | AniList + VNDB |
|
||||||
|
| **Delivery** | Auto-synced into bundled Yomitan | ZIP download via web UI |
|
||||||
|
| **Honorific strategy** | Eager generation at build time | Lazy generation during ZIP export |
|
||||||
|
| **Caching** | File-based snapshots | Multi-tier (memory + disk + SQLite) |
|
||||||
|
| **Updates** | Revision-hashed; skips reimport if unchanged | URL-encoded settings for auto-refresh |
|
||||||
|
|
||||||
|
If you work with visual novels or want a standalone dictionary generator independent of SubMiner, the reference implementation is worth checking out.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
**It seems stuck.** Check the notification. While generating it shows counts (`image 120/400`), an estimate of time left, and an elapsed clock. If the clock moves, it is still working, and large casts are slow (see [how long it takes](#how-long-it-takes)). If you missed the notification, open the notification history with `Ctrl/Cmd+N`. For errors, check the app log ([log locations](/troubleshooting)).
|
- **Names not highlighting:** Confirm `subtitleStyle.nameMatchEnabled` is `true`. Check that the current media has an AniList entry - SubMiner needs a media ID to fetch characters.
|
||||||
|
- **Inline portraits missing:** Confirm `subtitleStyle.nameMatchImagesEnabled` is `true`. On the next character dictionary sync, SubMiner refreshes current-version snapshots that do not contain usable cached character portrait data. Portraits still require AniList to return an image and the image download to succeed.
|
||||||
|
- **Sync seems stuck:** The auto-sync debounces for 800ms after media changes and throttles image downloads at 250ms per image. Large casts (50+ characters) take longer. Check the status bar for the current sync phase.
|
||||||
|
- **Wrong characters showing:** Open the in-app character dictionary manager (`Ctrl/Cmd+D`) to remove/reorder loaded titles, then use **Override** to correct the active AniList match. You can also run `--dictionary-candidates`, then save the correct media with `--dictionary-select --dictionary-anilist-id <id>`. SubMiner ignores character entries from other loaded titles for subtitle name matching and inline portraits once the current media ID is known.
|
||||||
|
- **Yomitan import fails:** SubMiner waits up to 7 seconds for Yomitan to be ready for mutations. If Yomitan is still loading dictionaries or performing another import, the operation may time out. Restarting the overlay typically resolves this.
|
||||||
|
- **Portraits missing:** Images are downloaded from AniList CDN during snapshot generation. If the network was unavailable during the initial sync, delete the snapshot file from `character-dictionaries/snapshots/` and let it regenerate.
|
||||||
|
|
||||||
**Import failed or timed out.** Yomitan may have been busy importing another dictionary. Play the next episode or restart SubMiner. The import may have finished anyway, so check for the character popup before retrying.
|
## Related
|
||||||
|
|
||||||
**Names are not highlighted.** Check that `subtitleStyle.nameMatchEnabled` is `true`, that `yomitan.externalProfilePath` is empty, and that the show was found on AniList. The wrong show's cast means a wrong match. See [correcting AniList matches](#correcting-anilist-matches).
|
- [Subtitle Annotations](/subtitle-annotations) - how name matches interact with N+1, frequency, and JLPT layers
|
||||||
|
- [AniList Integration](/anilist-integration) - watch-progress sync and AniList authentication (separate from character dictionary)
|
||||||
**Portraits are missing.** Portraits need AniList to have an image and the download to succeed. If you were offline during the first sync, delete that show's file from `character-dictionaries/snapshots/` in the SubMiner config directory and replay it.
|
- [Configuration Reference](/configuration) - full config options
|
||||||
|
|
||||||
SubMiner's generator is based on the [Japanese Character Name Dictionary](https://github.com/bee-san/Japanese_Character_Name_Dictionary) project, which also supports VNDB and works without SubMiner.
|
|
||||||
+1434
-379
File diff suppressed because it is too large.
Load diff
+3
-3
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Short recordings from real playback sessions.
|
Short recordings from real playback sessions.
|
||||||
|
|
||||||
_Yomitan_ is the pop-up dictionary. _Jimaku_ is a community subtitle database. _alass_ and _ffsubsync_ retime subtitles against the audio. _Jellyfin_ is a self-hosted media server. A _texthooker_ is a web page that mirrors the current subtitle as selectable text.
|
Some vocabulary for what follows. _Yomitan_ is the pop-up dictionary. _Jimaku_ is a community subtitle database. _alass_ and _ffsubsync_ retime subtitles against the audio. _Jellyfin_ is a self-hosted media server. A _texthooker_ is a web page that mirrors the current subtitle as selectable text so browser tools can read it.
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { withBase } from 'vitepress';
|
import { withBase } from 'vitepress';
|
||||||
@@ -18,7 +18,7 @@ Mine a card from Yomitan or straight from a subtitle line. SubMiner attaches the
|
|||||||
<source :src="withBase(`/assets/minecard.webm?v=${v}`)" type="video/webm" />
|
<source :src="withBase(`/assets/minecard.webm?v=${v}`)" type="video/webm" />
|
||||||
<source :src="withBase(`/assets/minecard.mp4?v=${v}`)" type="video/mp4" />
|
<source :src="withBase(`/assets/minecard.mp4?v=${v}`)" type="video/mp4" />
|
||||||
<a :href="withBase(`/assets/minecard.webm?v=${v}`)" target="_blank" rel="noreferrer">
|
<a :href="withBase(`/assets/minecard.webm?v=${v}`)" target="_blank" rel="noreferrer">
|
||||||
<img :src="withBase(`/assets/minecard.webp?v=${v}`)" alt="Animated demo of mining a card" style="width: 100%; height: auto;" />
|
<img :src="withBase(`/assets/minecard.webp?v=${v}`)" alt="SubMiner demo Animated fallback" style="width: 100%; height: auto;" />
|
||||||
</a>
|
</a>
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ Search Jimaku, download a track, then retime it with alass or ffsubsync without
|
|||||||
|
|
||||||
## Jellyfin integration
|
## Jellyfin integration
|
||||||
|
|
||||||
Browse your Jellyfin library and play from SubMiner, or cast to SubMiner from another Jellyfin client. Watch progress syncs back to the server.
|
Browse your Jellyfin library, cast to a device, and start playback from SubMiner. Watch progress goes back to the Jellyfin server.
|
||||||
|
|
||||||
<!-- <video controls playsinline preload="metadata" :poster="withBase(`/assets/demos/jellyfin-poster.jpg?v=${v}`)">
|
<!-- <video controls playsinline preload="metadata" :poster="withBase(`/assets/demos/jellyfin-poster.jpg?v=${v}`)">
|
||||||
<source :src="withBase(`/assets/demos/jellyfin.webm?v=${v}`)" type="video/webm" />
|
<source :src="withBase(`/assets/demos/jellyfin.webm?v=${v}`)" type="video/webm" />
|
||||||
|
|||||||
+174
-108
@@ -1,12 +1,12 @@
|
|||||||
# Building and testing
|
# Building and testing
|
||||||
|
|
||||||
Build, run, and test SubMiner from source. Architecture and workflow rules live in the repo's internal docs, starting at [`docs/README.md`](https://github.com/ksyasuda/SubMiner/blob/main/docs/README.md). Module boundaries and layering rules are in [`docs/architecture/README.md`](https://github.com/ksyasuda/SubMiner/blob/main/docs/architecture/README.md). The lane-by-lane test guide is [`docs/workflow/verification.md`](https://github.com/ksyasuda/SubMiner/blob/main/docs/workflow/verification.md).
|
Architecture and workflow guidance lives in `docs/README.md` at the repo root. This page covers build and test commands only.
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
- [Bun](https://bun.sh), at the version pinned in `package.json`
|
- [Bun](https://bun.sh)
|
||||||
- A system `lua` interpreter for the mpv plugin tests (`bun run test:launcher`, `bun run test:env`)
|
- A system `lua` interpreter for `bun run test:launcher` / `bun run test:plugin:src`
|
||||||
- macOS only: `bun run build` compiles a Swift window helper. Set `SUBMINER_SKIP_MACOS_HELPER_BUILD=1` to skip it.
|
- macOS builds compile a Swift helper via `scripts/prepare-build-assets.mjs` (skip with `SUBMINER_SKIP_MACOS_HELPER_BUILD=1`)
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
@@ -16,20 +16,36 @@ cd SubMiner
|
|||||||
make deps
|
make deps
|
||||||
```
|
```
|
||||||
|
|
||||||
`make deps` initializes submodules and installs dependencies for the root, `stats/`, and `vendor/texthooker-ui`. The Yomitan submodule installs its own dependencies during `bun run build`.
|
`make deps` initializes submodules and installs root, `stats/`, and `vendor/texthooker-ui` dependencies. The Yomitan submodule installs its own dependencies on demand during `bun run build`.
|
||||||
|
|
||||||
## Build
|
## Building
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bun run build # app build, including bundled Yomitan from vendor/subminer-yomitan
|
# Main app build
|
||||||
|
bun run build
|
||||||
|
|
||||||
|
# Platform packages
|
||||||
bun run build:appimage # Linux AppImage
|
bun run build:appimage # Linux AppImage
|
||||||
bun run build:mac # macOS DMG + ZIP (signed)
|
bun run build:mac # macOS DMG + ZIP (signed)
|
||||||
bun run build:mac:unsigned # macOS DMG + ZIP (unsigned)
|
bun run build:mac:unsigned # macOS DMG + ZIP (unsigned)
|
||||||
bun run build:win # Windows NSIS installer + ZIP
|
bun run build:win # Windows NSIS installer + ZIP
|
||||||
make build-launcher # launcher only, output: dist/launcher/subminer
|
|
||||||
|
# Optional launcher artifact only
|
||||||
|
make build-launcher
|
||||||
|
# output: dist/launcher/subminer
|
||||||
```
|
```
|
||||||
|
|
||||||
The launcher source is `launcher/*.ts`. `dist/launcher/subminer` is generated, so never edit it by hand. The repo-root `./subminer` is a stale path and verification rejects it. `make install-linux` and `make install-macos` copy from `dist/launcher/subminer`. To check the launcher build:
|
`bun run build` includes the Yomitan build step. It builds the bundled Chrome extension directly from the `vendor/subminer-yomitan` submodule into `build/yomitan` using Bun.
|
||||||
|
|
||||||
|
## Launcher artifact workflow
|
||||||
|
|
||||||
|
- Source of truth: `launcher/*.ts`
|
||||||
|
- Generated output: `dist/launcher/subminer`
|
||||||
|
- Do not hand-edit generated launcher output.
|
||||||
|
- Repo-root `./subminer` is a stale artifact path and is rejected by verification checks.
|
||||||
|
- Install targets (`make install-linux`, `make install-macos`) copy from `dist/launcher/subminer`.
|
||||||
|
|
||||||
|
Verify the workflow:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make build-launcher
|
make build-launcher
|
||||||
@@ -37,21 +53,20 @@ dist/launcher/subminer --help >/dev/null
|
|||||||
bash scripts/verify-generated-launcher.sh
|
bash scripts/verify-generated-launcher.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
## Run locally
|
## Running locally
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bun run dev # build, then launch with --start --dev
|
bun run dev # builds + launches with --start --dev
|
||||||
make dev-watch # watch TS + renderer and relaunch Electron
|
electron . --start --dev --log-level debug # equivalent Electron launch with verbose logging
|
||||||
make dev-watch-macos # same, forcing --backend macos
|
electron . --background # tray/background mode, minimal default logging
|
||||||
electron . --start --dev --log-level debug # verbose launch of an existing build
|
make dev-start # build + launch via Makefile
|
||||||
electron . --background # tray/background mode
|
make dev-watch # watch TS + renderer and launch Electron (faster edit loop)
|
||||||
|
make dev-watch-macos # same as dev-watch, forcing --backend macos
|
||||||
```
|
```
|
||||||
|
|
||||||
Development and debug launches use a separate `SubMiner-dev` profile so runtime experiments cannot modify the installed app's configuration or Yomitan dictionaries. To intentionally use the production profile for a development launch, set `SUBMINER_USE_PRODUCTION_PROFILE=1`. Use that override only after backing up the profile.
|
For mpv-plugin-driven testing without exporting `SUBMINER_BINARY_PATH` each run, set a one-time
|
||||||
|
dev binary path with `mpv.subminerBinaryPath` in your SubMiner config. The launcher injects it into
|
||||||
Launch source builds through `bun run dev` or `bun run electron`. SubMiner refuses to load its profile when the running Electron major differs from the version pinned by the repository.
|
the mpv plugin at runtime:
|
||||||
|
|
||||||
To test through the mpv plugin without exporting `SUBMINER_BINARY_PATH` each time, point `mpv.subminerBinaryPath` in your config at the dev script. The launcher passes it to the plugin at runtime:
|
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -61,9 +76,35 @@ To test through the mpv plugin without exporting `SUBMINER_BINARY_PATH` each tim
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Test
|
## Testing
|
||||||
|
|
||||||
Run the handoff gate before submitting substantial changes:
|
Default lanes:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bun run test # alias for test:fast
|
||||||
|
bun run test:fast # full source lanes: src + launcher-unit + scripts + runtime compat
|
||||||
|
bun run test:runtime:compat # compiled/runtime compatibility slice only
|
||||||
|
bun run test:env # launcher/plugin + env-sensitive verification
|
||||||
|
bun run test:stats # stats dashboard UI suite
|
||||||
|
bun run test:immersion:sqlite # SQLite persistence lane
|
||||||
|
bun run test:subtitle # maintained alass/ffsubsync subtitle surface
|
||||||
|
```
|
||||||
|
|
||||||
|
Test lane membership is defined once in `scripts/test-lanes.ts` and discovered by
|
||||||
|
directory, so new test files join their lane automatically. `scripts/run-test-lane.mjs`
|
||||||
|
runs each test file in its own `bun test` process (per-file isolation) so a hanging
|
||||||
|
test or leaked global in one file cannot cascade into the rest of the lane; pass
|
||||||
|
`--jobs N` to parallelize or `--single-process` for one shared process.
|
||||||
|
|
||||||
|
- `bun run test` and `bun run test:fast` cover the full discovered `src/**` suite, launcher unit tests, `scripts/**` tests, and the compiled/runtime compatibility lane.
|
||||||
|
- `bun run test:runtime:compat` covers the compiled/runtime slice directly: `ipc`, `anki-jimaku-ipc`, `overlay-manager`, `config-validation`, `startup-config`, and `registry`.
|
||||||
|
- `bun run test:env` covers environment-sensitive checks: launcher smoke/plugin verification plus the Bun source SQLite lane.
|
||||||
|
- `bun run test:stats` runs the stats dashboard suite under `stats/src/**`.
|
||||||
|
- `bun run test:immersion:sqlite` is the reproducible persistence lane when you need real DB-backed SQLite coverage under Bun.
|
||||||
|
|
||||||
|
The Bun-managed discovery lanes intentionally exclude a small compiled/runtime-focused set: `src/core/services/ipc.test.ts`, `src/core/services/anki-jimaku-ipc.test.ts`, `src/core/services/overlay-manager.test.ts`, `src/main/config-validation.test.ts`, `src/main/runtime/startup-config.test.ts`, and `src/main/runtime/registry.test.ts`. `bun run test:runtime:compat` keeps them in the standard workflow via `dist/**`.
|
||||||
|
|
||||||
|
Suggested local gate before handoff:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bun run typecheck
|
bun run typecheck
|
||||||
@@ -73,108 +114,133 @@ bun run build
|
|||||||
bun run test:smoke:dist
|
bun run test:smoke:dist
|
||||||
```
|
```
|
||||||
|
|
||||||
For smaller changes, start with the cheapest lane that covers what you touched:
|
If you changed docs in `docs-site/`, also run:
|
||||||
|
|
||||||
| Command | Covers |
|
|
||||||
| ------------------------------- | ------------------------------------------------------------------------ |
|
|
||||||
| `bun run test` / `test:fast` | All `src/**` tests, launcher unit tests, and `scripts/**` tests |
|
|
||||||
| `bun run test:config` | Config schema, defaults, and `config.example.jsonc` generation |
|
|
||||||
| `bun run test:launcher` | Launcher tests plus the Lua plugin tests |
|
|
||||||
| `bun run test:env` | Launcher e2e smoke, Lua plugin tests, SQLite immersion tests from source |
|
|
||||||
| `bun run test:scripts` | Build and release scripts under `scripts/**` |
|
|
||||||
| `bun run test:stats` | Stats dashboard UI under `stats/src/**` |
|
|
||||||
| `bun run test:runtime:compat` | Compiled-runtime smoke against `dist/` (run `bun run build` first) |
|
|
||||||
| `bun run test:immersion:sqlite` | Compiles, then runs the SQLite-backed immersion tracker tests |
|
|
||||||
| `bun run test:subtitle` | alass/ffsubsync subtitle sync |
|
|
||||||
| `bun run test:docs:kb` | Internal docs, `AGENTS.md`, and repo skills |
|
|
||||||
|
|
||||||
Lane membership is defined in `scripts/test-lanes.ts` and discovered by directory, so a new test file joins its lane automatically. Do not hand-list test files in `package.json`. `scripts/run-test-lane.mjs` runs each file in its own `bun test` process, so a hanging test cannot take down the rest of the lane. Pass `--jobs N` to parallelize or `--single-process` to share one process while debugging.
|
|
||||||
|
|
||||||
Launcher smoke artifacts go to `.tmp/launcher-smoke`. CI uploads them when the smoke step fails.
|
|
||||||
|
|
||||||
## Format
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make pretty # format the maintained source and stats files
|
bun run docs:test
|
||||||
bun run format:check:src # check the same set without writing
|
bun run docs:build
|
||||||
```
|
```
|
||||||
|
|
||||||
`bun run format` runs Prettier over the whole repo. Use it only when you mean to.
|
For production docs routing, run the versioned build:
|
||||||
|
|
||||||
## Config generation
|
|
||||||
|
|
||||||
```bash
|
|
||||||
bun run electron . --generate-config # write a default config to ~/.config/SubMiner/config.jsonc (%APPDATA%\SubMiner\config.jsonc on Windows)
|
|
||||||
bun run generate:config-example # regenerate config.example.jsonc from the defaults
|
|
||||||
```
|
|
||||||
|
|
||||||
`make generate-config` and `make generate-example-config` wrap the same commands.
|
|
||||||
|
|
||||||
Config definitions are split by domain under `src/config/definitions/`:
|
|
||||||
|
|
||||||
- defaults: `defaults-*.ts`
|
|
||||||
- option metadata: `options-*.ts`
|
|
||||||
- generated template sections and comments: `template-sections.ts`
|
|
||||||
|
|
||||||
`src/config/definitions.ts` composes them into the public API (`DEFAULT_CONFIG`, registries, template export). A new key also needs a resolver entry under `src/config/resolve/`, or the resolved config keeps the default.
|
|
||||||
|
|
||||||
## Documentation site
|
|
||||||
|
|
||||||
The user docs live in `docs-site/` (VitePress).
|
|
||||||
|
|
||||||
```bash
|
|
||||||
bun --cwd docs-site install
|
|
||||||
bun run docs:dev # dev server at http://localhost:5173
|
|
||||||
bun run docs:test # docs regression tests (links, pinned strings)
|
|
||||||
bun run docs:build # production build into docs-site/.vitepress/dist
|
|
||||||
bun run docs:preview # preview the build at http://localhost:4173
|
|
||||||
```
|
|
||||||
|
|
||||||
Run `bun run docs:test` and `bun run docs:build` whenever you change `docs-site/`.
|
|
||||||
|
|
||||||
Production uses the versioned build:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bun run docs:build:versioned
|
bun run docs:build:versioned
|
||||||
```
|
```
|
||||||
|
|
||||||
It writes `.tmp/docs-versioned-site`: the latest stable docs at `/` with a generated `/versions` page, and development docs at `/main/`. Prerelease tags are skipped. Stable archives under `/v/<version>/` are built once and stored in R2. Without R2 credentials the build skips archive sync, so a local run only produces `/` and `/main/`.
|
The versioned build writes `.tmp/docs-versioned-site` with latest stable docs at `/`, development docs at `/main/`, and stable archives under `/v/<version>/`. Prerelease tags are skipped. Public assets from `docs-site/public/assets` are shared from root `/assets/` so large demo media is not duplicated into every version archive; generated VitePress CSS and JS assets stay under each version route. Stale `.tmp/docs-versioned-archive-cache` generations are pruned after a successful build, and intermediate `.tmp/docs-versioned-build` workspaces are removed.
|
||||||
|
|
||||||
The `docs-pages` GitHub Actions workflow uploads that output to Cloudflare Pages with Wrangler. Cloudflare's Git-integration builds are disabled on purpose, so do not re-enable them in the dashboard. `docs-site/README.md` has the full deployment setup.
|
Focused commands:
|
||||||
|
|
||||||
## Makefile targets
|
```bash
|
||||||
|
bun run test:config # Source-level config schema/validation tests
|
||||||
|
bun run test:launcher # Launcher regression tests (config discovery + command routing)
|
||||||
|
bun run test:launcher:smoke:src # Launcher e2e smoke: launcher -> mpv IPC -> overlay start/stop wiring
|
||||||
|
bun run test:env # Launcher smoke + Lua plugin gate
|
||||||
|
bun run test:src # Bun-managed maintained src/** discovery lane
|
||||||
|
bun run test:launcher:unit:src # Bun-managed maintained launcher unit lane
|
||||||
|
bun run test:scripts # Bun-managed scripts/** test lane
|
||||||
|
bun run test:immersion:sqlite:src # Bun source lane
|
||||||
|
```
|
||||||
|
|
||||||
Run `make help` for the full list.
|
Dist-level tests are now an explicit smoke lane used to validate compiled/runtime assumptions.
|
||||||
|
|
||||||
| Target | Description |
|
Launcher smoke artifacts are written to `.tmp/launcher-smoke` locally and uploaded by CI/release workflows when the smoke step fails.
|
||||||
| --------------------------- | ------------------------------------------------------------ |
|
|
||||||
| `make deps` | Init submodules and install root, stats, and texthooker deps |
|
Smoke and optional deep dist commands:
|
||||||
| `make build` | Build the platform package for the current OS |
|
|
||||||
| `make build-linux` | Build the Linux package |
|
```bash
|
||||||
| `make build-macos` | Build the signed macOS package |
|
bun run build # compile dist artifacts
|
||||||
| `make build-macos-unsigned` | Build the unsigned macOS package |
|
bun run test:immersion:sqlite # compile + run SQLite-backed immersion tests under Bun
|
||||||
| `make build-launcher` | Generate the launcher in `dist/launcher/` |
|
bun run test:smoke:dist # explicit smoke scope for compiled runtime
|
||||||
| `make install` | Install platform artifacts (wrapper, theme, AppImage or app) |
|
```
|
||||||
| `make pretty` | Run scoped Prettier formatting |
|
|
||||||
| `make generate-config` | Generate a default config |
|
Use `bun run test:immersion:sqlite` when you need real DB-backed coverage for the immersion tracker.
|
||||||
|
|
||||||
|
## Formatting
|
||||||
|
|
||||||
|
Use the scoped formatter for normal app-repo work:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make pretty
|
||||||
|
bun run format:check:src
|
||||||
|
```
|
||||||
|
|
||||||
|
- `make pretty` runs the maintained Prettier allowlists (`format:src` and `format:stats`).
|
||||||
|
- `bun run format:check:src` checks the same scoped set without writing changes.
|
||||||
|
- `bun run format` remains the broad repo-wide Prettier command; use it intentionally.
|
||||||
|
|
||||||
|
## Config generation
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Generate default config to ~/.config/SubMiner/config.jsonc (or %APPDATA%\SubMiner\config.jsonc on Windows)
|
||||||
|
bun run electron . --generate-config
|
||||||
|
|
||||||
|
# Regenerate the repo's config.example.jsonc from centralized defaults
|
||||||
|
bun run generate:config-example
|
||||||
|
```
|
||||||
|
|
||||||
|
Convenience wrappers still exist:
|
||||||
|
|
||||||
|
- `make generate-config`
|
||||||
|
- `make generate-example-config`
|
||||||
|
|
||||||
|
## Documentation site
|
||||||
|
|
||||||
|
The docs site now lives in `docs-site/` inside the main repo.
|
||||||
|
|
||||||
|
From the SubMiner app repo:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bun --cwd docs-site install
|
||||||
|
bun run docs:dev # Dev server at http://localhost:5173
|
||||||
|
bun run docs:build # Production build into docs-site/.vitepress/dist
|
||||||
|
bun run docs:preview # Preview built site at http://localhost:4173
|
||||||
|
bun run docs:test # Docs regression tests
|
||||||
|
```
|
||||||
|
|
||||||
|
Deployment: production docs are built with `bun run docs:build:versioned` and uploaded directly to Cloudflare Pages by the `docs-pages` GitHub Actions workflow using Wrangler (from `.tmp/docs-versioned-site`). Cloudflare's automatic Git-integration deployments are intentionally disabled - see `docs-site/README.md` for the deployment contract. Do not re-enable Pages build settings in the Cloudflare dashboard.
|
||||||
|
|
||||||
|
## Makefile reference
|
||||||
|
|
||||||
|
Run `make help` for a full list of targets. Key ones:
|
||||||
|
|
||||||
|
| Target | Description |
|
||||||
|
| --------------------------- | ----------------------------------------------------------------- |
|
||||||
|
| `make build` | Build platform package for detected OS |
|
||||||
|
| `make build-launcher` | Generate launcher wrappers and CLI payload in `dist/launcher/` |
|
||||||
|
| `make install` | Install platform artifacts (wrapper, theme, AppImage/app bundle) |
|
||||||
|
| `make deps` | Init submodules and install root/stats/texthooker-ui deps |
|
||||||
|
| `make pretty` | Run scoped Prettier formatting for maintained source/config files |
|
||||||
|
| `make generate-config` | Generate default config from centralized registry |
|
||||||
|
| `make build-linux` | Convenience wrapper for Linux packaging |
|
||||||
|
| `make build-macos` | Convenience wrapper for signed macOS packaging |
|
||||||
|
| `make build-macos-unsigned` | Convenience wrapper for unsigned macOS packaging |
|
||||||
|
|
||||||
## Contributor notes
|
## Contributor notes
|
||||||
|
|
||||||
- See [Architecture](/architecture) for module boundaries and [IPC + runtime contracts](/ipc-contracts) before adding IPC channels.
|
- To add/change a config default, edit the matching domain file in `src/config/definitions/defaults-*.ts`.
|
||||||
- `src/core/services/overlay-manager.ts` owns overlay window and visibility state.
|
- To add/change config option metadata, edit the matching domain file in `src/config/definitions/options-*.ts`.
|
||||||
- In `src/main/` modules, pass simple dependencies as inline objects. Add a helper or adapter only when it adapts, validates, or gets reused.
|
- To add/change generated config template blocks/comments, update `src/config/definitions/template-sections.ts`.
|
||||||
- Packaged Linux desktop launches pass `--background` through `build.linux.executableArgs` in `package.json`.
|
- Keep `src/config/definitions.ts` as the composed public API (`DEFAULT_CONFIG`, registries, template export) that wires domain modules together.
|
||||||
|
- Overlay window/visibility state is owned by `src/core/services/overlay-manager.ts`.
|
||||||
|
- Runtime architecture/module-boundary conventions are summarized in [Architecture](/architecture), with canonical internal guidance in `docs/architecture/README.md` at the repo root.
|
||||||
|
- Linux packaged desktop launches pass `--background` using electron-builder `build.linux.executableArgs` in `package.json`.
|
||||||
|
- Prefer direct inline deps objects in `src/main/` modules for simple pass-through wiring.
|
||||||
|
- Add a helper/adapter service only when it performs meaningful adaptation, validation, or reuse (not identity mapping).
|
||||||
|
|
||||||
## Environment variables
|
## Environment variables
|
||||||
|
|
||||||
| Variable | Description |
|
| Variable | Description |
|
||||||
| ---------------------------------- | ---------------------------------------------------------------- |
|
| ---------------------------------- | ------------------------------------------------------------------------------ |
|
||||||
| `SUBMINER_APPIMAGE_PATH` | SubMiner app binary the launcher uses for playback |
|
| `SUBMINER_APPIMAGE_PATH` | Override SubMiner app binary path for launcher playback commands |
|
||||||
| `SUBMINER_BINARY_PATH` | Alias for `SUBMINER_APPIMAGE_PATH` |
|
| `SUBMINER_BINARY_PATH` | Alias for `SUBMINER_APPIMAGE_PATH` |
|
||||||
| `SUBMINER_ROFI_THEME` | rofi theme for the launcher picker |
|
| `SUBMINER_ROFI_THEME` | Override rofi theme path for launcher picker |
|
||||||
| `SUBMINER_MPV_PLUGIN_PATH` | mpv plugin directory the launcher injects |
|
| `SUBMINER_MPV_PLUGIN_PATH` | Override the mpv plugin directory injected by the launcher |
|
||||||
| `SUBMINER_LOG_LEVEL` | App log level (`debug`, `info`, `warn`, `error`) |
|
| `SUBMINER_LOG_LEVEL` | Override app logger level (`debug`, `info`, `warn`, `error`) |
|
||||||
| `SUBMINER_MPV_LOG` | Shared mpv/app log file path |
|
| `SUBMINER_MPV_LOG` | Override mpv/app shared log file path |
|
||||||
| `SUBMINER_JELLYFIN_ACCESS_TOKEN` | Jellyfin access token, used before the stored encrypted session |
|
| `SUBMINER_JIMAKU_API_KEY` | Override Jimaku API key for launcher subtitle downloads |
|
||||||
| `SUBMINER_JELLYFIN_USER_ID` | Jellyfin user ID |
|
| `SUBMINER_JIMAKU_API_KEY_COMMAND` | Command used to resolve Jimaku API key at runtime |
|
||||||
| `SUBMINER_SKIP_MACOS_HELPER_BUILD` | Set to `1` to skip the macOS helper build during `bun run build` |
|
| `SUBMINER_JIMAKU_API_BASE_URL` | Override Jimaku API base URL |
|
||||||
|
| `SUBMINER_JELLYFIN_ACCESS_TOKEN` | Override Jellyfin access token (used before stored encrypted session fallback) |
|
||||||
|
| `SUBMINER_JELLYFIN_USER_ID` | Optional Jellyfin user ID override |
|
||||||
|
| `SUBMINER_SKIP_MACOS_HELPER_BUILD` | Set to `1` to skip building the macOS helper binary during `bun run build` |
|
||||||
@@ -8,6 +8,7 @@ const installationContents = readFileSync(new URL('./installation.md', import.me
|
|||||||
const mpvPluginContents = readFileSync(new URL('./mpv-plugin.md', import.meta.url), 'utf8');
|
const mpvPluginContents = readFileSync(new URL('./mpv-plugin.md', import.meta.url), 'utf8');
|
||||||
const developmentContents = readFileSync(new URL('./development.md', import.meta.url), 'utf8');
|
const developmentContents = readFileSync(new URL('./development.md', import.meta.url), 'utf8');
|
||||||
const changelogContents = readFileSync(new URL('./changelog.md', import.meta.url), 'utf8');
|
const changelogContents = readFileSync(new URL('./changelog.md', import.meta.url), 'utf8');
|
||||||
|
const docsPackageContents = readFileSync(new URL('./package.json', import.meta.url), 'utf8');
|
||||||
const ankiIntegrationContents = readFileSync(
|
const ankiIntegrationContents = readFileSync(
|
||||||
new URL('./anki-integration.md', import.meta.url),
|
new URL('./anki-integration.md', import.meta.url),
|
||||||
'utf8',
|
'utf8',
|
||||||
@@ -100,6 +101,15 @@ test('docs state the real secondary-subtitle and Anki field-matching behavior',
|
|||||||
expect(ankiIntegrationContents).toContain('case-insensitively');
|
expect(ankiIntegrationContents).toContain('case-insensitively');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('docs dev server links version navigation to local dev routes', () => {
|
||||||
|
expect(docsPackageContents).toContain('scripts/build-versioned-docs.ts');
|
||||||
|
expect(docsPackageContents).toContain(
|
||||||
|
'SUBMINER_DOCS_VERSION_LINK_ORIGIN=local bun run ../scripts/build-versioned-docs.ts',
|
||||||
|
);
|
||||||
|
expect(docsPackageContents).toContain('SUBMINER_DOCS_VERSION_LINK_ORIGIN=local');
|
||||||
|
expect(docsPackageContents).toContain('SUBMINER_DOCS_VERSION_MANIFEST');
|
||||||
|
});
|
||||||
|
|
||||||
test('docs changelog keeps the current minor release headings aligned with the root changelog', () => {
|
test('docs changelog keeps the current minor release headings aligned with the root changelog', () => {
|
||||||
const docsHeadings = extractCurrentMinorHeadings(changelogContents);
|
const docsHeadings = extractCurrentMinorHeadings(changelogContents);
|
||||||
expect(docsHeadings.length).toBeGreaterThan(0);
|
expect(docsHeadings.length).toBeGreaterThan(0);
|
||||||
|
|||||||
@@ -1,212 +0,0 @@
|
|||||||
// Cloudflare Pages Function serving frozen `/v/<version>/` doc archives from R2.
|
|
||||||
// Archives are uploaded by scripts/build-versioned-docs.ts and never ship in the Pages
|
|
||||||
// deployment itself, so they do not count toward the Pages file limit. Requires an R2
|
|
||||||
// binding named DOCS_ARCHIVES on the Pages project (see docs-site/README.md).
|
|
||||||
|
|
||||||
// Minimal slice of the Workers R2 API used here; avoids a workers-types dependency.
|
|
||||||
type R2Range = { offset: number; length?: number } | { suffix: number };
|
|
||||||
|
|
||||||
type R2ObjectMeta = {
|
|
||||||
size: number;
|
|
||||||
httpEtag: string;
|
|
||||||
range?: R2Range;
|
|
||||||
};
|
|
||||||
|
|
||||||
type R2ObjectBody = R2ObjectMeta & { body: ReadableStream };
|
|
||||||
|
|
||||||
type R2GetOptions = { range?: Headers; onlyIf?: Headers };
|
|
||||||
|
|
||||||
export type ArchiveBucket = {
|
|
||||||
get(key: string, options?: R2GetOptions): Promise<R2ObjectMeta | R2ObjectBody | null>;
|
|
||||||
};
|
|
||||||
|
|
||||||
type ArchiveContext = {
|
|
||||||
request: Request;
|
|
||||||
env: { DOCS_ARCHIVES: ArchiveBucket };
|
|
||||||
};
|
|
||||||
|
|
||||||
export type ArchiveRoute =
|
|
||||||
| { kind: 'redirect'; location: string; status: 301 | 302 }
|
|
||||||
| { kind: 'lookup'; version: string; keys: string[] }
|
|
||||||
| { kind: 'not-found' };
|
|
||||||
|
|
||||||
const CONTENT_TYPES: Record<string, string> = {
|
|
||||||
css: 'text/css; charset=utf-8',
|
|
||||||
gif: 'image/gif',
|
|
||||||
html: 'text/html; charset=utf-8',
|
|
||||||
ico: 'image/x-icon',
|
|
||||||
jpeg: 'image/jpeg',
|
|
||||||
jpg: 'image/jpeg',
|
|
||||||
js: 'text/javascript; charset=utf-8',
|
|
||||||
json: 'application/json; charset=utf-8',
|
|
||||||
jsonc: 'application/json; charset=utf-8',
|
|
||||||
mjs: 'text/javascript; charset=utf-8',
|
|
||||||
mkv: 'video/x-matroska',
|
|
||||||
mp4: 'video/mp4',
|
|
||||||
png: 'image/png',
|
|
||||||
svg: 'image/svg+xml',
|
|
||||||
ttf: 'font/ttf',
|
|
||||||
txt: 'text/plain; charset=utf-8',
|
|
||||||
webm: 'video/webm',
|
|
||||||
webp: 'image/webp',
|
|
||||||
woff: 'font/woff',
|
|
||||||
woff2: 'font/woff2',
|
|
||||||
xml: 'application/xml; charset=utf-8',
|
|
||||||
};
|
|
||||||
|
|
||||||
function extensionOf(path: string): string | null {
|
|
||||||
const name = path.slice(path.lastIndexOf('/') + 1);
|
|
||||||
const dot = name.lastIndexOf('.');
|
|
||||||
return dot > 0 ? name.slice(dot + 1).toLowerCase() : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
function contentTypeFor(key: string): string {
|
|
||||||
return CONTENT_TYPES[extensionOf(key) ?? ''] ?? 'application/octet-stream';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Maps a request path onto candidate R2 keys, mirroring the Pages clean-URL rules the
|
|
||||||
// archives were built for (`cleanUrls: true`).
|
|
||||||
export function resolveArchiveRoute(pathname: string, search = ''): ArchiveRoute {
|
|
||||||
if (pathname === '/v' || pathname === '/v/') {
|
|
||||||
return { kind: 'redirect', location: '/versions', status: 302 };
|
|
||||||
}
|
|
||||||
|
|
||||||
const match = /^\/v\/(\d+\.\d+\.\d+)(\/.*)?$/.exec(pathname);
|
|
||||||
if (!match) return { kind: 'not-found' };
|
|
||||||
|
|
||||||
const version = match[1]!;
|
|
||||||
const rest = match[2];
|
|
||||||
if (!rest) {
|
|
||||||
return { kind: 'redirect', location: `/v/${version}/${search}`, status: 301 };
|
|
||||||
}
|
|
||||||
|
|
||||||
let decoded: string;
|
|
||||||
try {
|
|
||||||
decoded = decodeURIComponent(rest);
|
|
||||||
} catch {
|
|
||||||
return { kind: 'not-found' };
|
|
||||||
}
|
|
||||||
if (decoded.split('/').some((segment) => segment === '..' || segment === '.')) {
|
|
||||||
return { kind: 'not-found' };
|
|
||||||
}
|
|
||||||
|
|
||||||
const prefix = `v/${version}`;
|
|
||||||
const path = `${prefix}${decoded}`;
|
|
||||||
const keys = decoded.endsWith('/')
|
|
||||||
? [`${path}index.html`]
|
|
||||||
: extensionOf(decoded)
|
|
||||||
? [path]
|
|
||||||
: [`${path}.html`, `${path}/index.html`];
|
|
||||||
|
|
||||||
return { kind: 'lookup', version, keys };
|
|
||||||
}
|
|
||||||
|
|
||||||
function cacheControlFor(key: string): string {
|
|
||||||
// VitePress content-hashes everything it emits under assets/.
|
|
||||||
if (/\/assets\//.test(key) && extensionOf(key) !== 'html') {
|
|
||||||
return 'public, max-age=31536000, immutable';
|
|
||||||
}
|
|
||||||
return 'public, max-age=3600';
|
|
||||||
}
|
|
||||||
|
|
||||||
function hasBody(object: R2ObjectMeta | R2ObjectBody): object is R2ObjectBody {
|
|
||||||
return 'body' in object && object.body !== undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
function contentRange(range: R2Range, size: number): { start: number; end: number } {
|
|
||||||
if ('suffix' in range) {
|
|
||||||
const length = Math.min(range.suffix, size);
|
|
||||||
return { start: size - length, end: size - 1 };
|
|
||||||
}
|
|
||||||
const length = range.length ?? size - range.offset;
|
|
||||||
return { start: range.offset, end: range.offset + length - 1 };
|
|
||||||
}
|
|
||||||
|
|
||||||
async function respondWithObject(options: {
|
|
||||||
request: Request;
|
|
||||||
bucket: ArchiveBucket;
|
|
||||||
key: string;
|
|
||||||
status: number;
|
|
||||||
}): Promise<Response | null> {
|
|
||||||
const { request, bucket, key } = options;
|
|
||||||
// Ranges and conditional requests only make sense for the page that was asked for,
|
|
||||||
// not the 404 fallback.
|
|
||||||
const isRequestedObject = options.status === 200;
|
|
||||||
const wantsRange = isRequestedObject && request.headers.has('range');
|
|
||||||
|
|
||||||
let object: R2ObjectMeta | R2ObjectBody | null;
|
|
||||||
try {
|
|
||||||
object = await bucket.get(key, {
|
|
||||||
range: wantsRange ? request.headers : undefined,
|
|
||||||
onlyIf: isRequestedObject ? request.headers : undefined,
|
|
||||||
});
|
|
||||||
} catch {
|
|
||||||
// R2 rejects unsatisfiable ranges.
|
|
||||||
return new Response(null, { status: 416 });
|
|
||||||
}
|
|
||||||
if (!object) return null;
|
|
||||||
|
|
||||||
const headers = new Headers({
|
|
||||||
'Content-Type': contentTypeFor(key),
|
|
||||||
'Cache-Control': cacheControlFor(key),
|
|
||||||
ETag: object.httpEtag,
|
|
||||||
'Accept-Ranges': 'bytes',
|
|
||||||
'X-Robots-Tag': 'noindex, follow',
|
|
||||||
});
|
|
||||||
|
|
||||||
// R2 returns the object without a body when an If-None-Match/If-Modified-Since
|
|
||||||
// precondition matched.
|
|
||||||
if (!hasBody(object)) {
|
|
||||||
return new Response(null, { status: 304, headers });
|
|
||||||
}
|
|
||||||
|
|
||||||
let status = options.status;
|
|
||||||
if (wantsRange && object.range) {
|
|
||||||
const { start, end } = contentRange(object.range, object.size);
|
|
||||||
status = 206;
|
|
||||||
headers.set('Content-Range', `bytes ${start}-${end}/${object.size}`);
|
|
||||||
headers.set('Content-Length', String(end - start + 1));
|
|
||||||
} else {
|
|
||||||
headers.set('Content-Length', String(object.size));
|
|
||||||
}
|
|
||||||
|
|
||||||
return new Response(request.method === 'HEAD' ? null : object.body, { status, headers });
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function onRequest({ request, env }: ArchiveContext): Promise<Response> {
|
|
||||||
if (request.method !== 'GET' && request.method !== 'HEAD') {
|
|
||||||
return new Response('Method Not Allowed', { status: 405, headers: { Allow: 'GET, HEAD' } });
|
|
||||||
}
|
|
||||||
|
|
||||||
const url = new URL(request.url);
|
|
||||||
const route = resolveArchiveRoute(url.pathname, url.search);
|
|
||||||
|
|
||||||
if (route.kind === 'redirect') {
|
|
||||||
return Response.redirect(new URL(route.location, url).toString(), route.status);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (route.kind === 'lookup') {
|
|
||||||
for (const key of route.keys) {
|
|
||||||
const response = await respondWithObject({
|
|
||||||
request,
|
|
||||||
bucket: env.DOCS_ARCHIVES,
|
|
||||||
key,
|
|
||||||
status: 200,
|
|
||||||
});
|
|
||||||
if (response) return response;
|
|
||||||
}
|
|
||||||
|
|
||||||
const notFoundPage = await respondWithObject({
|
|
||||||
request,
|
|
||||||
bucket: env.DOCS_ARCHIVES,
|
|
||||||
key: `v/${route.version}/404.html`,
|
|
||||||
status: 404,
|
|
||||||
});
|
|
||||||
if (notFoundPage) return notFoundPage;
|
|
||||||
}
|
|
||||||
|
|
||||||
return new Response('Not Found', {
|
|
||||||
status: 404,
|
|
||||||
headers: { 'Content-Type': 'text/plain; charset=utf-8', 'X-Robots-Tag': 'noindex, follow' },
|
|
||||||
});
|
|
||||||
}
|
|
||||||
+336
-63
@@ -1,19 +1,18 @@
|
|||||||
# Immersion tracking
|
# Immersion tracking
|
||||||
|
|
||||||
SubMiner records what you watch and mine in a local SQLite database and shows it in a stats dashboard. Tracking is on by default. Nothing leaves your machine.
|
SubMiner logs your watching and mining activity to a local SQLite database and shows it in the built-in stats dashboard. Tracking is on by default; turn it off if you would rather not keep the data.
|
||||||
|
|
||||||
## What gets tracked
|
"Immersion" here means time spent watching and reading native Japanese content. **All of it stays on your machine.** Nothing is uploaded anywhere. SQLite is a single file on disk, so there is no database server to install or run.
|
||||||
|
|
||||||
- Watch sessions: time watched, subtitle lines seen, words seen, cards mined, pauses and seeks.
|
Each session records watch time, subtitle lines seen, words encountered, and cards mined. SubMiner also keeps exact lifetime summary tables and daily and monthly rollups. Read it through the stats UI, or point any SQLite tool at the file.
|
||||||
- Every primary subtitle line you see, with its timing, so you can search and mine from it later.
|
|
||||||
- Vocabulary and kanji you encounter, with how often and where.
|
|
||||||
- Library entries per show and episode, with cover art from AniList (or TMDB for live action) and YouTube channel metadata.
|
|
||||||
|
|
||||||
An episode counts as watched once you reach 85% of it.
|
::: tip For most users
|
||||||
|
Leave tracking on and use the [Stats Dashboard](#stats-dashboard). The retention, performance, SQL, and schema sections below are reference material for querying or tuning the database yourself. Skip them.
|
||||||
|
:::
|
||||||
|
|
||||||
## Setup
|
Episode completion for local `watched` state uses the shared `DEFAULT_MIN_WATCH_RATIO` (`85%`) value from `src/shared/watch-threshold.ts`.
|
||||||
|
|
||||||
Tracking needs no setup. To turn it off or move the database:
|
## Enabling
|
||||||
|
|
||||||
```jsonc
|
```jsonc
|
||||||
{
|
{
|
||||||
@@ -24,106 +23,380 @@ Tracking needs no setup. To turn it off or move the database:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
An empty `dbPath` stores `immersion.sqlite` in SubMiner's config directory (`~/.config/SubMiner/` on Linux). Set a path to keep it elsewhere.
|
- Leave `dbPath` empty to use the default location (`immersion.sqlite` in SubMiner's app-data directory).
|
||||||
|
- Set an explicit path to move the database (useful for backups, cloud syncing, or external tools).
|
||||||
To share stats and watch history between machines, use [`subminer sync <host>`](/launcher-script#sync-between-machines). It merges both databases. Copying the file with a cloud sync tool makes one side overwrite the other.
|
- To share stats and watch history between two machines, use [`subminer sync <host>`](/launcher-script#sync-between-machines) instead of file-level cloud sync. It merges both databases instead of letting one side overwrite the other.
|
||||||
|
|
||||||
## Open the dashboard
|
|
||||||
|
|
||||||
- In the overlay: focus it and press the `stats.toggleKey` key (Backquote by default).
|
|
||||||
- In a browser: run `subminer stats`, then open `http://127.0.0.1:6969` (or your `stats.serverPort`). Set `stats.autoOpenBrowser` to open it automatically.
|
|
||||||
- Background server: `subminer stats -b` starts a stats server that keeps running without the launcher attached. `subminer stats -s` stops it. You can still start SubMiner for playback while it runs.
|
|
||||||
|
|
||||||
`subminer stats` fails if `immersionTracking.enabled` is `false`. The server only answers on localhost, so reverse proxies and Tailscale Serve URLs do not work.
|
|
||||||
|
|
||||||
## Stats dashboard
|
## Stats dashboard
|
||||||
|
|
||||||
### Overview
|
The same immersion data powers the stats dashboard.
|
||||||
|
|
||||||
Recent sessions, a streak calendar, watch-time history, and totals for completed episodes and shows.
|
The browser dashboard and in-app stats overlay both load from the local HTTP server.
|
||||||
|
The server accepts loopback hosts only and rejects requests from other browser origins,
|
||||||
|
including opaque origins such as `file://`. API clients without a browser origin can
|
||||||
|
still use the local API. Mutation requests with a body must use `application/json`;
|
||||||
|
bodyless deletion and Anki browse requests remain supported. Requests rejected by the
|
||||||
|
host or origin checks receive `403`; mutation bodies without a JSON content type
|
||||||
|
receive `415`.
|
||||||
|
|
||||||
Deleting a session or session group refreshes the Overview totals, charts, calendar, and vocabulary summary automatically. If a refresh fails, Overview keeps the previous totals visible and offers **Retry**.
|
Use the loopback dashboard URL directly. Reverse-proxied dashboards and Tailscale
|
||||||
|
Serve URLs are unsupported because their host or browser origin is not the local
|
||||||
|
server's origin. SSH stats synchronization is unchanged.
|
||||||
|
|
||||||
|
Scripts sending a JSON body must include the content type. For example, this
|
||||||
|
requests a duplicate-line cleanup preview without changing the database. Replace
|
||||||
|
the port if you configured a different `stats.serverPort`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl http://127.0.0.1:6969/api/stats/maintenance/duplicate-lines \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
|
-d '{"dryRun":true}'
|
||||||
|
```
|
||||||
|
|
||||||
|
- In-app overlay: focus the visible overlay, then press the key from `stats.toggleKey` (default: `` ` `` / `Backquote`).
|
||||||
|
- Launcher command: run `subminer stats` to start the local stats server on demand (it also opens the dashboard in your browser when `stats.autoOpenBrowser` is enabled; the default is `false`).
|
||||||
|
- Background server: run `subminer stats -b` to start or reuse a dedicated background stats daemon without keeping the launcher attached, and `subminer stats -s` to stop that daemon.
|
||||||
|
- Maintenance commands: run `subminer stats cleanup` or `subminer stats cleanup -v` to backfill/repair vocabulary metadata (`headword`, `reading`, POS) and purge stale or excluded rows from `imm_words` on demand; `subminer stats cleanup -l` repairs lifetime summary tables non-destructively (recomputed from per-episode history, so lifetime totals older than the session retention window are kept); `subminer stats cleanup --duplicate-lines` collapses repeated lines left behind by typeset subtitles (see [Repeated Line Cleanup](#repeated-line-cleanup)). `subminer stats rebuild` and `subminer stats backfill` rebuild or backfill rollup data.
|
||||||
|
- Browser page: open `http://127.0.0.1:6969` directly if the local stats server is already running.
|
||||||
|
|
||||||
|
SubMiner waits for the local server to bind before reporting that the dashboard is available. If another process already uses the configured port, the command reports the startup error and the desktop app stays open. Opening the in-app dashboard also reports startup failures through your configured status notifications.
|
||||||
|
|
||||||
|
`subminer stats -s` stops a background stats server or cancels a pending background start. It leaves a foreground-only server running, so an open in-app dashboard stays connected. Shutdown gives active HTTP requests one second to finish before closing their connections and finalizing stats.
|
||||||
|
|
||||||
|
### Stats API resource IDs
|
||||||
|
|
||||||
|
Resource IDs in URLs must be positive safe integers written as decimal digits without leading zeros, fractions, or exponent notation. ID lists in JSON bodies must contain positive safe integer numbers. Invalid IDs or list entries return `400` before any mutation; bulk requests do not apply just the valid subset. Pagination limits keep their existing rounding and bounds.
|
||||||
|
|
||||||
|
### Dashboard tabs
|
||||||
|
|
||||||
|
#### Overview
|
||||||
|
|
||||||
|
Recent sessions, streak calendar, watch-time history, and a tracking snapshot with completed episodes/anime totals.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Library
|
#### Library
|
||||||
|
|
||||||
Your shows as cover-art cards with search, sorting, per-series progress, and an episode list linking to mined cards. The **All Titles** / **Anime** / **Live Action** / **YouTube** selector filters the grid. YouTube videos are grouped by channel.
|
Cover-art library with search and sorting, per-series progress, episode drill-down, and direct links into mined cards.
|
||||||
|
|
||||||
Seasons get separate cards when a season number is detected. Live-action titles that AniList cannot match are looked up on [TMDB](/configuration#tmdb). If a title gets no match, open it and use **Link to TMDB** to pick one by hand.
|
Local files and Jellyfin items with detected season numbers are split into season-specific library entries, so `Season 1` and `Season 2` folders do not merge into one show card.
|
||||||
|
|
||||||
The same show can end up on several cards when release names disagree. To fix that:
|
When older stats already grouped multiple seasons under one series entry, SubMiner moves parsed episodes into the season-specific entries on startup and rebuilds the affected summaries.
|
||||||
|
|
||||||
- Merge: click **Select**, tick the duplicate cards, choose **Merge Selected**, and pick the entry to keep. Sessions, cards, and watch time move over, and future episodes with those names join the kept entry.
|
**Live-action dramas and movies.** Anime covers come from AniList, which has no live-action titles. A title that AniList cannot match is looked up on [TMDB](/configuration#tmdb) instead (release builds bundle a key; source builds need your own): only a Japanese-language, non-animated result whose known titles match the parsed filename exactly is accepted, and it supplies the poster, synopsis, English and Japanese titles, and episode count. If nothing matches automatically, open the title and use **Link to TMDB** to search and pick it by hand. A TMDB show spans all of its seasons, so entries that resolve to the same TMDB title are merged into one card regardless of the season folder they came from, and the merged season titles are remembered so later episodes land on the same card. The **All Titles** / **Anime** / **Live Action** / **YouTube** selector above the grid narrows the Library to one kind, and a title's detail view shows whether it is a drama or a movie. Linking a title to AniList again turns it back into an anime entry. Changing providers downloads the replacement cover before saving the new link; a failed download leaves the previous link and artwork intact. A title without a cover clears the previous artwork. Automatic TMDB matching leaves existing AniList links unchanged.
|
||||||
- Move one episode: hover its row in the episode list and click **→** to assign it to another entry. SubMiner remembers the correction.
|
|
||||||
- Suggested merges appear as **Possible duplicate** above the grid. Choose **Review merge** or **Not duplicates**.
|
|
||||||
|
|
||||||
**Delete Entry** in a title's header removes the show with all its episodes, sessions, and lines. You cannot delete the title that is currently playing.
|
Jellyfin stream URLs are normalized to stable item links before stats titles are shown, so playback query parameters are not displayed in the dashboard.
|
||||||
|
|
||||||
|
When YouTube channel metadata is available, the Library tab groups videos by creator/channel. Use the kind selector above the grid (**All Titles**, **Anime**, **Live Action**, **YouTube**) to filter the library. Channel pages show tracked videos and their stats without AniList controls. Existing channel entries are classified as YouTube automatically on startup, preserving viewing history and manual video assignments. Anime and YouTube entries with the same normalized title remain separate, including during stats sync. Channels are excluded from anime metadata matching, season repair, and duplicate recommendations.
|
||||||
|
|
||||||
|
A library entry is identified by its parsed title plus any detected season, so the same show can end up on several cards when releases disagree about the title or omit the season tag. Two fixes are available:
|
||||||
|
|
||||||
|
- **Merge duplicates.** Hit **Select** above the grid, tick the cards that are the same show, and choose **Merge Selected**. Pick which entry to keep in the dialog; every episode moves onto it and the other cards are removed. Nothing is deleted, so sessions, mined cards and watch time all carry over. AniList-linked and TMDB-linked entries cannot be merged together, and YouTube channels cannot be merged with anime or live-action entries. SubMiner remembers the merged title variants, so future episodes parsed with one of those names join the kept entry instead of recreating a duplicate card.
|
||||||
|
- **Move a single episode.** Hover an episode row in a title's episode list and use the **→** button to reassign it to another library entry. Anime and live-action entries are interchangeable here, but a YouTube video can only move between channels. The correction is remembered, so later filename parsing or Jellyfin metadata cannot move that episode back. For local files, later episodes in the same directory inherit the correction when their detected seasons are compatible and every manual correction there points to the same entry; a file that parses to a title which already has its own library entry keeps that identity instead. Conflicting seasons or manual destinations are left for review. If the move empties the old entry, that card is removed and you are returned to the grid.
|
||||||
|
|
||||||
|
Once cover art resolves a series to an AniList entry, cards with compatible seasons are folded together automatically only when the searched title exactly matches an AniList title or synonym. A fuzzy result that points at an AniList entry already used by another card appears as a **Possible duplicate** review above the Library grid instead. Choose **Review merge** to compare the cards and pick which one to keep, or **Not duplicates** to dismiss that suggestion permanently. Entries with conflicting explicit season numbers are left alone rather than merged or suggested.
|
||||||
|
|
||||||
|
Open a title and use **Delete Entry** in its header to remove a mistakenly tracked show outright. This deletes every episode of that title along with their sessions, subtitle lines, rollups and cover art, drops the words and kanji that were only seen there, and removes the card from the Library grid. Individual episodes and sessions can still be deleted on their own from the episode list and session rows. Entry deletion is refused while that title is the one currently playing.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Trends
|
#### Trends
|
||||||
|
|
||||||
Charts for watch time, cards, words, and sessions per day or month, running totals, efficiency (words per minute, cards per hour), and viewing patterns by weekday and hour. Each chart has its own date range and grouping.
|
Grouped into Activity (per-day/month watch time, cards, words, sessions), Cumulative Totals (running totals incl. new words seen and episodes), Efficiency (words/min, cards/hour, lookups per 100 words), Patterns (watch time by day of week and hour), and per-anime Library charts. Every chart takes a configurable date range and grouping.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Sessions
|
#### Sessions
|
||||||
|
|
||||||
Session history with new-word activity and pause, seek, and card markers. The **↗** button on a row opens that show's detail view.
|
Expandable session history with new-word activity, cumulative totals, and pause/seek/card markers. Each session row exposes a hover-revealed ↗ button that navigates to the anime media-detail view for that session; pressing the back button there returns to the Sessions tab.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Vocabulary
|
#### Vocabulary
|
||||||
|
|
||||||
Unique words and kanji you have seen, new words per day, frequency rank tables with Hide Known and Hide Kana filters, and a kanji breakdown. Click a word to see every line it appeared in.
|
The summary cards show all unique vocabulary and kanji recorded in the local tracking database; **New This Week** is the only weekly figure and uses a rolling seven-day window. The word and kanji tables load first while those complete totals calculate separately. Top Repeated Words and New Words by Day use complete tracking history rather than the table's browsing page. New-word history is maintained as a permanent daily lexical rollup using the same token-visibility rules as the totals, including normalization of older timestamps stored in either seconds or milliseconds and retroactive corrections when tracked material is removed or reprocessed. On the first launch after an applicable upgrade, that history is version-rebuilt in the background and the chart refreshes when it is ready; if it remains unavailable, polling stops and an inline Retry control appears. The cards and charts also refresh automatically after the word exclusion list changes. The rest of the tab includes cross-title and frequency rank tables with Hide Known / Hide Kana filters, kanji breakdown, word exclusion list, and click-through occurrence drilldown with Mine Word / Mine Sentence / Mine Audio buttons.
|
||||||
|
|
||||||
- **Exclusions** hides words from every vocabulary view. You can restore them from the same dialog.
|
|
||||||
- **Duplicates** cleans up lines repeated by karaoke openings and animated signs (see [Repeated lines](#repeated-lines)).
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Search
|
#### Search
|
||||||
|
|
||||||
Searches the primary subtitle lines and titles in your history. **Search by headword** is on by default, so `知らない` also finds inflected forms. Turn it off for exact text matching. Secondary subtitles are not searched.
|
Realtime search across tracked primary subtitle lines and media titles. Results show the source media, session, line number, timing, and sentence text. Secondary subtitle text is not shown or searched here because separate subtitle tracks may not line up sentence-for-sentence. Sentence cards can be mined from any result with a valid local source and timing. Word and audio card buttons appear only when the searched word exactly appears in the primary sentence text; matching text is highlighted in the result.
|
||||||
|
|
||||||
## Mining from the dashboard
|
Stats server config lives under `stats`:
|
||||||
|
|
||||||
Search results and the Vocabulary word panel can create cards from past lines, as long as the source video file is still available:
|
```jsonc
|
||||||
|
{
|
||||||
|
"stats": {
|
||||||
|
"toggleKey": "Backquote",
|
||||||
|
"markWatchedKey": "KeyW",
|
||||||
|
"serverPort": 6969,
|
||||||
|
"autoStartServer": true,
|
||||||
|
"autoOpenBrowser": false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
- **Mine Word**: full Yomitan lookup for the word, plus sentence, audio, and image.
|
- `toggleKey` is overlay-local, not a system-wide shortcut.
|
||||||
- **Mine Sentence**: a sentence card with `IsSentenceCard` set, for Lapis and Kiku note types.
|
- `markWatchedKey` toggles the watched state of the highlighted entry inside the stats dashboard.
|
||||||
- **Mine Audio**: an audio card with `IsAudioCard` set.
|
- `serverPort` controls the localhost dashboard URL.
|
||||||
|
- `autoStartServer` starts the local stats HTTP server on launch once immersion tracking is active, or reuses the dedicated background stats server when one is already running. Background app launches (`subminer app`) start the stats server immediately, registering it so later launches reuse it instead of starting another one.
|
||||||
|
- `autoOpenBrowser` decides whether `subminer stats` opens the dashboard URL in your browser once the server is up.
|
||||||
|
- `subminer stats` forces the dashboard server to start even when `autoStartServer` is `false`.
|
||||||
|
- `subminer stats -b` starts or reuses the dedicated background stats daemon and exits after startup acknowledgement.
|
||||||
|
- The background stats daemon is separate from the normal SubMiner overlay app, so you can leave it running and still launch SubMiner later to watch or mine from video.
|
||||||
|
- `subminer stats -s` stops the dedicated background stats daemon without closing any browser tabs.
|
||||||
|
- `subminer stats` fails with an error when `immersionTracking.enabled` is `false`.
|
||||||
|
- `subminer stats cleanup` defaults to vocabulary cleanup, repairs stale `headword`, `reading`, and `part_of_speech` values, attempts best-effort MeCab backfill for legacy rows, and removes rows that still fail vocab filtering.
|
||||||
|
|
||||||
Word and audio mining appear only when the word occurs in the sentence. All three use your `ankiConnect` deck, note type, fields, and media settings. Anki must be running, and Mine Word needs Yomitan dictionaries.
|
## Mining cards from the stats page
|
||||||
|
|
||||||
## Repeated lines
|
The Search tab and the Vocabulary tab's word detail panel both mine from subtitle lines in your viewing history. Search matches sentence text and media titles, and **Search by headword** is enabled by default so dictionary-form searches such as `知らない` can find tracked subtitle lines with inflected variants. Turn that toggle off for exact text/title matching only. Each line with a valid source file offers sentence-card mining; word/audio mining is available when the selected word or searched word appears in the sentence:
|
||||||
|
|
||||||
Karaoke openings and animated signs repeat the same text once per frame. SubMiner collapses these as it records, so one lyric is stored once. Stats recorded before that can hold hundreds of copies and skew Top Repeated Words.
|
- **Mine Word** - performs a full Yomitan dictionary lookup for the word (definition, reading, pitch accent, etc.) via a short-lived hidden helper, then enriches the card with sentence audio, a screenshot or animated AVIF clip, the highlighted sentence, and metadata extracted from the source video file. Requires Anki and Yomitan dictionaries to be loaded.
|
||||||
|
- **Mine Sentence** - creates a sentence card directly with the `IsSentenceCard` flag set (for Lapis/Kiku workflows), along with audio and image from the source video.
|
||||||
|
- **Mine Audio** - creates an audio-only card with the `IsAudioCard` flag, attaching only the sentence audio clip.
|
||||||
|
|
||||||
To clean them, use **Duplicates** in the Vocabulary tab: pick a time window, **Scan** to preview, then **Clean Up**. Or from the terminal:
|
All three modes respect your `ankiConnect` config: deck, model, field mappings, media settings (static vs AVIF, quality, dimensions), audio padding, metadata pattern, and tags. Media generation runs in parallel for faster card creation.
|
||||||
|
|
||||||
|
Secondary subtitle text is stored alongside primary subtitles during playback, but the Search tab does not use it for display or matching.
|
||||||
|
|
||||||
|
### Word exclusion list
|
||||||
|
|
||||||
|
The Vocabulary tab toolbar includes an **Exclusions** button for hiding words from all vocabulary views. Excluded words are stored in the immersion database, with older browser localStorage exclusions imported on first load after upgrade. They can be managed (restored or cleared) from the exclusion modal. Exclusions affect stat cards, charts, the frequency rank table, and the word list.
|
||||||
|
|
||||||
|
### Repeated line cleanup
|
||||||
|
|
||||||
|
Karaoke openings and animated signs are authored as one subtitle event per animation frame, all carrying the same text. Playback reports every one of those frames, so a single OP lyric could be recorded hundreds of times and dominate "Top Repeated Words".
|
||||||
|
|
||||||
|
Recording now collapses those runs as they happen, matching what the subtitle sidebar shows:
|
||||||
|
|
||||||
|
- When a typeset ASS file stores a clean lyric or sign in a timed authoring comment, or in full-line events surrounding generated fragments, the matching complete line is recorded once. The repeated glyph or clip-animation frames are not recorded. Dialogue spoken while such an animation is on screen records as itself, without the fragment lines beside it.
|
||||||
|
- When karaoke styling redraws the same complete lyric across consecutive color or highlight phases, those phases are combined into one line with their full timing. Repeated ordinary dialogue remains separate.
|
||||||
|
- When the active subtitle source has been parsed, its cue list has already had duplicate events and animation bursts merged. A line landing inside a surviving cue but after that cue's start is a frame the sidebar merged away, and is not recorded.
|
||||||
|
- When no parsed cue covers the live timing, including while a subtitle source is changing or shifted, the strict metadata-free rule applies: a run of identical, contiguous lines each shorter than 0.1s stops being recorded after a few frames. Runs are tracked per line of text, so dual-line karaoke (a kanji and a romaji line frame-flipped together) collapses both lines. Ordinary repeated dialogue, and lines held for a normal beat, always record.
|
||||||
|
|
||||||
|
For stats recorded before this, the Vocabulary tab toolbar has a **Duplicates** button:
|
||||||
|
|
||||||
|
- Pick how far back to look (7 days, 30 days, 90 days, 1 year, or all time). A narrower window does less work and keeps older history untouched.
|
||||||
|
- **Scan** reports the bursts found, the lines they added, and the word and kanji counts they inflated, without writing anything.
|
||||||
|
- **Clean Up** applies exactly what the scan reported: each run collapses to its first line (extended to cover the run), and the removed lines' word and kanji occurrences are subtracted from the vocabulary aggregates.
|
||||||
|
|
||||||
|
The same thing runs from the terminal:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
subminer stats cleanup --duplicate-lines --dry-run --lookback-days 30
|
subminer stats cleanup --duplicate-lines --dry-run --lookback-days 30
|
||||||
subminer stats cleanup --duplicate-lines --lookback-days 30
|
subminer stats cleanup --duplicate-lines --lookback-days 30
|
||||||
```
|
```
|
||||||
|
|
||||||
Leave out `--lookback-days` to scan all history. Word and kanji counts are corrected. Watch time and session totals are not changed.
|
`--duplicate-lines` (short: `-d`) picks the cleanup mode, so it cannot be combined with `--vocab` or `--lifetime`, and `--dry-run` and `--lookback-days <days>` only apply to it. Omitting `--lookback-days` scans all history; the value must be at least one day.
|
||||||
|
|
||||||
## Maintenance commands
|
The cleanup chains runs per line of text, so interleaved dual-line karaoke collapses each of its lines. It also removes the short residue the live rule stores before a run is long enough to recognize: a run one frame short of the usual minimum qualifies when every event is under the strict 0.1s bound.
|
||||||
|
|
||||||
| Command | What it does |
|
Runs never cross a session boundary, so rewatching an episode keeps both watches. Session telemetry (watch time, lines seen, tokens seen) and the rollups derived from it are left as recorded: they are cumulative samples taken during playback, and cannot be recomputed for sessions whose raw rows have since been pruned.
|
||||||
| ------------------------------------------ | ------------------------------------------------------------------------- |
|
|
||||||
| `subminer stats cleanup` | Repair word readings and part of speech, drop words that fail the filters |
|
|
||||||
| `subminer stats cleanup -l` | Recompute lifetime totals from episode history, keeping old totals |
|
|
||||||
| `subminer stats cleanup --duplicate-lines` | Collapse repeated karaoke and sign lines (see above) |
|
|
||||||
|
|
||||||
`subminer stats rebuild` and `subminer stats backfill` run the same lifetime repair as `cleanup -l`.
|
## Retention defaults
|
||||||
|
|
||||||
## Retention
|
By default, SubMiner keeps all retention tables and raw data (`0` means keep all) while continuing daily/monthly rollup maintenance:
|
||||||
|
|
||||||
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.
|
| Data type | Retention |
|
||||||
|
| --------------- | ------------ |
|
||||||
|
| Raw events | 0 (keep all) |
|
||||||
|
| Telemetry | 0 (keep all) |
|
||||||
|
| Sessions | 0 (keep all) |
|
||||||
|
| Daily rollups | 0 (keep all) |
|
||||||
|
| Monthly rollups | 0 (keep all) |
|
||||||
|
|
||||||
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.
|
Maintenance runs on startup and every 24 hours. Vacuum runs only when `retention.vacuumIntervalDays` is non-zero.
|
||||||
|
|
||||||
See [Immersion tracking](/configuration#immersion-tracking) and [Stats dashboard](/configuration#stats-dashboard) in the config reference for every option and default.
|
In practice:
|
||||||
|
|
||||||
|
- Overview totals read from lifetime summary tables, so all-time watch time/cards/words stay exact even if raw query paths evolve.
|
||||||
|
- Anime and episode pages keep lifetime totals from summary tables while session drill-down still reads retained sessions directly. With the current defaults, both are kept forever.
|
||||||
|
- Trends can read the full available history because daily/monthly rollups are also kept forever by default.
|
||||||
|
- Vocabulary and kanji totals are cumulative and not bounded by the raw session retention knobs.
|
||||||
|
- New-word charts use their own permanent lexical daily rollups, which are not pruned by activity-rollup retention.
|
||||||
|
|
||||||
|
## Storage / performance model
|
||||||
|
|
||||||
|
The defaults keep everything, and the schema is shaped around that:
|
||||||
|
|
||||||
|
- Exact all-time totals live in dedicated lifetime summary tables (`imm_lifetime_global`, `imm_lifetime_anime`, `imm_lifetime_media`).
|
||||||
|
- Ended-session totals are persisted onto `imm_sessions`, so most dashboard reads do not need to rescan raw telemetry.
|
||||||
|
- Daily and monthly rollups remain available for chart queries and coarse trend views.
|
||||||
|
- Subtitle text is stored once in `imm_subtitle_lines`; subtitle-line event payloads keep compact metadata only.
|
||||||
|
- Cover-art binaries are deduplicated through a shared blob store so episodes in the same series do not each carry duplicate image bytes.
|
||||||
|
- Hot tables have dedicated indexes for session time ranges, telemetry sample windows, frequency-ranked vocabulary, and cover-art lookup keys.
|
||||||
|
|
||||||
|
## Configurable knobs
|
||||||
|
|
||||||
|
All policy options live under `immersionTracking` in your config:
|
||||||
|
|
||||||
|
| Option | Description |
|
||||||
|
| ------------------------------ | ------------------------------------------------------------------ |
|
||||||
|
| `batchSize` | Writes per flush batch |
|
||||||
|
| `flushIntervalMs` | Max delay between flushes (default: 500ms) |
|
||||||
|
| `queueCap` | Max queued writes before oldest are dropped |
|
||||||
|
| `payloadCapBytes` | Max payload size per write |
|
||||||
|
| `maintenanceIntervalMs` | How often maintenance runs |
|
||||||
|
| `retention.eventsDays` | Raw event retention |
|
||||||
|
| `retention.telemetryDays` | Telemetry retention |
|
||||||
|
| `retention.sessionsDays` | Session retention |
|
||||||
|
| `retention.dailyRollupsDays` | Daily rollup retention |
|
||||||
|
| `retention.monthlyRollupsDays` | Monthly rollup retention |
|
||||||
|
| `retention.vacuumIntervalDays` | Minimum spacing between vacuums |
|
||||||
|
| `retentionMode` | `preset` or `advanced` |
|
||||||
|
| `retentionPreset` | `minimal`, `balanced`, or `deep-history` (used by `retentionMode`) |
|
||||||
|
| `lifetimeSummaries.global` | Maintain global lifetime totals |
|
||||||
|
| `lifetimeSummaries.anime` | Maintain per-anime lifetime totals |
|
||||||
|
| `lifetimeSummaries.media` | Maintain per-media lifetime totals |
|
||||||
|
|
||||||
|
## Query templates
|
||||||
|
|
||||||
|
### Session timeline
|
||||||
|
|
||||||
|
```sql
|
||||||
|
SELECT
|
||||||
|
sample_ms,
|
||||||
|
total_watched_ms,
|
||||||
|
active_watched_ms,
|
||||||
|
lines_seen,
|
||||||
|
tokens_seen,
|
||||||
|
cards_mined
|
||||||
|
FROM imm_session_telemetry
|
||||||
|
WHERE session_id = ?
|
||||||
|
ORDER BY sample_ms DESC, telemetry_id DESC
|
||||||
|
LIMIT ?;
|
||||||
|
```
|
||||||
|
|
||||||
|
### Session throughput summary
|
||||||
|
|
||||||
|
```sql
|
||||||
|
SELECT
|
||||||
|
s.session_id,
|
||||||
|
s.video_id,
|
||||||
|
s.started_at_ms,
|
||||||
|
s.ended_at_ms,
|
||||||
|
COALESCE(s.active_watched_ms, 0) AS active_watched_ms,
|
||||||
|
COALESCE(s.tokens_seen, 0) AS tokens_seen,
|
||||||
|
COALESCE(s.cards_mined, 0) AS cards_mined,
|
||||||
|
CASE
|
||||||
|
WHEN COALESCE(s.active_watched_ms, 0) > 0
|
||||||
|
THEN COALESCE(s.tokens_seen, 0) / (COALESCE(s.active_watched_ms, 0) / 60000.0)
|
||||||
|
ELSE NULL
|
||||||
|
END AS tokens_per_min,
|
||||||
|
CASE
|
||||||
|
WHEN COALESCE(s.active_watched_ms, 0) > 0
|
||||||
|
THEN (COALESCE(s.cards_mined, 0) * 60.0) / (COALESCE(s.active_watched_ms, 0) / 60000.0)
|
||||||
|
ELSE NULL
|
||||||
|
END AS cards_per_hour
|
||||||
|
FROM imm_sessions s
|
||||||
|
ORDER BY s.started_at_ms DESC
|
||||||
|
LIMIT ?;
|
||||||
|
```
|
||||||
|
|
||||||
|
### Lifetime anime totals
|
||||||
|
|
||||||
|
```sql
|
||||||
|
SELECT
|
||||||
|
a.anime_id,
|
||||||
|
a.canonical_title,
|
||||||
|
la.total_sessions,
|
||||||
|
la.total_active_ms,
|
||||||
|
la.total_cards,
|
||||||
|
la.total_tokens_seen,
|
||||||
|
la.total_lines_seen,
|
||||||
|
la.first_watched_ms,
|
||||||
|
la.last_watched_ms
|
||||||
|
FROM imm_lifetime_anime la
|
||||||
|
JOIN imm_anime a ON a.anime_id = la.anime_id
|
||||||
|
ORDER BY la.last_watched_ms DESC
|
||||||
|
LIMIT ?;
|
||||||
|
```
|
||||||
|
|
||||||
|
### Daily rollups
|
||||||
|
|
||||||
|
```sql
|
||||||
|
SELECT
|
||||||
|
rollup_day,
|
||||||
|
video_id,
|
||||||
|
total_sessions,
|
||||||
|
total_active_min,
|
||||||
|
total_lines_seen,
|
||||||
|
total_tokens_seen,
|
||||||
|
total_cards,
|
||||||
|
cards_per_hour,
|
||||||
|
tokens_per_min,
|
||||||
|
lookup_hit_rate
|
||||||
|
FROM imm_daily_rollups
|
||||||
|
ORDER BY rollup_day DESC, video_id DESC
|
||||||
|
LIMIT ?;
|
||||||
|
```
|
||||||
|
|
||||||
|
### Monthly rollups
|
||||||
|
|
||||||
|
```sql
|
||||||
|
SELECT
|
||||||
|
rollup_month,
|
||||||
|
video_id,
|
||||||
|
total_sessions,
|
||||||
|
total_active_min,
|
||||||
|
total_lines_seen,
|
||||||
|
total_tokens_seen,
|
||||||
|
total_cards
|
||||||
|
FROM imm_monthly_rollups
|
||||||
|
ORDER BY rollup_month DESC, video_id DESC
|
||||||
|
LIMIT ?;
|
||||||
|
```
|
||||||
|
|
||||||
|
## Technical details
|
||||||
|
|
||||||
|
- Write path is asynchronous and queue-backed. Hot paths (subtitle parsing, render, token flows) enqueue telemetry and never await SQLite writes.
|
||||||
|
- Queue overflow policy: drop oldest queued writes, keep newest.
|
||||||
|
- SQLite tunings: `journal_mode=WAL`, `synchronous=NORMAL`, `foreign_keys=ON`, `busy_timeout=2500`, bounded WAL growth via `journal_size_limit`.
|
||||||
|
- Maintenance executes `PRAGMA optimize` after periodic cleanup.
|
||||||
|
- Rollups run incrementally from the last processed telemetry sample; startup performs a one-time bootstrap pass.
|
||||||
|
- Cover-art blobs are deduplicated into `imm_cover_art_blobs` and referenced from `imm_media_art`.
|
||||||
|
- Large-table reads are index-backed for `sample_ms`, session time windows, frequency-ranked words/kanji, and cover-art identity lookups.
|
||||||
|
- Workload-dependent tuning knobs remain at defaults unless you change them: `cache_size`, `mmap_size`, `temp_store`, `auto_vacuum`.
|
||||||
|
|
||||||
|
### Schema (v24)
|
||||||
|
|
||||||
|
The exact schema version lives in `SCHEMA_VERSION` (`src/core/services/immersion-tracker/types.ts`) and is recorded in the `imm_schema_version` table.
|
||||||
|
|
||||||
|
Core tables:
|
||||||
|
|
||||||
|
- `imm_videos` - video key/title/source metadata
|
||||||
|
- `imm_anime` - series or YouTube channel metadata referenced by videos and lifetime tables, including the media kind (`anime`, `live_action` or `youtube`) and the AniList or TMDB link
|
||||||
|
- `imm_anime_title_aliases` - alternate titles that resolve to the same anime row
|
||||||
|
- `imm_anime_merge_recommendations` - candidate duplicate-series merges surfaced in the dashboard
|
||||||
|
- `imm_sessions` - session UUID, video reference, timing/status, final denormalized totals
|
||||||
|
- `imm_session_telemetry` - high-frequency session aggregates over time
|
||||||
|
- `imm_session_events` - event stream with compact numeric event types
|
||||||
|
- `imm_subtitle_lines` - persisted subtitle text and timing per session/video
|
||||||
|
- `imm_youtube_videos` - YouTube video/channel metadata for tracked videos
|
||||||
|
|
||||||
|
Lifetime summary tables:
|
||||||
|
|
||||||
|
- `imm_lifetime_global`
|
||||||
|
- `imm_lifetime_anime`
|
||||||
|
- `imm_lifetime_media`
|
||||||
|
- `imm_lifetime_applied_sessions`
|
||||||
|
|
||||||
|
Rollup tables:
|
||||||
|
|
||||||
|
- `imm_daily_rollups`
|
||||||
|
- `imm_monthly_rollups`
|
||||||
|
- `imm_lexical_daily_rollups` - permanent first-discovery counts for vocabulary and kanji chart history
|
||||||
|
- `imm_rollup_state` - incremental rollup progress bookkeeping
|
||||||
|
|
||||||
|
Vocabulary tables:
|
||||||
|
|
||||||
|
- `imm_words(id, headword, word, reading, part_of_speech, pos1, pos2, pos3, first_seen, last_seen, frequency, frequency_rank)` with `UNIQUE(headword, word, reading)`
|
||||||
|
- `imm_kanji(id, kanji, first_seen, last_seen, frequency)`
|
||||||
|
- `imm_word_line_occurrences` / `imm_kanji_line_occurrences` - word/kanji ↔ subtitle-line occurrence links
|
||||||
|
- `imm_stats_excluded_words` - vocabulary exclusion list managed from the dashboard
|
||||||
|
|
||||||
|
Media-art tables:
|
||||||
|
|
||||||
|
- `imm_media_art` - per-video cover metadata plus shared blob reference
|
||||||
|
- `imm_cover_art_blobs` - deduplicated image bytes keyed by blob hash
|
||||||
+247
-101
@@ -1,54 +1,65 @@
|
|||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
SubMiner draws an interactive overlay on top of the [mpv](https://mpv.io) video player. While you watch Japanese media, you hover a word in the subtitles to look it up, then turn it into an Anki card without leaving the video.
|
SubMiner draws an interactive overlay on top of the [mpv](https://mpv.io) video player. While you watch Japanese media, hover any word in the subtitles to look it up, then turn it into an Anki card without switching apps.
|
||||||
|
|
||||||
Building cards from what you watch is called **sentence mining**. SubMiner bundles its own copy of **Yomitan** (a pop-up dictionary) and talks to **AnkiConnect** (an Anki add-on that lets other programs create cards), so it can fill in the sentence, audio, and screenshot for you.
|
Building cards from the content you are actually watching is called **sentence mining**, and it is the whole point of SubMiner. It bundles its own copy of **Yomitan** (a pop-up dictionary) and talks to **AnkiConnect** (the add-on that lets other programs write cards into Anki), so the sentence, audio, and screenshot fields get filled in for you.
|
||||||
|
|
||||||
Getting started takes three steps:
|
Three steps to get started:
|
||||||
|
|
||||||
1. Install mpv and the optional extras you want.
|
1. **Install requirements** - mpv and a few optional extras
|
||||||
2. Install SubMiner.
|
2. **Install SubMiner** - from the AUR, or download from GitHub Releases
|
||||||
3. Launch it and follow the first-run setup.
|
3. **Launch the app** - first-run setup walks you through dictionaries, the launcher, and everything else
|
||||||
|
|
||||||
## 1. Install requirements
|
## 1. Install requirements
|
||||||
|
|
||||||
Only mpv is required. Install ffmpeg too unless you are fine with cards that have no audio or screenshot.
|
Only **mpv** is strictly required. Everything else is optional, though you will want ffmpeg unless you are fine with cards that have no audio or screenshot.
|
||||||
|
|
||||||
| Dependency | Needed for | Platforms |
|
Some rows below matter only for the `subminer` command-line launcher's picker features. On Windows, the **SubMiner mpv** shortcut remains the recommended playback entry point.
|
||||||
| ------------------------ | -------------------------------------------------------------------------------------------------------------------- | ------------ |
|
|
||||||
| mpv | Required. The player SubMiner draws over. | All |
|
|
||||||
| fuse2 | Required to run the AppImage. | Linux |
|
|
||||||
| ffmpeg | Recommended. Audio clips and screenshots on cards. Without it those fields stay empty. | All |
|
|
||||||
| MeCab + mecab-ipadic | Recommended. More accurate N+1, JLPT, and frequency highlighting. | All |
|
|
||||||
| yt-dlp | YouTube playback. | All |
|
|
||||||
| xz | [TsukiHime](/tsukihime-integration) subtitle downloads. Most Linux distros already have it. | All |
|
|
||||||
| guessit | Better title, season, and episode detection for [AniSkip](/aniskip-integration) and [AniList](/anilist-integration). | All |
|
|
||||||
| alass or ffsubsync | Subtitle syncing. You need at least one to use it. | All |
|
|
||||||
| fzf, rofi | The file pickers in the `subminer` command (rofi is Linux only). | Linux, macOS |
|
|
||||||
| chafa, ffmpegthumbnailer | Thumbnail previews in the pickers. | Linux, macOS |
|
|
||||||
|
|
||||||
To generate Japanese subtitles from audio, you also need whisper.cpp. See [Subtitle generation](/subtitle-generation).
|
[Local Japanese subtitle generation](/subtitle-generation) additionally requires whisper.cpp's `whisper-cli`, FFmpeg, and `ffprobe`. Configure their executable paths in Settings if needed. SubMiner can download a speech model explicitly, or use your existing multilingual GGML model.
|
||||||
|
|
||||||
|
Optional [dialogue-focused generation](/subtitle-generation#prioritizing-spoken-dialogue) also uses whisper.cpp's speech segment detector and a separate Silero GGML VAD model.
|
||||||
|
|
||||||
|
| Dependency | Status | Platforms | What it does |
|
||||||
|
| -------------------- | ----------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| mpv | Required | All | The video player SubMiner overlays on. Must support `--input-ipc-server`. |
|
||||||
|
| ffmpeg | Recommended | All | Audio extraction and screenshots for Anki cards. Without it SubMiner still runs, but media fields will be empty. |
|
||||||
|
| MeCab + mecab-ipadic | Recommended | All | Part-of-speech filtering for more precise N+1, JLPT, and frequency annotations. Without it annotations still render, but POS-based filtering is less accurate. |
|
||||||
|
| yt-dlp | Optional | All | YouTube playback and subtitle extraction. |
|
||||||
|
| xz | Optional | All | Required for TsukiHime subtitle downloads (subtitles are served xz-compressed). Preinstalled on most Linux distros; not present on Windows by default. |
|
||||||
|
| guessit | Optional | All | Better AniSkip title/season/episode parsing. |
|
||||||
|
| alass | Optional | All | Subtitle sync engine (preferred). Disabled without alass or ffsubsync. |
|
||||||
|
| ffsubsync | Optional | All | Audio-based subtitle sync engine. Disabled without alass or ffsubsync. |
|
||||||
|
| fzf | Optional | Linux, macOS | Terminal-based video picker in the `subminer` launcher. |
|
||||||
|
| rofi | Optional | Linux | GUI-based video picker in the `subminer` launcher. |
|
||||||
|
| chafa | Optional | Linux, macOS | Thumbnail previews in the fzf picker. |
|
||||||
|
| ffmpegthumbnailer | Optional | Linux, macOS | Video thumbnail generation for the pickers. |
|
||||||
|
| fuse2 | Required | Linux | Needed to run the AppImage. |
|
||||||
|
|
||||||
### Linux
|
### Linux
|
||||||
|
|
||||||
SubMiner needs to track the mpv window, and how it does that depends on your desktop:
|
**Window backend** - you need one of these depending on your compositor:
|
||||||
|
|
||||||
- **Hyprland**: supported natively through `hyprctl`.
|
- **Hyprland** - native Wayland support (uses `hyprctl`)
|
||||||
- **Sway**: supported natively through `swaymsg`.
|
- **Sway** - native Wayland support (uses `swaymsg`)
|
||||||
- **Anything else** (X11, GNOME, KDE Plasma, other Wayland compositors): mpv and SubMiner must run under X11 or Xwayland. Install `xdotool` and `xwininfo`. The `subminer` command picks the X11 backend automatically, or you can force it with `--backend x11`.
|
- **X11 / Xwayland** - for X11 sessions or any other Wayland compositor (uses `xdotool` and `xwininfo`)
|
||||||
|
|
||||||
|
::: warning Wayland support is compositor-specific
|
||||||
|
Wayland has no universal API for window positioning. Each compositor exposes its own IPC, so SubMiner needs a backend per compositor. Only Hyprland and Sway have native Wayland backends. If you run a different Wayland compositor (GNOME, KDE Plasma, river, etc.), both mpv **and** SubMiner must run under X11 or Xwayland. The `subminer` launcher handles this automatically when `--backend x11` is set or the X11 backend is auto-detected.
|
||||||
|
:::
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary><b>Arch Linux</b></summary>
|
<summary><b>Arch Linux</b></summary>
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo pacman -S --needed mpv ffmpeg
|
sudo pacman -S --needed mpv ffmpeg
|
||||||
# Recommended (MeCab is only in the AUR)
|
# Recommended
|
||||||
paru -S --needed mecab-git mecab-ipadic
|
sudo pacman -S --needed mecab mecab-ipadic
|
||||||
# Optional
|
# Optional
|
||||||
sudo pacman -S --needed yt-dlp fzf rofi chafa ffmpegthumbnailer
|
sudo pacman -S --needed yt-dlp fzf rofi chafa ffmpegthumbnailer
|
||||||
# Optional: subtitle sync (install at least one)
|
# Optional: subtitle sync (at least one needed for subtitle syncing)
|
||||||
paru -S --needed alass python-ffsubsync
|
paru -S --needed alass python-ffsubsync
|
||||||
# Only for desktops other than Hyprland or Sway
|
# X11 / Xwayland (required for non-Hyprland/Sway compositors)
|
||||||
sudo pacman -S --needed xdotool xorg-xwininfo
|
sudo pacman -S --needed xdotool xorg-xwininfo
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -63,11 +74,11 @@ sudo apt install mpv ffmpeg
|
|||||||
sudo apt install mecab libmecab-dev mecab-ipadic-utf8
|
sudo apt install mecab libmecab-dev mecab-ipadic-utf8
|
||||||
# Optional
|
# Optional
|
||||||
sudo apt install yt-dlp fzf rofi chafa ffmpegthumbnailer
|
sudo apt install yt-dlp fzf rofi chafa ffmpegthumbnailer
|
||||||
# Only for desktops other than Hyprland or Sway
|
# X11 / Xwayland (required for non-Hyprland/Sway compositors)
|
||||||
sudo apt install xdotool x11-utils
|
sudo apt install xdotool x11-utils
|
||||||
# Optional: subtitle sync
|
# Optional: subtitle sync
|
||||||
pip install ffsubsync
|
pip install ffsubsync
|
||||||
cargo install alass-cli
|
# alass is not in apt - install via cargo: cargo install alass-cli
|
||||||
```
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
@@ -81,18 +92,18 @@ sudo dnf install mpv ffmpeg
|
|||||||
sudo dnf install mecab mecab-ipadic
|
sudo dnf install mecab mecab-ipadic
|
||||||
# Optional
|
# Optional
|
||||||
sudo dnf install yt-dlp fzf rofi chafa ffmpegthumbnailer
|
sudo dnf install yt-dlp fzf rofi chafa ffmpegthumbnailer
|
||||||
# Only for desktops other than Hyprland or Sway
|
# X11 / Xwayland (required for non-Hyprland/Sway compositors)
|
||||||
sudo dnf install xdotool xorg-x11-utils
|
sudo dnf install xdotool xorg-x11-utils
|
||||||
# Optional: subtitle sync
|
# Optional: subtitle sync
|
||||||
pip install ffsubsync
|
pip install ffsubsync
|
||||||
cargo install alass-cli
|
# alass: cargo install alass-cli
|
||||||
```
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### macOS
|
### macOS
|
||||||
|
|
||||||
You need macOS 11 (Big Sur) or later.
|
macOS 11 (Big Sur) or later. Accessibility permission - the macOS setting that lets one app observe and position another app's windows - is required so the overlay can follow the mpv window (see [step 2](#macos-dmg)).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
brew install mpv ffmpeg
|
brew install mpv ffmpeg
|
||||||
@@ -105,99 +116,165 @@ brew install alass
|
|||||||
pip install ffsubsync
|
pip install ffsubsync
|
||||||
```
|
```
|
||||||
|
|
||||||
`mecab` must be on your `PATH` when SubMiner starts. Homebrew puts it in `/opt/homebrew/bin` on Apple Silicon and `/usr/local/bin` on Intel.
|
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
You need Windows 10 or later. Install mpv and ffmpeg with [winget](https://learn.microsoft.com/windows/package-manager/winget/), which ships with Windows 11 and current Windows 10. In PowerShell or Command Prompt:
|
Windows 10 or later. No compositor tools or window helpers are needed - native window tracking is built in.
|
||||||
|
|
||||||
|
You need **mpv** (required) and **ffmpeg** (strongly recommended, for card audio and screenshots), and both must be on your `PATH`.
|
||||||
|
|
||||||
|
::: tip What is PATH?
|
||||||
|
`PATH` is the list of folders Windows searches when a program asks to run another program by name. SubMiner runs `mpv` and `ffmpeg` by name, so if their folders are not on `PATH`, SubMiner cannot find them even though they are installed. The routes below mostly handle `PATH` for you; the manual route explains how to add a folder yourself.
|
||||||
|
:::
|
||||||
|
|
||||||
|
You can install these with a package manager or by hand. Coverage differs, so pick based on what you need:
|
||||||
|
|
||||||
|
| Dependency | winget | Scoop |
|
||||||
|
| ---------------- | --------------- | ------------- |
|
||||||
|
| mpv (required) | `shinchiro.mpv` | `extras/mpv` |
|
||||||
|
| ffmpeg | `Gyan.FFmpeg` | `main/ffmpeg` |
|
||||||
|
| yt-dlp (YouTube) | `yt-dlp.yt-dlp` | `main/yt-dlp` |
|
||||||
|
| xz (TsukiHime) | not packaged | `main/xz` |
|
||||||
|
|
||||||
|
Use **winget** if you want Microsoft's first-party tool and don't need TsukiHime subtitle downloads. Use **Scoop** if you want one package manager to cover everything, since it is the only one that also packages `xz`.
|
||||||
|
|
||||||
|
#### Recommended: winget
|
||||||
|
|
||||||
|
[winget](https://learn.microsoft.com/windows/package-manager/winget/) is Microsoft's own package manager and ships with Windows 11 and current Windows 10 (it comes with **App Installer** from the Microsoft Store). In **PowerShell** or **Command Prompt**:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
winget install shinchiro.mpv
|
winget install shinchiro.mpv
|
||||||
winget install Gyan.FFmpeg
|
winget install Gyan.FFmpeg
|
||||||
winget install yt-dlp.yt-dlp # optional, for YouTube
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Close and reopen the terminal, then check both commands work:
|
Close and reopen your terminal, then check that both are found:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
mpv --version
|
mpv --version
|
||||||
ffmpeg -version
|
ffmpeg -version
|
||||||
```
|
```
|
||||||
|
|
||||||
ffmpeg must be on `PATH`, because SubMiner runs it by name to make card audio and screenshots. mpv does not have to be. If `mpv --version` says `not recognized`, find `mpv.exe` (usually in `%LOCALAPPDATA%\Programs\mpv`) and either add that folder to `PATH` or enter the full path to `mpv.exe` during first-run setup (`mpv.executablePath`).
|
`ffmpeg` is installed as a portable package, so winget links it into a folder that is already on your `PATH` and it should work right away.
|
||||||
|
|
||||||
|
`mpv` uses a regular installer, and depending on the version it may **not** add itself to `PATH`. If `mpv --version` says `not recognized`, you have two easy options:
|
||||||
|
|
||||||
|
- Note where it installed (usually `%LOCALAPPDATA%\Programs\mpv`) and add that folder to `PATH` using the manual steps below, or
|
||||||
|
- Skip `PATH` entirely and set `mpv.executablePath` to the full path of `mpv.exe` during first-run setup.
|
||||||
|
|
||||||
|
Once `mpv --version` works, or you have the full path to `mpv.exe` ready, continue to [step 2](#_2-install-subminer).
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary><b>Alternative: Scoop (no admin rights, includes xz)</b></summary>
|
<summary><b>Alternative: Scoop (covers every dependency, no admin rights)</b></summary>
|
||||||
|
|
||||||
[Scoop](https://scoop.sh) installs into your user profile and always adds commands to `PATH`. It is the only Windows package manager that also packages `xz`, which [TsukiHime](/tsukihime-integration) downloads need.
|
[Scoop](https://scoop.sh) installs into your user profile, needs no administrator prompt, and always puts commands on `PATH`. It is the only Windows package manager that carries all of SubMiner's optional dependencies, including `xz`, so it is the best choice if you want a single tool to manage everything.
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
# One-time Scoop setup
|
# One-time Scoop setup (skip if you already have it)
|
||||||
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
|
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
|
||||||
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
|
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
|
||||||
|
|
||||||
|
# mpv lives in the "extras" bucket; everything else is in "main"
|
||||||
scoop bucket add extras
|
scoop bucket add extras
|
||||||
scoop install extras/mpv main/ffmpeg
|
scoop install extras/mpv main/ffmpeg
|
||||||
# Optional
|
|
||||||
|
# Optional: yt-dlp for YouTube playback, xz for TsukiHime subtitle downloads
|
||||||
scoop install main/yt-dlp main/xz
|
scoop install main/yt-dlp main/xz
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Close and reopen your terminal, then verify with `mpv --version` and `ffmpeg -version`.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary><b>Alternative: manual download</b></summary>
|
<summary><b>Manual install (download the zips yourself)</b></summary>
|
||||||
|
|
||||||
1. Download mpv from [mpv.io/installation](https://mpv.io/installation/) and ffmpeg from [ffmpeg.org/download.html](https://ffmpeg.org/download.html).
|
1. Download mpv from [mpv.io/installation](https://mpv.io/installation/) (the Windows builds link) and ffmpeg from [ffmpeg.org/download.html](https://ffmpeg.org/download.html).
|
||||||
2. Unzip each into a permanent folder, for example `C:\Tools\mpv` and `C:\Tools\ffmpeg`. Find the folders that contain `mpv.exe` and `ffmpeg.exe` (for ffmpeg this is usually `bin`).
|
2. Unzip each one somewhere permanent, for example `C:\Tools\mpv` and `C:\Tools\ffmpeg`. Note the folder that actually contains `mpv.exe` and the one containing `ffmpeg.exe` (for ffmpeg this is usually a `bin` subfolder).
|
||||||
3. Press `Win`, search for **Edit the system environment variables**, and open it. Click **Environment Variables**, select **Path** under **User variables**, click **Edit**, and add both folders with **New**.
|
3. Press `Win`, type **Edit the system environment variables**, and open it. Click **Environment Variables…**, select **Path** under **User variables**, click **Edit…**, then use **New** to add each of those two folders. Confirm with **OK** on every dialog. Microsoft documents this in more detail under [environment variables](https://learn.microsoft.com/windows/deployment/usmt/usmt-recognized-environment-variables).
|
||||||
4. Open a new terminal and run `mpv --version` and `ffmpeg -version`. If either says `not recognized`, the folder you added does not contain the `.exe`.
|
4. Close and reopen your terminal, since `PATH` changes only apply to newly opened windows. Then check:
|
||||||
|
|
||||||
For `xz` without Scoop, download [XZ Utils](https://tukaani.org/xz/) and add its folder to `PATH` the same way.
|
```powershell
|
||||||
|
mpv --version
|
||||||
|
ffmpeg -version
|
||||||
|
```
|
||||||
|
|
||||||
|
If you see `not recognized as the name of a cmdlet`, the folder you added is not the one holding the `.exe`. Reopen the Path editor and double-check.
|
||||||
|
|
||||||
|
::: tip mpv can skip PATH, ffmpeg cannot
|
||||||
|
If you would rather not edit `PATH` for mpv, set `mpv.executablePath` to the full path of `mpv.exe` during first-run setup instead.
|
||||||
|
|
||||||
|
There is no equivalent setting for ffmpeg: SubMiner invokes it by bare name when generating card audio and screenshots, so ffmpeg has to be on `PATH`. Without it, cards are still created but their audio and image fields come out empty. (`subsync.ffmpeg_path` only affects subtitle sync, not card media.)
|
||||||
|
:::
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
For more accurate highlighting, install [MeCab for Windows](https://taku910.github.io/mecab/#download) with the UTF-8 dictionary. The fzf and rofi pickers do not apply on Windows.
|
**Optional extras:** [MeCab for Windows](https://taku910.github.io/mecab/#download) with the UTF-8 dictionary improves annotation accuracy; it is not in any package manager, so install it from that page. `xz` is needed only for [TsukiHime](/tsukihime-integration) subtitle downloads and is not packaged by winget or Chocolatey, so use `scoop install main/xz` or download [XZ Utils](https://tukaani.org/xz/) and add its folder to `PATH`.
|
||||||
|
|
||||||
|
The launcher's picker tools (`fzf`, `rofi`, `chafa`, `ffmpegthumbnailer`) are for Linux and macOS. On Windows, use the **SubMiner mpv** shortcut for playback or install the optional `subminer` terminal wrapper during setup.
|
||||||
|
|
||||||
## 2. Install SubMiner
|
## 2. Install SubMiner
|
||||||
|
|
||||||
### Arch Linux (AUR) {#arch-aur}
|
### Arch Linux (AUR) {#arch-aur}
|
||||||
|
|
||||||
Install [`subminer-bin`](https://aur.archlinux.org/packages/subminer-bin). It includes the AppImage and the `subminer` command.
|
Install [`subminer-bin`](https://aur.archlinux.org/packages/subminer-bin) from the AUR. The package includes the SubMiner AppImage and its launcher wrapper. Bun is included with the app, so the package has no Bun dependency. Install updates through your AUR helper or package manager.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
paru -S subminer-bin
|
paru -S subminer-bin
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For the [anime browser](anime-browser.md#the-bridge), optionally add
|
||||||
|
`mangatan-extension-server`. SubMiner picks the package up instead of
|
||||||
|
downloading its own copy of the bridge, and pacman keeps it updated.
|
||||||
|
|
||||||
|
Or manually:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://aur.archlinux.org/subminer-bin.git
|
||||||
|
cd subminer-bin
|
||||||
|
makepkg -si
|
||||||
|
```
|
||||||
|
|
||||||
### Linux (AppImage) {#linux-appimage}
|
### Linux (AppImage) {#linux-appimage}
|
||||||
|
|
||||||
|
Download the latest AppImage from [GitHub Releases](https://github.com/ksyasuda/SubMiner/releases/latest):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mkdir -p ~/.local/bin
|
mkdir -p ~/.local/bin
|
||||||
wget https://github.com/ksyasuda/SubMiner/releases/latest/download/SubMiner.AppImage -O ~/.local/bin/SubMiner.AppImage
|
wget https://github.com/ksyasuda/SubMiner/releases/latest/download/SubMiner.AppImage -O ~/.local/bin/SubMiner.AppImage
|
||||||
chmod +x ~/.local/bin/SubMiner.AppImage
|
chmod +x ~/.local/bin/SubMiner.AppImage
|
||||||
```
|
```
|
||||||
|
|
||||||
First-run setup can install the `subminer` command for you.
|
::: tip Launcher install is optional
|
||||||
|
First-run setup can install the `subminer` command-line launcher for you. It uses Bun bundled with the AppImage, so it does not need a separate Bun installation or a Bun entry on `PATH`. The downloaded wrapper works the same way. See [manual launcher install](#manual-launcher-install-linux).
|
||||||
|
:::
|
||||||
|
|
||||||
### macOS (DMG) {#macos-dmg}
|
### macOS (DMG) {#macos-dmg}
|
||||||
|
|
||||||
1. Download the DMG from [GitHub Releases](https://github.com/ksyasuda/SubMiner/releases/latest), open it, and drag `SubMiner.app` into `/Applications`.
|
Download the DMG from [GitHub Releases](https://github.com/ksyasuda/SubMiner/releases/latest), open it, and drag `SubMiner.app` into `/Applications`. A ZIP artifact is also available as a fallback.
|
||||||
2. If macOS blocks the app on first launch, right-click it and choose **Open**, or run:
|
|
||||||
|
|
||||||
```bash
|
**Gatekeeper:** If macOS blocks SubMiner on first launch, right-click the app and select **Open** to bypass the warning. Alternatively:
|
||||||
xattr -d com.apple.quarantine /Applications/SubMiner.app
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Open **System Settings > Privacy & Security > Accessibility** and enable SubMiner (add it if it is missing). The overlay cannot follow the mpv window without this.
|
```bash
|
||||||
|
xattr -d com.apple.quarantine /Applications/SubMiner.app
|
||||||
|
```
|
||||||
|
|
||||||
First-run setup can install the `subminer` command for you.
|
**Accessibility permission:** Grant accessibility permission so the overlay can track the mpv window:
|
||||||
|
|
||||||
|
1. Open **System Settings** → **Privacy & Security** → **Accessibility**
|
||||||
|
2. Enable SubMiner in the list (add it if it does not appear)
|
||||||
|
|
||||||
|
::: tip Launcher install is optional
|
||||||
|
First-run setup can install the `subminer` command-line launcher for you. It uses Bun bundled inside `SubMiner.app`, so it does not need a separate Bun installation or a Bun entry on `PATH`. The downloaded wrapper works the same way. See [manual launcher install](#manual-launcher-install-macos).
|
||||||
|
:::
|
||||||
|
|
||||||
### Windows (installer) {#windows-installer}
|
### Windows (installer) {#windows-installer}
|
||||||
|
|
||||||
Download from [GitHub Releases](https://github.com/ksyasuda/SubMiner/releases/latest):
|
Download the latest installer from [GitHub Releases](https://github.com/ksyasuda/SubMiner/releases/latest):
|
||||||
|
|
||||||
- `SubMiner-<version>.exe`: the installer. Use this one.
|
- `SubMiner-<version>.exe` - installer (recommended)
|
||||||
- `SubMiner-<version>-win.zip`: portable version.
|
- `SubMiner-<version>-win.zip` - portable fallback
|
||||||
- `subminer.cmd`: optional terminal command (setup can install it for you).
|
- `subminer.cmd` - optional terminal launcher wrapper
|
||||||
|
|
||||||
|
Make sure `mpv.exe` is on your `PATH`, or set `mpv.executablePath` in the config during first-run setup.
|
||||||
|
|
||||||
### From source
|
### From source
|
||||||
|
|
||||||
@@ -209,10 +286,14 @@ git clone --recurse-submodules https://github.com/ksyasuda/SubMiner.git
|
|||||||
cd SubMiner
|
cd SubMiner
|
||||||
make deps
|
make deps
|
||||||
bun run build
|
bun run build
|
||||||
bun run build:appimage # optional: package an AppImage
|
|
||||||
|
# Optional: build AppImage
|
||||||
|
bun run build:appimage
|
||||||
```
|
```
|
||||||
|
|
||||||
Building from source needs [Bun](https://bun.sh) installed.
|
Bundled Yomitan is built during `bun run build`.
|
||||||
|
|
||||||
|
Source and development commands use Bun installed on your system.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -226,7 +307,7 @@ make deps
|
|||||||
make build-macos
|
make build-macos
|
||||||
```
|
```
|
||||||
|
|
||||||
The `.dmg` and `.zip` land in `release/`. For an unsigned local build, run `bun run build:mac:unsigned`.
|
The built app will be in the `release` directory (`.dmg` and `.zip`). For unsigned local builds: `bun run build:mac:unsigned`.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -249,80 +330,125 @@ bun run build:win
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
### Bundled Bun runtime {#bundled-bun-runtime}
|
||||||
|
|
||||||
|
Every package includes an unmodified copy of Bun 1.3.5 that runs the command-line launcher. Bun is MIT licensed and statically links JavaScriptCore under LGPL 2.0 and TinyCC under LGPL 2.1. The license texts, third-party notices, and a `SOURCE.md` describing the corresponding source ship inside the app under `resources/bun/licenses` (`SubMiner.app/Contents/Resources/bun/licenses` on macOS). Each GitHub release also publishes `bun-v1.3.5-source.tar.gz` with the matching Bun, WebKit, and dependency sources and instructions for rebuilding Bun against a modified JavaScriptCore.
|
||||||
|
|
||||||
## 3. Launch and first-run setup
|
## 3. Launch and first-run setup
|
||||||
|
|
||||||
Start SubMiner. The setup window opens on first launch.
|
Launch SubMiner and the setup wizard opens on its own:
|
||||||
|
|
||||||
- **Linux (AUR)**: `subminer app --setup`
|
```bash
|
||||||
- **Linux (AppImage)**: `~/.local/bin/SubMiner.AppImage --setup`
|
# Linux (AUR install)
|
||||||
- **macOS**: open `SubMiner.app` from `/Applications`
|
subminer app --setup
|
||||||
- **Windows**: run SubMiner from the Start menu
|
|
||||||
|
|
||||||
Setup walks you through:
|
# Linux (AppImage directly)
|
||||||
|
~/.local/bin/SubMiner.AppImage --setup
|
||||||
|
|
||||||
1. **Config file.** Created at `~/.config/SubMiner/config.jsonc` (Linux and macOS) or `%APPDATA%\SubMiner\config.jsonc` (Windows).
|
# macOS - launch SubMiner.app from /Applications, or:
|
||||||
2. **Yomitan dictionaries.** Import at least one dictionary, or lookups will not work. SubMiner's Yomitan is separate from any Yomitan in your browser.
|
subminer app --setup
|
||||||
3. **The `subminer` command** (optional). Setup installs it into a folder already on your `PATH`. If there is none on Linux or macOS, it uses `~/.local/bin` and shows the `export PATH=...` line to add to your shell config. On Windows it adds `%LOCALAPPDATA%\SubMiner\bin` to your user `PATH`.
|
```
|
||||||
4. **SubMiner mpv shortcut** (Windows only). A Start menu or desktop shortcut that opens mpv with SubMiner attached.
|
|
||||||
|
|
||||||
**Finish setup** unlocks once the config exists and at least one dictionary is imported. To reopen setup later, run `subminer app --setup`.
|
On **Windows**, just run `SubMiner.exe` - the setup wizard opens automatically on first launch.
|
||||||
|
|
||||||
|
The setup wizard walks you through:
|
||||||
|
|
||||||
|
- **Config file** - auto-created at `~/.config/SubMiner/config.jsonc` (Linux/macOS) or `%APPDATA%\SubMiner\config.jsonc` (Windows)
|
||||||
|
- **Yomitan dictionaries** - import at least one dictionary so word lookups work
|
||||||
|
- **`subminer` launcher** _(optional)_ - installs a wrapper into a writable terminal PATH directory. The wrapper uses Bun packaged with the app, with no separate runtime setup. If the included runtime is unavailable, the launcher controls show an error asking you to reinstall SubMiner.
|
||||||
|
- **Windows shortcut** _(Windows only)_ - create a `SubMiner mpv` Start Menu/Desktop shortcut
|
||||||
|
|
||||||
|
The `Finish setup` button requires a config file and at least one Yomitan dictionary. The launcher is optional and never blocks setup completion.
|
||||||
|
|
||||||
|
On Linux and macOS, setup selects a writable directory already on your terminal `PATH`. If it cannot find one, it creates `~/.local/bin` and shows the `export PATH=...` command to run. Add that command to your shell configuration yourself if you want it in future terminals. Setup never edits shell configuration files. On Windows, setup adds only the wrapper directory to the user `PATH`. Setup stores a custom app location so the wrapper can find an AppImage or app bundle outside the usual install directories.
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> You can re-open the setup wizard at any time with `subminer app --setup` or `SubMiner.AppImage --setup`.
|
||||||
|
|
||||||
### Play a video
|
### Play a video
|
||||||
|
|
||||||
|
Once setup is complete:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
subminer video.mkv
|
subminer video.mkv
|
||||||
```
|
```
|
||||||
|
|
||||||
On Windows, double-click the **SubMiner mpv** shortcut or drag a video onto it.
|
The overlay appears over mpv. If a subtitle track loaded, its text shows up in the overlay as hoverable words.
|
||||||
|
|
||||||
The overlay appears over mpv, and the subtitle text becomes hoverable. See [Usage](/usage) for everyday use.
|
On **Windows**, the recommended way to play video is with the **SubMiner mpv** shortcut created during setup - double-click it, or drag a video file onto it.
|
||||||
|
|
||||||
### Check your setup
|
### Verify setup
|
||||||
|
|
||||||
|
Run the built-in diagnostic:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
subminer doctor
|
subminer doctor
|
||||||
```
|
```
|
||||||
|
|
||||||
This checks for the SubMiner app, mpv, ffmpeg, yt-dlp, fzf, rofi, your config file, and the mpv socket path. Only a missing app or mpv counts as a failure. The rest are reported as optional.
|
This checks for the app binary, mpv, ffmpeg, yt-dlp, fzf, rofi, your config file, and the mpv socket path. Only the app binary and mpv are hard failures; the rest are reported as optional. Fix any hard failures before continuing.
|
||||||
|
|
||||||
## Anki setup
|
## Anki setup (recommended)
|
||||||
|
|
||||||
To create cards:
|
If you plan to mine Anki cards:
|
||||||
|
|
||||||
1. Install [Anki](https://apps.ankiweb.net/).
|
1. Install [Anki](https://apps.ankiweb.net/)
|
||||||
2. In Anki, open **Tools > Add-ons > Get Add-ons** and enter `2055492159` to install [AnkiConnect](https://ankiweb.net/shared/info/2055492159).
|
2. Install [AnkiConnect](https://ankiweb.net/shared/info/2055492159) - open Anki → **Tools → Add-ons → Get Add-ons** → enter code `2055492159`
|
||||||
3. Restart Anki. Keep it open while you use SubMiner.
|
3. Restart Anki and keep it running while using SubMiner
|
||||||
|
|
||||||
SubMiner connects to AnkiConnect at its default address with no extra setup. To choose your deck and card fields, see [Anki integration](/anki-integration).
|
AnkiConnect listens on `http://127.0.0.1:8765` by default. SubMiner connects automatically with no extra config needed.
|
||||||
|
|
||||||
|
For enrichment configuration (sentence, audio, screenshot fields), see [Anki Integration](/anki-integration).
|
||||||
|
|
||||||
## Updates
|
## Updates
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
subminer -u
|
subminer -u
|
||||||
|
# or
|
||||||
|
subminer --update
|
||||||
```
|
```
|
||||||
|
|
||||||
The tray menu's **Check for Updates** also installs updates on Linux, macOS, and Windows. If the AppImage sits in a folder you cannot write to, SubMiner prints the command to run instead of asking for admin rights.
|
SubMiner verifies AppImage, launcher, and Linux support-asset downloads against `SHA256SUMS.txt`. On Linux those support assets include the launcher-managed runtime plugin copy under `SubMiner/plugin/subminer`, the rofi theme at `SubMiner/themes/subminer.rasi`, and the scoped Matroska thumbnailer registration under `SubMiner/thumbnailers`. If the binary is in a protected path, SubMiner shows the exact command to run rather than elevating itself.
|
||||||
|
|
||||||
If you installed from the AUR, update through your package manager instead.
|
The tray "Check for Updates" entry installs the new app automatically on Linux, macOS, and Windows. Current `subminer` wrappers remain small bootstraps that locate the installed app and its private runtime. On Linux the updater replaces the running `.AppImage` in place via `electron-updater` and refreshes managed support assets from `subminer-assets.tar.gz`. The next launcher invocation detects the changed AppImage fingerprint and prepares the matching Bun and CLI cache before running the command. App startup also refreshes this payload and migrates recognized writable legacy launchers, including the launcher path an update deferred. AppImages managed by a system package, for example the AUR `/opt/SubMiner/SubMiner.AppImage`, are skipped so the package manager stays in charge.
|
||||||
|
|
||||||
## Launching mpv yourself
|
On Linux, `subminer -u` updates the AppImage and managed support assets directly, even when the app is not running. The launcher cache refreshes when the app fingerprint changes. AUR installs remain under package-manager control and should be updated through the package manager.
|
||||||
|
|
||||||
The `subminer` command and the Windows shortcut start mpv with the IPC socket SubMiner needs. If you start mpv another way, add this option or the overlay starts without subtitles:
|
## How it all fits together
|
||||||
|
|
||||||
```bash
|
SubMiner is an overlay window that sits on top of mpv. It talks to mpv over an IPC socket, renders each subtitle line as interactive text backed by the bundled Yomitan dictionary engine, and writes Anki cards through AnkiConnect when you ask it to.
|
||||||
--input-ipc-server=/tmp/subminer-socket # Linux and macOS
|
|
||||||
--input-ipc-server=\\.\pipe\subminer-socket # Windows
|
|
||||||
```
|
|
||||||
|
|
||||||
SubMiner loads its mpv plugin automatically, so there is nothing else to install. See [mpv plugin](/mpv-plugin) for the in-player keybindings.
|
The `subminer` launcher handles mpv IPC socket setup automatically. If you launch mpv yourself or from another tool, you must pass `--input-ipc-server=/tmp/subminer-socket` (or `\\.\pipe\subminer-socket` on Windows) - without it the overlay starts but subtitles won't appear.
|
||||||
|
|
||||||
|
SubMiner injects the bundled mpv plugin at runtime, so there is nothing to install separately. On Linux, the `subminer` launcher checks for its managed runtime plugin copy, rofi theme, and scoped thumbnailer registration before every mpv-managed launch and installs those support assets from the bundled app automatically if one is missing. For a rofi picker launch, this check runs before the picker opens. The plugin adds in-player keybindings (the `y` chord) for driving the overlay from mpv. See [MPV Plugin](/mpv-plugin) for the full keybinding and configuration reference.
|
||||||
|
|
||||||
|
## Platform notes
|
||||||
|
|
||||||
|
### macOS
|
||||||
|
|
||||||
|
**MeCab paths (Homebrew):**
|
||||||
|
|
||||||
|
- Apple Silicon (M1/M2): `/opt/homebrew/bin/mecab`
|
||||||
|
- Intel: `/usr/local/bin/mecab`
|
||||||
|
|
||||||
|
`mecab` has to be on your PATH when SubMiner launches.
|
||||||
|
|
||||||
|
**Fullscreen:** The overlay follows mpv into fullscreen. If it does not, accessibility permission is the usual cause.
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
|
||||||
|
- The **SubMiner mpv** shortcut is the recommended way to launch playback. It starts `mpv.exe` with the right IPC socket and subtitle defaults.
|
||||||
|
- First-run setup adds only `%LOCALAPPDATA%\SubMiner\bin` to the HKCU user PATH. It does not add `SubMiner.exe` to PATH.
|
||||||
|
- IPC socket on Windows is `\\.\pipe\subminer-socket` - do not use `/tmp/subminer-socket`.
|
||||||
|
- Config is stored at `%APPDATA%\SubMiner\config.jsonc`.
|
||||||
|
|
||||||
## Manual launcher install
|
## Manual launcher install
|
||||||
|
|
||||||
Use these if you skipped the launcher during setup. The launcher finds SubMiner in the usual install locations. For a custom location, set `SUBMINER_BINARY_PATH` to the app executable.
|
Current launcher downloads use Bun included in the SubMiner app. The wrapper searches normal install locations and honors `SUBMINER_BINARY_PATH`; Linux also honors `SUBMINER_APPIMAGE_PATH`.
|
||||||
|
|
||||||
### Linux {#manual-launcher-install-linux}
|
### Linux {#manual-launcher-install-linux}
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# Download the launcher
|
||||||
wget https://github.com/ksyasuda/SubMiner/releases/latest/download/subminer -O ~/.local/bin/subminer
|
wget https://github.com/ksyasuda/SubMiner/releases/latest/download/subminer -O ~/.local/bin/subminer
|
||||||
chmod +x ~/.local/bin/subminer
|
chmod +x ~/.local/bin/subminer
|
||||||
```
|
```
|
||||||
@@ -330,16 +456,36 @@ chmod +x ~/.local/bin/subminer
|
|||||||
### macOS {#manual-launcher-install-macos}
|
### macOS {#manual-launcher-install-macos}
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# Download the launcher
|
||||||
sudo curl -fSL https://github.com/ksyasuda/SubMiner/releases/latest/download/subminer -o /usr/local/bin/subminer
|
sudo curl -fSL https://github.com/ksyasuda/SubMiner/releases/latest/download/subminer -o /usr/local/bin/subminer
|
||||||
sudo chmod +x /usr/local/bin/subminer
|
sudo chmod +x /usr/local/bin/subminer
|
||||||
```
|
```
|
||||||
|
|
||||||
### Windows {#manual-launcher-install-windows}
|
### Windows {#manual-launcher-install-windows}
|
||||||
|
|
||||||
Download `subminer.cmd` from [GitHub Releases](https://github.com/ksyasuda/SubMiner/releases/latest) and put it in a folder on your user `PATH`.
|
Download `subminer.cmd` from GitHub Releases and place it in a directory on your user `PATH`. It finds the installed app in the normal per-user or Program Files location. Set `SUBMINER_BINARY_PATH` if you use a portable or custom install.
|
||||||
|
|
||||||
## Bundled Bun runtime {#bundled-bun-runtime}
|
Launchers installed before the private-runtime change may still be bundled JavaScript with a Bun shebang. Those old files need system Bun until a current app startup migrates a recognized writable launcher, or until you replace one with the current release wrapper.
|
||||||
|
|
||||||
The `subminer` command runs on a copy of [Bun](https://bun.sh) 1.3.5 that ships inside the app, so you do not need to install Bun. Bun is MIT licensed and statically links JavaScriptCore (LGPL 2.0) and TinyCC (LGPL 2.1). License texts and a `SOURCE.md` ship in the app under `resources/bun/licenses`, and each GitHub release includes `bun-v1.3.5-source.tar.gz` with the matching sources.
|
## Optional extras
|
||||||
|
|
||||||
Next: [Usage](/usage).
|
### Linux support assets
|
||||||
|
|
||||||
|
SubMiner ships the Linux rofi theme, scoped Matroska thumbnailer registration, launcher-managed runtime plugin copy, and the bundled Bun license notices in `subminer-assets.tar.gz`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wget https://github.com/ksyasuda/SubMiner/releases/latest/download/subminer-assets.tar.gz -O /tmp/subminer-assets.tar.gz
|
||||||
|
tar -xzf /tmp/subminer-assets.tar.gz -C /tmp
|
||||||
|
mkdir -p ~/.local/share/SubMiner/themes
|
||||||
|
cp /tmp/assets/themes/subminer.rasi ~/.local/share/SubMiner/themes/subminer.rasi
|
||||||
|
mkdir -p ~/.local/share/SubMiner/thumbnailers
|
||||||
|
cp /tmp/assets/thumbnailers/subminer-ffmpegthumbnailer.thumbnailer ~/.local/share/SubMiner/thumbnailers/
|
||||||
|
mkdir -p ~/.local/share/SubMiner/plugin
|
||||||
|
cp -R /tmp/plugin/subminer ~/.local/share/SubMiner/plugin/subminer
|
||||||
|
```
|
||||||
|
|
||||||
|
`subminer -u` and the tray updater keep those Linux support assets in sync automatically once the `SubMiner` data dir exists. Normal Linux launcher playback also auto-installs all three assets from the bundled app if one is missing, so manual extraction is mainly useful for pre-seeding or custom setups. Rofi receives the SubMiner data path through its process-local `XDG_DATA_DIRS`, so the thumbnailer registration does not change the desktop-wide configuration.
|
||||||
|
|
||||||
|
Override the theme path with `SUBMINER_ROFI_THEME=/absolute/path/to/theme.rasi`.
|
||||||
|
|
||||||
|
Next: [Usage](/usage) - learn about the `subminer` wrapper, keybindings, and YouTube playback.
|
||||||
+46
-36
@@ -1,12 +1,12 @@
|
|||||||
# IPC + runtime contracts
|
# IPC + runtime contracts
|
||||||
|
|
||||||
The Electron main and renderer processes talk only through IPC channels. The renderer is an untrusted surface: it loads Yomitan and renders subtitle text SubMiner did not write. Every payload that crosses the bridge goes through a validator before domain code sees it.
|
SubMiner's Electron app runs two isolated processes, main and renderer, and IPC channels are the only way they talk. That boundary is deliberate. The renderer is an untrusted surface: it loads Yomitan, renders subtitle text SubMiner did not write, and runs in a Chromium sandbox. Every message crossing the bridge goes through a validator before any domain code sees it.
|
||||||
|
|
||||||
Channel names, payload validators, the preload bridge, and the handler change together. When you touch an IPC surface, update all four in the same commit.
|
Channel names, payload shapes, and validators all live together, so they change together. Touching an IPC surface means updating the contract, the validator, the preload bridge, and the handler in one commit. Drift between those four layers is a bug, not a style preference.
|
||||||
|
|
||||||
## Message flow
|
## Message flow
|
||||||
|
|
||||||
Renderer calls pass through the preload bridge, the main-process handler, and a validator before they reach a service. Malformed payloads stop at the validator.
|
Renderer-initiated calls (`invoke`) pass through four boundaries before reaching a service. Fire-and-forget messages (`send`) follow the same path but skip the response leg. Malformed payloads are caught at the validator and never reach domain code.
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
flowchart TB
|
flowchart TB
|
||||||
@@ -36,18 +36,12 @@ flowchart TB
|
|||||||
style E fill:#ed8796,stroke:#494d64,color:#24273a,stroke-width:1.5px
|
style E fill:#ed8796,stroke:#494d64,color:#24273a,stroke-width:1.5px
|
||||||
```
|
```
|
||||||
|
|
||||||
`IPC_CHANNELS` in `src/shared/ipc/contracts.ts` groups channels by pattern:
|
|
||||||
|
|
||||||
- `request`: invoke channels. The renderer awaits a result, for example lookups, config reads, and mining actions. Invalid payloads return a structured failure such as `{ ok: false, ... }` instead of throwing.
|
|
||||||
- `command`: fire-and-forget sends, for example focus events, UI state hints, and position updates. Invalid payloads are dropped.
|
|
||||||
- `event`: messages pushed from main to the renderer.
|
|
||||||
|
|
||||||
## Runtime sockets
|
## Runtime sockets
|
||||||
|
|
||||||
The bridge above lives inside the Electron app. Separate OS sockets connect the app to mpv and to the launcher and plugin. They carry no renderer payloads and do not go through the contract and validator layer.
|
The renderer↔main bridge above lives *inside* the Electron app. A separate set of OS sockets connects the app to the other runtimes - mpv and the launcher/plugin. These carry no renderer payloads and bypass the contract/validator layer; they are command and property channels between processes.
|
||||||
|
|
||||||
- **mpv IPC socket**: `/tmp/subminer-socket`, or `\\.\pipe\subminer-socket` on Windows. mpv creates it with `--input-ipc-server`. The app's `MpvIpcClient` sends JSON commands here and observes playback and subtitle properties.
|
- **mpv IPC socket** (`/tmp/subminer-socket`, or `\\.\pipe\subminer-socket` on Windows): the `MpvIpcClient` in the main process connects here to send JSON commands and subscribe to playback/subtitle properties via `observe_property`. Created by mpv's `--input-ipc-server`.
|
||||||
- **App control socket**: `subminer-control-<uid>-<hash>.sock` in the temp directory, or `\\.\pipe\subminer-control-<hash>` on Windows. The launcher and plugin send CLI-style commands (`--start`, `--show-visible-overlay`, `--texthooker`) to a running app here. It also routes a second `subminer` invocation into the existing instance.
|
- **App control socket** (`/tmp/subminer-control-<uid>-<hash>.sock`, or a named pipe on Windows): the launcher and the mpv plugin send CLI-style commands (`--start`, `--show-visible-overlay`, `--texthooker`) to a running app here. It also dedupes a second `subminer` invocation into the existing instance instead of launching twice.
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
flowchart LR
|
flowchart LR
|
||||||
@@ -71,44 +65,60 @@ flowchart LR
|
|||||||
style MpvProc fill:#363a4f,stroke:#494d64,color:#cad3f5
|
style MpvProc fill:#363a4f,stroke:#494d64,color:#cad3f5
|
||||||
```
|
```
|
||||||
|
|
||||||
[Playback startup flow](./architecture#playback-startup-flow) shows when each socket comes up during a launch.
|
How these sockets are established during launch is covered in [Playback Startup Flow](./architecture#playback-startup-flow).
|
||||||
|
|
||||||
## Core files
|
## Core surfaces
|
||||||
|
|
||||||
| File | Role |
|
| File | Role |
|
||||||
| -------------------------------------- | ----------------------------------------------------------------------------------- |
|
| --- | --- |
|
||||||
| `src/shared/ipc/contracts.ts` | Channel names and payload types, shared by both processes |
|
| `src/shared/ipc/contracts.ts` | Canonical channel names and payload type contracts. Single source of truth for both processes. |
|
||||||
| `src/shared/ipc/validators.ts` | Runtime payload parsers and type guards |
|
| `src/shared/ipc/validators.ts` | Runtime payload parsers and type guards. Every `invoke` payload is validated here before the handler runs. |
|
||||||
| `src/preload.ts` | Typed renderer API; only approved channels are exposed |
|
| `src/preload.ts` | Renderer-side bridge. Exposes a typed API surface to the renderer - only approved channels are accessible. |
|
||||||
| `src/core/services/ipc.ts` | Registers overlay handlers and validates payloads before calling domain logic |
|
| `src/main/ipc-runtime.ts` | Main-process handler registration and routing. Wires validated channels to domain handlers. |
|
||||||
| `src/core/services/anki-jimaku-ipc.ts` | Same boundary for Anki and Jimaku operations |
|
| `src/core/services/ipc.ts` | Service-level invoke handling. Applies guardrails (validation, error wrapping) before calling domain logic. |
|
||||||
| `src/main/ipc-runtime.ts` | Builds handler dependencies (via `src/main/dependencies.ts`) and registers handlers |
|
| `src/core/services/anki-jimaku-ipc.ts` | Integration-specific IPC boundary for Anki and Jimaku operations. |
|
||||||
| `src/main/cli-runtime.ts` | Handles commands from the launcher or mpv plugin, not the renderer |
|
| `src/main/cli-runtime.ts` | CLI/runtime command boundary. Handles commands that originate from the launcher or mpv plugin rather than the renderer. |
|
||||||
|
|
||||||
## Contract rules
|
## Contract rules
|
||||||
|
|
||||||
- **Use the shared constants.** Take channel names from `contracts.ts`, never string literals.
|
These rules exist to prevent a class of bugs where the renderer and main process silently disagree about message shapes - which surfaces as undefined fields, swallowed errors, or state corruption.
|
||||||
- **Validate before handling.** Every renderer payload goes through `validators.ts` before domain logic.
|
|
||||||
- **Return structured failures.** Invoke handlers return `{ ok: false, ... }` on failure instead of throwing, so the renderer can tell success from failure without try/catch.
|
- **Use shared constants.** Channel names come from `contracts.ts`, never ad-hoc literal strings. This makes channels greppable and refactor-safe.
|
||||||
- **Keep payloads narrow.** Send only what the handler needs, not whole state objects.
|
- **Validate before handling.** Every `invoke` payload passes through `validators.ts` before reaching domain logic. This catches shape drift at the boundary instead of deep inside a service.
|
||||||
- **Keep handlers thin.** Validate, delegate to a service or composer, return. Route shared state changes through the transition helpers in `src/main/state.ts`.
|
- **Return structured failures.** Handlers return `{ ok: false, error: string }` on failure rather than throwing. The renderer can always distinguish success from failure without try/catch.
|
||||||
|
- **Keep payloads narrow.** Send only what the handler needs. Avoid passing entire state objects across the bridge - it couples the renderer to internal main-process structure.
|
||||||
|
- **Co-evolve all layers.** When a payload shape changes, update `contracts.ts`, `validators.ts`, `preload.ts`, and the handler in the same commit. Partial updates are treated as bugs.
|
||||||
|
|
||||||
|
## Two message patterns
|
||||||
|
|
||||||
|
**Invoke (request/response):** The renderer calls a typed bridge method and awaits a result. The main process validates the payload, runs the handler, and returns a structured response. Used for operations where the renderer needs a result - lookups, config reads, mining actions.
|
||||||
|
|
||||||
|
**Fire-and-forget (send):** The renderer sends a message with no response. The main process validates and handles it silently. Malformed payloads are dropped. Used for notifications where the renderer doesn't need confirmation - UI state hints, focus events, position updates.
|
||||||
|
|
||||||
## Add a new IPC action
|
## Add a new IPC action
|
||||||
|
|
||||||
1. Add the channel constant in `src/shared/ipc/contracts.ts`.
|
1. Add the channel constant in `src/shared/ipc/contracts.ts`.
|
||||||
2. Add or extend the validator in `src/shared/ipc/validators.ts`.
|
2. Add or extend the payload validator in `src/shared/ipc/validators.ts`.
|
||||||
3. Expose a typed bridge method in `src/preload.ts`.
|
3. Expose a typed bridge method in `src/preload.ts`.
|
||||||
4. Register the handler in `src/core/services/ipc.ts` (or `anki-jimaku-ipc.ts`), and supply any new dependency through `src/main/ipc-runtime.ts`.
|
4. Register the handler in `src/main/ipc-runtime.ts` (or the relevant domain runtime module).
|
||||||
5. Test valid and malformed payloads in `src/core/services/*`.
|
5. Add tests for both valid and malformed payload cases in `src/core/services/*`.
|
||||||
6. Update renderer tests if behavior or state transitions change.
|
6. Update renderer tests when behavior or state transitions change.
|
||||||
|
|
||||||
|
## Runtime state notes
|
||||||
|
|
||||||
|
- Prefer runtime/domain composition via `src/main/runtime/composers/*` and `src/main/runtime/domains/*`. IPC handlers should delegate to composers rather than containing orchestration logic.
|
||||||
|
- Route shared mutable state updates through transition helpers in `src/main/state.ts` for migrated domains. Direct mutation from IPC handlers bypasses invariant checks.
|
||||||
|
- Keep IPC handlers thin - they validate, delegate, and return. Business logic belongs in services.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
- **Handler receives an unexpected payload:** the validator is not applied. Check that the channel is registered through the IPC service with validation, not directly.
|
- **Unknown payload in handler:** The validator is not being applied before the handler runs. Check that the channel is routed through `ipc-runtime.ts` with validation, not registered directly.
|
||||||
- **Renderer invoke fails:** check that the preload method exists, uses the right channel constant, and that the handler is registered and returns instead of throwing.
|
- **Renderer invoke fails:** Verify the preload bridge method exists and matches the channel constant. Check that the handler is registered and returning (not throwing).
|
||||||
- **Invoke returns an unexpected shape:** compare the contract, validator, preload method, and handler side by side. One of them changed without the others.
|
- **Contract drift:** When invoke calls return unexpected shapes, compare the shared contract, validator, preload bridge, and main handler signatures side by side. One of them was updated without the others.
|
||||||
|
|
||||||
## Related docs
|
## Related docs
|
||||||
|
|
||||||
- [Architecture](/architecture)
|
- [Architecture](/architecture)
|
||||||
- [Building and testing](/development)
|
- [Development](/development)
|
||||||
|
- [Configuration](/configuration)
|
||||||
|
- [Troubleshooting](/troubleshooting)
|
||||||
@@ -1,62 +1,121 @@
|
|||||||
# Jellyfin integration
|
# Jellyfin integration
|
||||||
|
|
||||||
If your anime lives on a [Jellyfin](https://jellyfin.org) server, SubMiner can appear as a cast target in any Jellyfin client. Cast an episode and it plays in SubMiner's mpv with the overlay and Yomitan lookup attached.
|
[Jellyfin](https://jellyfin.org) is a free, self-hosted media server, a private streaming service for video you already own. If your anime lives on a Jellyfin server, SubMiner plays episodes from it through mpv with the mining overlay attached.
|
||||||
|
|
||||||
## Setup
|
::: tip Who needs this?
|
||||||
|
This page only matters if you already run a Jellyfin server or have access to one. Watching local files or YouTube? Skip it. Otherwise start with the in-app setup window (`subminer jellyfin`).
|
||||||
|
:::
|
||||||
|
|
||||||
You need a Jellyfin server (Jellyfin 12 is supported) and your username and password.
|
SubMiner can register itself as a **cast-to-device target**, the way jellyfin-mpv-shim does. Sign in once, turn on discovery, and SubMiner appears in the "Play on" menu of any Jellyfin client, whether that is the web app, your phone, or a TV. Cast an episode and it opens in SubMiner's mpv window with the overlay and Yomitan lookup live.
|
||||||
|
|
||||||
1. Start SubMiner and leave it in the system tray.
|
This is the recommended way to use Jellyfin with SubMiner. A terminal-only option is covered in [Launcher playback](#launcher-playback) at the end.
|
||||||
2. Open the tray menu and click **Configure Jellyfin**. You can also run `subminer jellyfin`.
|
|
||||||
3. Enter the **Server URL** (for example `http://127.0.0.1:8096`), **Username**, and **Password**, then click **Login**.
|
|
||||||
|
|
||||||
SubMiner stores an encrypted session token, not your password, and turns the integration on. Reopen the same window to switch servers or log out.
|
## Requirements
|
||||||
|
|
||||||
## Casting from Jellyfin
|
- A Jellyfin server plus your username and password
|
||||||
|
- SubMiner installed and running (see [Installation](/installation))
|
||||||
|
- On Linux, the session token is stored with `gnome-libsecret` by default
|
||||||
|
|
||||||
After you sign in, tick **Jellyfin Discovery** in the tray menu. SubMiner then shows up in the cast ("Play on") menu under your computer's hostname until it quits. To connect every time SubMiner starts, turn on `startupWarmups.jellyfinRemoteSession` and leave `remoteControlAutoConnect` on.
|
## Quick start
|
||||||
|
|
||||||
1. In the Jellyfin web or mobile app, start playing an episode.
|
### 1. start SubMiner
|
||||||
2. Open the cast menu and pick your computer.
|
|
||||||
|
|
||||||
SubMiner starts mpv if it is not already running. Pause, seek, stop, and track changes in the Jellyfin app are mirrored in mpv, and watch progress syncs back to Jellyfin. Playback resumes from Jellyfin's saved position.
|
Launch SubMiner and leave it in the system tray.
|
||||||
|
|
||||||
SubMiner selects a Japanese subtitle track automatically and resets mpv's subtitle delay to zero. It direct-plays files when it can and asks Jellyfin to transcode the rest.
|
### 2. sign in to your server
|
||||||
|
|
||||||
If an episode has no Japanese subtitles, you can [generate them with Whisper](/subtitle-generation#generating-from-the-overlay) while it plays.
|
Open the tray menu and click **Configure Jellyfin**. In the window that opens, enter your **Server URL** (for example `http://127.0.0.1:8096`), **Username**, and **Password**, then click **Login**.
|
||||||
|
|
||||||
On Windows, casting finds mpv through `mpv.executablePath`, then `SUBMINER_MPV_PATH`, then `PATH`. An invalid `mpv.executablePath` stops mpv from starting.
|
On success, SubMiner:
|
||||||
|
|
||||||
## Playing from the terminal
|
- saves an encrypted session token - your password is never stored,
|
||||||
|
- turns the Jellyfin integration on, and
|
||||||
|
- remembers the server and username for next time.
|
||||||
|
|
||||||
The launcher can browse your libraries and play an item without a Jellyfin client:
|
Reopen this window any time to switch servers or **Logout**.
|
||||||
|
|
||||||
```bash
|
### 3. turn on discovery
|
||||||
subminer jellyfin -p # fzf picker; `jf` is an alias for `jellyfin`
|
|
||||||
subminer -R jellyfin -p # rofi picker
|
Discovery is what makes SubMiner appear as a cast target. Two ways to enable it:
|
||||||
|
|
||||||
|
- **For the current session** - open the tray menu and tick **Jellyfin Discovery**. (This item appears once you've signed in.)
|
||||||
|
- **Automatically on every launch** - already on by default. After your first sign-in, SubMiner auto-connects to Jellyfin at startup, so the cast target is ready without touching the tray. You can change this under [Settings](#settings).
|
||||||
|
|
||||||
|
### 4. cast from any Jellyfin app
|
||||||
|
|
||||||
|
In the Jellyfin web UI or mobile app, start playing something, open the **cast / "Play on"** menu, and pick your device - SubMiner appears there named after your computer's hostname. Playback opens in SubMiner.
|
||||||
|
|
||||||
|
From then on, pause / resume / seek / stop and audio or subtitle track changes you make in the Jellyfin app are mirrored in SubMiner, and your watch progress syncs back to Jellyfin (now-playing and resume position).
|
||||||
|
|
||||||
|
## What happens during playback
|
||||||
|
|
||||||
|
- **mpv launches automatically.** If mpv isn't already running when you cast, SubMiner starts it with SubMiner defaults and the bundled mpv plugin, so keybindings work right away.
|
||||||
|
- **The overlay is managed by SubMiner,** so your configured `subtitleStyle` controls how subtitles look. Use the [overlay-toggle shortcut](/shortcuts) to hide it for a session.
|
||||||
|
- **Resume works.** If Jellyfin has a saved position for the item, SubMiner seeks there on load.
|
||||||
|
- **Titles and credentials stay separate.** AniList, character dictionaries, Anki source fields, and Discord presence use media titles, never authenticated stream URLs. If a usable title is unavailable, lookups are skipped and source fields show an unknown-media label. Stats identifies Jellyfin videos by server and item ID without the stream URL or API key.
|
||||||
|
- **Direct play first.** When the source allows it and the container is in your direct-play allowlist, SubMiner streams the original file; otherwise it requests a transcoded stream from Jellyfin.
|
||||||
|
- **Japanese subtitles are auto-selected,** preferring Jellyfin's default and embedded tracks over external sidecar files when several match.
|
||||||
|
- **Downloaded subtitles keep their original timing.** SubMiner removes Jellyfin's server-selected subtitle stream from the mpv load URL, suppresses the mpv plugin's one-shot subtitle auto-selection and overlay auto-start for managed Jellyfin loads, stages the subtitle files exposed by Jellyfin without letting mpv auto-switch between tracks, resets mpv's subtitle delay to zero, then selects the Japanese track. SubMiner does not compare Japanese and English cue timelines or save an inferred delay.
|
||||||
|
|
||||||
|
On startup, SubMiner clears cached anime parser metadata containing both API-key text and Jellyfin stream markers. Metadata containing only one of these is preserved.
|
||||||
|
|
||||||
|
## Settings
|
||||||
|
|
||||||
|
All Jellyfin options live under **Settings → Integrations → Jellyfin** (open settings from the tray's **Open SubMiner Settings**). The ones that matter for casting:
|
||||||
|
|
||||||
|
| Setting | Default | What it does |
|
||||||
|
| ------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| **Enabled** | Off | Turns the Jellyfin integration on. Switched on for you when you sign in. |
|
||||||
|
| **Server Url** | - | Your Jellyfin server. Filled in when you sign in. |
|
||||||
|
| **Remote Control Enabled** | On | Lets SubMiner act as a cast target. |
|
||||||
|
| **Remote Control Auto Connect** | On | Connects to Jellyfin at startup so discovery is automatic. Turn off if you'd rather start it from the tray each time. |
|
||||||
|
| **Auto Announce** | Off | Re-broadcasts visibility on connect. Enable if your device is slow to appear in the cast menu. |
|
||||||
|
|
||||||
|
Prefer editing the config file? The same keys live under `jellyfin` in `config.jsonc`:
|
||||||
|
|
||||||
|
```jsonc
|
||||||
|
{
|
||||||
|
"jellyfin": {
|
||||||
|
"enabled": true,
|
||||||
|
"serverUrl": "http://127.0.0.1:8096",
|
||||||
|
"remoteControlEnabled": true,
|
||||||
|
"remoteControlAutoConnect": true,
|
||||||
|
},
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Sign in first. Playback resumes from Jellyfin's saved position, and watch progress syncs back the same way it does for casting, whether or not discovery is on. If SubMiner is already running, the picker uses it and leaves it running. Otherwise the launcher starts SubMiner and quits it when you close mpv, the same as playing a local file. See [Launcher script](/launcher-script) for the other `jellyfin` subcommands.
|
See [Configuration](/configuration) for the full list (transcode codec, direct-play containers, default library, and more).
|
||||||
|
|
||||||
## Options
|
|
||||||
|
|
||||||
All options are under **Settings > Integrations > Jellyfin**, or `jellyfin` in `config.jsonc`. See [Configuration](/configuration#jellyfin) for the full list and defaults.
|
|
||||||
|
|
||||||
| Key | What it does |
|
|
||||||
| -------------------------- | ---------------------------------------------------------------------- |
|
|
||||||
| `enabled` | Turns the integration on. Set for you when you sign in. |
|
|
||||||
| `serverUrl` | Your Jellyfin server. Filled in when you sign in. |
|
|
||||||
| `remoteControlEnabled` | Lets SubMiner act as a cast target. |
|
|
||||||
| `remoteControlAutoConnect` | Connects at startup when `startupWarmups.jellyfinRemoteSession` is on. |
|
|
||||||
| `autoAnnounce` | Re-announces the device on connect. Try it if SubMiner appears late. |
|
|
||||||
| `transcodeVideoCodec` | Video codec requested when Jellyfin transcodes. |
|
|
||||||
|
|
||||||
For headless setups, `SUBMINER_JELLYFIN_ACCESS_TOKEN` and `SUBMINER_JELLYFIN_USER_ID` supply a session without the sign-in window. Treat the token store and `config.jsonc` as secrets.
|
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
**SubMiner is missing from the cast menu.** Check that SubMiner is running, that you are signed in (log in again if the token expired), and that discovery is on. The Jellyfin client and SubMiner must use the same server.
|
**SubMiner doesn't appear in the cast menu**
|
||||||
|
|
||||||
**Casting starts but nothing plays.** Confirm the item plays in another Jellyfin client. If mpv was closed, give SubMiner a few seconds to start it.
|
- Make sure SubMiner is running.
|
||||||
|
- Make sure you're signed in - reopen **Configure Jellyfin** and log in again if your token expired.
|
||||||
|
- Make sure discovery is on (tray **Jellyfin Discovery**, or **Remote Control Auto Connect** in settings).
|
||||||
|
- Make sure SubMiner and the Jellyfin client point at the same server.
|
||||||
|
|
||||||
**Linux token storage fails.** SubMiner stores the token with `gnome-libsecret` by default. Start your keyring, or pass `--password-store=basic_text`.
|
**Casting starts but nothing plays**
|
||||||
|
|
||||||
|
- Confirm the item plays normally in another Jellyfin client.
|
||||||
|
- If mpv was closed, give it a moment - SubMiner launches it on demand and retries.
|
||||||
|
|
||||||
|
**SubMiner keeps disconnecting**
|
||||||
|
|
||||||
|
- Check server/network stability and whether the session token has expired.
|
||||||
|
|
||||||
|
## Security notes
|
||||||
|
|
||||||
|
- The Jellyfin session (access token + user ID) is kept in SubMiner's local encrypted token storage. Your password is used only to log in and is never saved.
|
||||||
|
- Treat the token storage and your `config.jsonc` as secrets - don't commit them.
|
||||||
|
- Advanced/headless: the `SUBMINER_JELLYFIN_ACCESS_TOKEN` and `SUBMINER_JELLYFIN_USER_ID` environment variables can supply a session without the sign-in window.
|
||||||
|
|
||||||
|
## Launcher playback
|
||||||
|
|
||||||
|
If you'd rather stay in the terminal, the `subminer` launcher can browse and play Jellyfin media directly, without casting from a Jellyfin app:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
subminer jellyfin -p # alias: subminer jf -p
|
||||||
|
```
|
||||||
|
|
||||||
|
This opens an fzf picker (add `-R` for rofi) to browse your libraries and episodes, then plays the selected item in SubMiner's mpv with the same overlay, resume, and subtitle behavior described above. Sign in first (step 2) so the launcher can reach your server. See [Launcher Script](/launcher-script) for the rest of the launcher's features.
|
||||||
@@ -1,62 +1,122 @@
|
|||||||
# Jimaku integration
|
# Jimaku integration
|
||||||
|
|
||||||
[Jimaku](https://jimaku.cc) is a community archive of Japanese subtitles for anime and live action. SubMiner searches it from the overlay, downloads the file you pick, and loads it into mpv.
|
[Jimaku](https://jimaku.cc) is a community subtitle repository for anime and Japanese live action, built from files other learners uploaded. SubMiner talks to the Jimaku API, so you search, browse, and download Japanese subtitle files from inside the overlay. No alt-tabbing, no moving files around. A downloaded track loads into mpv right away.
|
||||||
|
|
||||||
## Setup
|
::: tip Prerequisite: a free API key
|
||||||
|
You need a Jimaku account and an API key (a personal access string) before this feature works. Create an account at [jimaku.cc](https://jimaku.cc), copy your key, and add it to your config as shown under [Configuration](#configuration) below. Without a key, the search modal will report "Jimaku API key not set."
|
||||||
|
:::
|
||||||
|
|
||||||
1. Create a free account at [jimaku.cc](https://jimaku.cc) and copy your API key.
|
## How it works
|
||||||
2. Add the key to `config.jsonc`, either directly or through a command that prints it:
|
|
||||||
|
The Jimaku integration runs through an in-overlay modal accessible via a keyboard shortcut (`Ctrl+Shift+J` by default).
|
||||||
|
|
||||||
|
When you open the modal, SubMiner parses the current video filename to extract a title, season, and episode number. It handles `S01E03`, `1x03`, `E03`, and dash-separated episode numbers. If the filename yields a high-confidence match (title + episode), SubMiner auto-searches immediately.
|
||||||
|
|
||||||
|
From there:
|
||||||
|
|
||||||
|
1. **Pick a catalogue** - The **Anime** and **Live action** tabs at the top of the modal choose which Jimaku catalogue to search. Switching tabs re-runs the current search. The choice persists until SubMiner restarts.
|
||||||
|
2. **Search** - SubMiner queries the Jimaku API with the parsed title. Results appear as a list of entries (Japanese and English names).
|
||||||
|
3. **Browse entries** - Select an entry to load its available subtitle files, filtered by episode if one was detected.
|
||||||
|
4. **Browse files** - Files show name, size, and last-modified date. If a language preference is configured, files are sorted accordingly (e.g., Japanese-tagged files first).
|
||||||
|
5. **Download** - Selecting a file downloads it to the same directory as the video (or a temp directory for remote/streamed media) and loads it into mpv as a new subtitle track.
|
||||||
|
|
||||||
|
If no files match the current episode filter, a "Show all files" button lets you broaden the search to all episodes for that entry.
|
||||||
|
|
||||||
|
### Modal keyboard shortcuts
|
||||||
|
|
||||||
|
| Key | Action |
|
||||||
|
| ---------------------------- | --------------------------------------------- |
|
||||||
|
| `Enter` (in text field) | Search |
|
||||||
|
| `Enter` (in list) | Select entry / download file |
|
||||||
|
| `Arrow Up` / `Arrow Down` | Navigate entries or files |
|
||||||
|
| `Arrow Left` / `Arrow Right` | Switch between the Anime and Live action tabs |
|
||||||
|
| `Escape` | Close modal |
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
Add a `jimaku` section to your `config.jsonc`:
|
||||||
|
|
||||||
```jsonc
|
```jsonc
|
||||||
{
|
{
|
||||||
"jimaku": {
|
"jimaku": {
|
||||||
"apiKey": "YOUR_API_KEY",
|
"apiKey": "YOUR_API_KEY",
|
||||||
// or, to keep it out of the config file:
|
"apiKeyCommand": "cat ~/.jimaku_key",
|
||||||
// "apiKeyCommand": "pass jimaku/api-key",
|
"apiBaseUrl": "https://jimaku.cc",
|
||||||
|
"languagePreference": "ja",
|
||||||
|
"maxEntryResults": 10,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
If both are set, `apiKey` wins. `apiKeyCommand` must print the key within 10 seconds. Without a key, the modal shows "Jimaku API key not set."
|
| Option | Type | Default | Description |
|
||||||
|
| --------------------------- | ---------------------------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `jimaku.apiKey` | `string` | - | Jimaku API key (plaintext). Mutually exclusive with `apiKeyCommand`. |
|
||||||
|
| `jimaku.apiKeyCommand` | `string` | - | Shell command that prints the API key to stdout. Useful for secret managers (e.g., `pass jimaku/api-key`). |
|
||||||
|
| `jimaku.apiBaseUrl` | `string` | `"https://jimaku.cc"` | Base URL for the Jimaku API. Only change this if using a mirror or local instance. |
|
||||||
|
| `jimaku.languagePreference` | `"ja"` \| `"en"` \| `"none"` | `"ja"` | Sort subtitle files by language tag. `"ja"` pushes Japanese-tagged files to the top; `"en"` does the same for English. `"none"` preserves the API order. |
|
||||||
|
| `jimaku.maxEntryResults` | `number` | `10` | Maximum number of entries returned per search. |
|
||||||
|
|
||||||
## Usage
|
The keyboard shortcut is configured separately under `shortcuts`:
|
||||||
|
|
||||||
1. Press `Ctrl+Shift+J` during playback.
|
```jsonc
|
||||||
2. SubMiner fills in the title, season, and episode from the file name. If it finds both a title and an episode, it searches right away. Otherwise, fix the fields and press `Enter`.
|
{
|
||||||
3. Pick the **Anime** or **Live action** tab. Switching tabs repeats the search.
|
"shortcuts": {
|
||||||
4. Select an entry, then select a file. Files are filtered to the current episode. Click **Broaden search (all files)** to see every file in the entry.
|
"openJimaku": "Ctrl+Shift+J",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
The file is saved next to the video (or to a temp directory for streams) and loaded into mpv as a new subtitle track.
|
### API key
|
||||||
|
|
||||||
| Key | Action |
|
An API key is required to use the Jimaku integration. You can get one from [jimaku.cc](https://jimaku.cc). There are two ways to provide it:
|
||||||
| ---------------- | -------------------------------------- |
|
|
||||||
| `Enter` | Search, or select the highlighted item |
|
|
||||||
| `Up` / `Down` | Move through entries or files |
|
|
||||||
| `Left` / `Right` | Switch tabs |
|
|
||||||
| `Escape` | Close |
|
|
||||||
|
|
||||||
You can also open the modal with `subminer app --open-jimaku`, or change the shortcut with `shortcuts.openJimaku`.
|
- **`apiKey`** - set the key directly in config. Simple, but the key is stored in plaintext.
|
||||||
|
- **`apiKeyCommand`** - a shell command that outputs the key. Runs with a 10-second timeout. Preferred if you use a secret manager like `pass`, `gpg`, or a keychain tool.
|
||||||
|
|
||||||
The file name parser understands `S01E03`, `1x03`, `E03`, `EP03`, and `Title - 03 -` patterns, and reads the season from a parent folder such as `Season 2`. It ignores bracket tags like `[SubGroup]` and year tags like `(2024)`.
|
If both are set, `apiKey` takes priority.
|
||||||
|
|
||||||
## Options
|
## Filename parsing
|
||||||
|
|
||||||
| Key | What it does |
|
SubMiner extracts media info from the current video path to pre-fill the search fields. The parser handles:
|
||||||
| --------------------------- | ------------------------------------------------------------------- |
|
|
||||||
| `jimaku.apiKey` | API key in plain text. |
|
|
||||||
| `jimaku.apiKeyCommand` | Shell command that prints the API key. |
|
|
||||||
| `jimaku.languagePreference` | Sorts files tagged with this language first: `ja`, `en`, or `none`. |
|
|
||||||
| `jimaku.maxEntryResults` | Maximum entries per search. |
|
|
||||||
| `jimaku.apiBaseUrl` | API address. Change only for a mirror. |
|
|
||||||
|
|
||||||
See [Configuration](/configuration#jimaku) for defaults.
|
- **Season + episode patterns:** `S01E03`, `1x03`
|
||||||
|
- **Episode-only patterns:** `E03`, `EP03`, or dash-separated numbers like `Title - 03 -`
|
||||||
|
- **Spelled-out episode labels:** `Episode 4`, `第4話`
|
||||||
|
- **Season named at the end of the title:** `… Season 3`, `… 3rd Season`, `… S3`, `… 第3期` - the season goes in the Season field instead of being searched for as part of the series name
|
||||||
|
- **Season folders:** a parent directory named `Season 2` or `S2` fills in the season when the filename lacks one
|
||||||
|
- **Bracket tags:** `[SubGroup]`, `[1080p]`, `[HEVC]` - stripped before title extraction
|
||||||
|
- **Year tags:** `(2024)` - stripped
|
||||||
|
- **Dots and underscores:** treated as spaces
|
||||||
|
- **Remote/streamed URLs:** SubMiner checks URL query parameters (`title`, `name`, `q`) and path segments to extract a meaningful title
|
||||||
|
|
||||||
|
If the parser produces a high-confidence result (title + episode both detected), the search runs automatically when the modal opens. Otherwise, you can adjust the fields manually before searching.
|
||||||
|
|
||||||
|
Episodes launched from the [anime browser](/anime-browser) skip parsing entirely: Title, Season, and Episode come from the source's own listing, which is why the search runs immediately even though the stream URL says nothing about the episode.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
**"Jimaku API key not set."** Set `jimaku.apiKey` or `jimaku.apiKeyCommand`. Run the command in your shell to confirm it prints only the key.
|
**"Jimaku API key not set"**
|
||||||
|
|
||||||
**HTTP 429.** You hit Jimaku's rate limit. Wait for the time shown in the message and retry.
|
Configure `jimaku.apiKey` or `jimaku.apiKeyCommand` in your config. If using `apiKeyCommand`, verify the command works in your shell: it should print the key and exit cleanly.
|
||||||
|
|
||||||
**No entries found.** Search with just the show's name, without season or episode words. Jimaku matches against its own titles.
|
**"Jimaku request failed" or HTTP 429**
|
||||||
|
|
||||||
**The subtitle downloads but does not load.** SubMiner loads it over the mpv socket. Make sure mpv is still running and connected.
|
The Jimaku API has rate limits. If you see 429 errors, wait for the retry duration shown in the OSD message and try again.
|
||||||
|
|
||||||
|
**No entries found**
|
||||||
|
|
||||||
|
Try simplifying the title - remove season/episode qualifiers and search with just the anime name. Jimaku's search matches against its own database of anime titles, so the exact spelling matters.
|
||||||
|
|
||||||
|
**No files found for this episode**
|
||||||
|
|
||||||
|
The entry may not have per-episode files, or files may be named differently. Click "Show all files" to see everything available for the entry.
|
||||||
|
|
||||||
|
**Downloaded subtitle not loading**
|
||||||
|
|
||||||
|
Verify mpv is running and connected via IPC. SubMiner loads the subtitle by issuing a `sub-add` command over the mpv socket. If mpv is not connected, the download succeeds but the subtitle cannot be loaded.
|
||||||
|
|
||||||
|
## Related
|
||||||
|
|
||||||
|
- [Configuration Reference](/configuration#jimaku) - full config options
|
||||||
|
- [Mining Workflow](/mining-workflow#related-features) - how Jimaku fits into the sentence mining loop
|
||||||
|
- [Troubleshooting](/troubleshooting#jimaku) - additional error guidance
|
||||||
+176
-147
@@ -1,196 +1,225 @@
|
|||||||
# Launcher script
|
# Launcher script
|
||||||
|
|
||||||
`subminer` is the command-line entry point for SubMiner. It starts mpv with the socket and options SubMiner needs, opens file pickers, and runs helper commands. This page is the reference for its subcommands and flags. For everyday use, start with [Usage](/usage).
|
The `subminer` launcher handles video selection, mpv startup, and overlay management in one script. It guarantees mpv starts with the right IPC socket and SubMiner defaults. On Windows, the **SubMiner mpv** shortcut remains the recommended playback entry point.
|
||||||
|
|
||||||
You do not need Bun or anything else installed to run it. It uses the runtime bundled with the app. On Windows, the **SubMiner mpv** shortcut is the simpler way to play files (see [Windows mpv shortcut](/usage#windows-mpv-shortcut)).
|
The launcher is a small wrapper around the CLI bundled in the desktop app. It locates a normal SubMiner installation, or uses `SUBMINER_BINARY_PATH` when you set a custom executable. Linux also accepts `SUBMINER_APPIMAGE_PATH`. First-run setup records the selected app location for the wrapper. You do not need Bun installed or on `PATH`; only the directory containing `subminer` needs to be on `PATH`.
|
||||||
|
|
||||||
```bash
|
On macOS, the wrapper runs Bun and the CLI directly from `SubMiner.app/Contents/Resources`. On Windows, `subminer.cmd` stages a versioned private Bun copy under `%LOCALAPPDATA%\SubMiner\launcher-runtime/<version>` and runs the CLI from the current app. Keeping the executable outside the app avoids locking an updater-owned file while a launcher is running. Old runtime versions are removed when no running launcher is using them.
|
||||||
subminer [options] [file | directory | URL]
|
|
||||||
subminer <subcommand> [options]
|
|
||||||
```
|
|
||||||
|
|
||||||
Run `subminer -h` or `subminer <subcommand> -h` for built-in help.
|
On Linux, the first launch caches Bun and its matching CLI and license files under `${XDG_DATA_HOME:-~/.local/share}/SubMiner/launcher`. Later launches make one `stat` call against the AppImage and run the cache without starting Electron. A missing cache or changed app fingerprint rebuilds it. App startup also refreshes the managed payload after an update.
|
||||||
|
|
||||||
## Options
|
The downloaded `subminer` and `subminer.cmd` release assets use the same private runtime flow. Older launcher scripts that were installed before this change cannot update their own code retroactively and still need system Bun until the app migrates them at startup or you download a current wrapper.
|
||||||
|
|
||||||
| Flag | Description |
|
::: tip Windows users
|
||||||
| --------------------- | ----------------------------------------------------------------------------------- |
|
On Windows, the recommended way to launch playback is the **SubMiner mpv** shortcut created during first-run setup - double-click it, drag a file onto it, or run `SubMiner.exe --launch-mpv` from a terminal. See [Windows mpv Shortcut](/usage#windows-mpv-shortcut) for details.
|
||||||
| `-d, --directory` | Directory to browse (default: current directory) |
|
:::
|
||||||
| `-r, --recursive` | Search subdirectories |
|
|
||||||
| `-R, --rofi` | Use rofi instead of fzf |
|
|
||||||
| `-H, --history` | Browse [watch history](#watch-history) |
|
|
||||||
| `-b, --backend` | Window backend: `auto`, `hyprland`, `sway`, `x11`, `macos`, `windows` |
|
|
||||||
| `-p, --profile` | mpv profile to load |
|
|
||||||
| `-a, --args` | Extra mpv options as one quoted string, e.g. `--args "--volume=80"` |
|
|
||||||
| `--start` | Start the overlay after mpv launches. Only needed if `mpv.autoStartSubMiner` is off |
|
|
||||||
| `-S, --start-overlay` | Show the overlay on start |
|
|
||||||
| `-T, --no-texthooker` | Do not start the texthooker server |
|
|
||||||
| `--settings` | Open the settings window |
|
|
||||||
| `--log-level` | `debug`, `info`, `warn`, or `error` |
|
|
||||||
| `-u, --update` | Check for and install updates |
|
|
||||||
| `-v, --version` | Print the launcher's version |
|
|
||||||
|
|
||||||
The target can be a video file, a directory (opens the picker there), a URL, or `ytsearch:"query"` for the first YouTube search result.
|
|
||||||
|
|
||||||
App flags such as `--setup` and `--dev` are not launcher flags. Pass them through with `subminer app`, for example `subminer app --setup`.
|
|
||||||
|
|
||||||
## Subcommands
|
|
||||||
|
|
||||||
| Command | What it does |
|
|
||||||
| ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- |
|
|
||||||
| `subminer stats` | Start the stats dashboard server. Opens your browser if `stats.autoOpenBrowser` is on |
|
|
||||||
| `subminer stats -b` / `-s` | Start (or reuse) the stats server in the background / stop it |
|
|
||||||
| `subminer stats cleanup` | Backfill vocabulary metadata and prune stale rows (same as `-v`) |
|
|
||||||
| `subminer stats cleanup -l` | Rebuild lifetime totals from the retained sessions |
|
|
||||||
| `subminer stats cleanup -d` | Collapse repeated lines from typeset subtitles. Add `--dry-run` to preview, `--lookback-days <n>` to limit the range |
|
|
||||||
| `subminer stats rebuild` / `backfill` | Same as `stats cleanup -l` |
|
|
||||||
| `subminer sync <host>` | Sync stats and watch history with another machine. See [below](#sync-between-machines) |
|
|
||||||
| `subminer doctor` | Check the app, mpv, ffmpeg, yt-dlp, pickers, config, and mpv socket |
|
|
||||||
| `subminer doctor --refresh-known-words` | Refresh the known-word cache from Anki |
|
|
||||||
| `subminer settings` | Open the settings window |
|
|
||||||
| `subminer youtube` / `yt` | Open the [YouTube browser](/youtube-integration#browse-youtube-in-subminer). Videos you pick play in mpv |
|
|
||||||
| `subminer generate-subs [video]` | Generate [Japanese subtitles](/subtitle-generation) with whisper.cpp |
|
|
||||||
| `subminer jellyfin` / `jf` | [Jellyfin](/jellyfin-integration) actions: `setup`, `login`, `logout`, `play`, `discovery` |
|
|
||||||
| `subminer dictionary <path>` / `dict` | Build a [character dictionary](/character-dictionary) for a file or directory |
|
|
||||||
| `subminer dictionary --candidates <path>` | List AniList matches for that target |
|
|
||||||
| `subminer dictionary --select <id> <path>` | Pin an AniList ID for that target |
|
|
||||||
| `subminer texthooker` | Run only the texthooker server. `-o` opens it in your browser |
|
|
||||||
| `subminer logs -e` | Export a sanitized log ZIP and print its path |
|
|
||||||
| `subminer config path` / `show` | Print the config file path or its contents |
|
|
||||||
| `subminer mpv status` | Exit 0 if the mpv socket is ready, 1 if not |
|
|
||||||
| `subminer mpv socket` | Print the mpv socket path |
|
|
||||||
| `subminer mpv idle` | Start an idle mpv in the background with SubMiner's options |
|
|
||||||
| `subminer app` / `bin` | Pass arguments to the SubMiner app, e.g. `subminer app --stop` |
|
|
||||||
|
|
||||||
`stats cleanup` runs one mode at a time. `--lookback-days` must be at least 1. Without it, cleanup scans all history.
|
|
||||||
|
|
||||||
`generate-subs` options: `--download-model`, `--model <name>`, `--model-path <file>`, `--output <file>`, and `--audio-stream <index>` (an ffprobe stream index). `--model-path` cannot be combined with `--model` or `--download-model`.
|
|
||||||
|
|
||||||
A texthooker is a web page that shows the current subtitle as plain text, so browser extensions and other tools can read along.
|
|
||||||
|
|
||||||
## Video picker
|
## Video picker
|
||||||
|
|
||||||
With no file argument, `subminer` opens a picker for the current directory, or for `-d <dir>`. Add `-r` to include subdirectories.
|
Run `subminer` with no file and it opens an interactive picker. That is **fzf** in the terminal by default, or **rofi** with `-R`.
|
||||||
|
|
||||||
- **fzf** (default) runs in the terminal. With `chafa` installed, it shows thumbnail previews.
|
### fzf (default)
|
||||||
- **rofi** (`-R`, Linux) opens a graphical menu with thumbnails.
|
|
||||||
|
|
||||||
Thumbnails come from your system thumbnail cache, or are generated with `ffmpegthumbnailer` or `ffmpeg`.
|
|
||||||
|
|
||||||
The launcher installs its rofi theme automatically. To use your own, set `SUBMINER_ROFI_THEME`:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
SUBMINER_ROFI_THEME=/path/to/theme.rasi subminer -R
|
subminer # pick from current directory
|
||||||
|
subminer -d ~/Videos # pick from a specific directory
|
||||||
|
subminer -r -d ~/Anime # recursive search
|
||||||
|
```
|
||||||
|
|
||||||
|
fzf shows video files in a fuzzy-searchable list. If `chafa` is installed, you get thumbnail previews in the right pane. Thumbnails are sourced from the freedesktop thumbnail cache first, then generated on the fly with `ffmpegthumbnailer` or `ffmpeg` as fallback.
|
||||||
|
|
||||||
|
| Optional tool | Purpose |
|
||||||
|
| ------------------- | --------------------------------- |
|
||||||
|
| `chafa` | Render thumbnails in the terminal |
|
||||||
|
| `ffmpegthumbnailer` | Generate thumbnails on the fly |
|
||||||
|
|
||||||
|
### rofi
|
||||||
|
|
||||||
|
```bash
|
||||||
|
subminer -R # rofi picker, current directory
|
||||||
|
subminer -R -d ~/Videos # rofi picker, specific directory
|
||||||
|
subminer -R -r -d ~/Anime # rofi picker, recursive
|
||||||
|
subminer -R /directory # rofi picker, directory shortcut
|
||||||
|
```
|
||||||
|
|
||||||
|
rofi shows a GUI menu with icon thumbnails when available. SubMiner ships the rofi theme, a scoped `ffmpegthumbnailer` MIME registration, and the Linux launcher-managed runtime plugin copy in the release assets tarball:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wget https://github.com/ksyasuda/SubMiner/releases/latest/download/subminer-assets.tar.gz -O /tmp/subminer-assets.tar.gz
|
||||||
|
tar -xzf /tmp/subminer-assets.tar.gz -C /tmp
|
||||||
|
mkdir -p ~/.local/share/SubMiner/themes
|
||||||
|
cp /tmp/assets/themes/subminer.rasi ~/.local/share/SubMiner/themes/subminer.rasi
|
||||||
|
mkdir -p ~/.local/share/SubMiner/thumbnailers
|
||||||
|
cp /tmp/assets/thumbnailers/subminer-ffmpegthumbnailer.thumbnailer ~/.local/share/SubMiner/thumbnailers/
|
||||||
|
mkdir -p ~/.local/share/SubMiner/plugin
|
||||||
|
cp -R /tmp/plugin/subminer ~/.local/share/SubMiner/plugin/subminer
|
||||||
|
```
|
||||||
|
|
||||||
|
Once the `SubMiner` data dir exists, `subminer -u` refreshes these assets automatically. Normal Linux launcher playback checks for all three assets and installs them from the bundled app when one is missing. For `subminer -R`, this repair runs before rofi opens.
|
||||||
|
|
||||||
|
When `ffmpegthumbnailer` is installed, SubMiner prepends its own data directory to `XDG_DATA_DIRS` for the rofi process only. This lets rofi recognize the canonical Matroska MIME types used by newer GLib versions without changing the desktop-wide MIME or thumbnailer configuration. An existing registration in your own `$XDG_DATA_HOME/thumbnailers` still takes priority.
|
||||||
|
|
||||||
|
The theme is auto-detected from these paths (first match wins):
|
||||||
|
|
||||||
|
- `$SUBMINER_ROFI_THEME` environment variable (absolute path)
|
||||||
|
- `$XDG_DATA_HOME/SubMiner/themes/subminer.rasi` (default: `~/.local/share/SubMiner/themes/subminer.rasi`)
|
||||||
|
- `/usr/local/share/SubMiner/themes/subminer.rasi`
|
||||||
|
- `/usr/share/SubMiner/themes/subminer.rasi`
|
||||||
|
- macOS: `~/Library/Application Support/SubMiner/themes/subminer.rasi`
|
||||||
|
- `assets/themes/subminer.rasi` next to the launcher script (final fallback)
|
||||||
|
|
||||||
|
Override with the `SUBMINER_ROFI_THEME` environment variable:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
SUBMINER_ROFI_THEME=/path/to/custom-theme.rasi subminer -R
|
||||||
```
|
```
|
||||||
|
|
||||||
## Watch history
|
## Watch history
|
||||||
|
|
||||||
`subminer -H` lists the shows you have watched, most recent first. Add `-R` to use rofi. Pick a show, then choose:
|
`subminer -H` (or `--history`) browses your local watch history, sourced from the immersion tracker database. It works with both pickers: fzf by default, rofi with `-R -H`.
|
||||||
|
|
||||||
- **Previous episode** or **Next episode**, moving into the neighboring season folder when needed
|
```bash
|
||||||
- **Replay last watched**
|
subminer -H # fzf history browser
|
||||||
- **Browse episodes**, with a season menu first if the show has several season folders
|
subminer -R -H # rofi history browser
|
||||||
- **Quit SubMiner**
|
|
||||||
|
|
||||||
When an episode ends, the menu comes back for the same show. Press `Escape` to leave.
|
|
||||||
|
|
||||||
History comes from the immersion stats database, which SubMiner fills during playback. Shows whose folders are not reachable, such as an unmounted network drive, are hidden.
|
|
||||||
|
|
||||||
## mpv options and profiles
|
|
||||||
|
|
||||||
The launcher starts mpv with these options:
|
|
||||||
|
|
||||||
```
|
|
||||||
--input-ipc-server=/tmp/subminer-socket
|
|
||||||
--alang=ja,jp,jpn,japanese,en,eng,english,enus,en-us
|
|
||||||
--slang=ja,jp,jpn,japanese,en,eng,english,enus,en-us
|
|
||||||
--sub-auto=fuzzy
|
|
||||||
--sub-file-paths=.;subs;subtitles
|
|
||||||
--sid=auto
|
|
||||||
--secondary-sid=auto
|
|
||||||
--sub-visibility=no
|
|
||||||
--secondary-sub-visibility=no
|
|
||||||
```
|
```
|
||||||
|
|
||||||
mpv's own subtitles are hidden because the overlay draws them. Add more options with `-a`, or load an mpv profile with `-p <name>` or `mpv.profile` in the config. No profile is loaded by default.
|
The first menu lists every locally watched series, most recently watched first, using the parsed media title (e.g. the anime title) when available and the directory name otherwise. Selecting a series opens an action menu:
|
||||||
|
|
||||||
To launch mpv yourself with the same setup, put the options in a profile in `~/.config/mpv/mpv.conf`:
|
- **Previous episode**: plays the episode before the last watched one and continues into the previous season directory when the season starts
|
||||||
|
- **Replay last watched**: replays the most recently watched episode
|
||||||
|
- **Next episode**: plays the episode after the last watched one and continues into the next season directory when the season ends
|
||||||
|
- **Browse episodes**: lists the video files in the series directory in episode order, using the same fzf/rofi episode picker as directory browsing; if the series has multiple season directories, a season menu appears first
|
||||||
|
- **Quit SubMiner**: closes the history session without starting an episode
|
||||||
|
|
||||||
```ini
|
After an episode ends or you close mpv, the launcher returns to an action menu for the same series. The menu lists Previous, Rewatch, Next, Select episode, and Quit SubMiner in that order, omitting Previous or Next when no episode exists in that direction. Choosing Previous or Next can move between season directories. After you play another episode, Previous, Rewatch, and Next use it instead of the older database entry. Pressing Escape closes the history session.
|
||||||
[subminer]
|
|
||||||
input-ipc-server=/tmp/subminer-socket
|
|
||||||
alang=ja,jp,jpn,japanese,en,eng,english,enus,en-us
|
|
||||||
slang=ja,jp,jpn,japanese,en,eng,english,enus,en-us
|
|
||||||
sub-auto=fuzzy
|
|
||||||
sub-file-paths=.;subs;subtitles
|
|
||||||
sid=auto
|
|
||||||
secondary-sid=auto
|
|
||||||
secondary-sub-visibility=no
|
|
||||||
```
|
|
||||||
|
|
||||||
Launches through `subminer` start the overlay automatically unless `mpv.autoStartSubMiner` is off. mpv started outside SubMiner does not start the overlay on its own.
|
Series whose directories are not currently accessible (e.g. an unmounted network share) are hidden from the list. Watch history requires the immersion tracker database (`immersionTracking.dbPath`, default `<config dir>/immersion.sqlite`), which SubMiner populates during playback.
|
||||||
|
|
||||||
## Sync between machines
|
## Sync between machines
|
||||||
|
|
||||||
`subminer sync <host>` merges immersion stats and watch history between two computers over SSH. Both end up with the combined sessions, totals, vocabulary, charts, and `-H` history. `<host>` is anything `ssh` accepts, such as `user@hostname` or an alias from your SSH config.
|
`subminer sync <host>` merges immersion stats and watch history between two machines over SSH, so both end up with the union of sessions, lifetime totals, vocabulary counts, daily/monthly charts, and `--history` entries. `<host>` is anything `ssh` accepts (`user@hostname` or an ssh config alias); SubMiner must be installed on both machines at the same version. The sync engine runs only inside the app (`SubMiner --sync-cli sync ...`): the sync window spawns it that way, `subminer sync` is a thin proxy that forwards to the installed app, and the remote side is found automatically whether it has the launcher or just the app. The command-line launcher is optional everywhere.
|
||||||
|
|
||||||
Both machines need the same SubMiner version. The remote only needs the app. The `subminer` command is optional there.
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
subminer sync macbook # two-way sync
|
subminer sync macbook # two-way sync with the host "macbook"
|
||||||
subminer sync macbook --push # send local data to macbook only
|
subminer sync macbook --push # merge local data into macbook only
|
||||||
subminer sync macbook --pull # bring macbook data here only
|
subminer sync macbook --pull # merge macbook data into local only
|
||||||
subminer sync macbook --check # test SSH and the remote install, change nothing
|
subminer sync user@192.168.1.20 # explicit user@host
|
||||||
subminer sync macbook --remote-cmd ~/Apps/SubMiner.AppImage # SubMiner in a custom place on the remote
|
subminer sync macbook --remote-cmd ~/bin/subminer # custom remote SubMiner/launcher path
|
||||||
subminer sync --ui # open the sync window
|
subminer sync macbook --check # test SSH + remote SubMiner without syncing
|
||||||
|
subminer sync --ui # open the sync window (also in the tray menu)
|
||||||
```
|
```
|
||||||
|
|
||||||
Syncing only adds data. It never overwrites or double-counts, so you can run it as often as you like. `--push` and `--pull` do not delete anything on the receiving side.
|
How it works: each side takes a consistent snapshot of its database (`VACUUM INTO`), the snapshots are exchanged over SSH, and each machine merges the other's snapshot into its own database. The merge is an insert-only union keyed on stable identifiers (session UUIDs, video keys, series title keys, word/kanji identity), so it is safe to re-run at any time. Syncing twice changes nothing, and nothing is ever overwritten or summed twice. Lifetime totals and rollup charts are updated incrementally, so history older than the session retention window is preserved on both sides.
|
||||||
|
|
||||||
Before a command-line sync, close SubMiner on both machines and stop the stats server with `subminer stats -s`, or pass `--force`. The sync window does not need this. It syncs while SubMiner and playback are running, and skips the session in progress until it finishes.
|
On macOS and Linux, sync automatically uses compressed `rsync` transfers when compatible `rsync` commands are available on both machines. The last successfully received snapshot supplies matching blocks for later transfers, so unchanged data can be reused without sending it again. Only unmatched data needs to cross the connection, with compression reducing it further. Without a cached snapshot, sync sends a full compressed snapshot. Windows endpoints and machines without compatible `rsync` use compressed `scp` automatically. No extra configuration is required, and both methods work across different networks, including Tailscale connections.
|
||||||
|
|
||||||
Transfers are compressed. When both machines have `rsync` (macOS and Linux), later syncs send only what changed. Windows machines use `scp`.
|
For a one-way transfer, `--push` snapshots the local database and merges it into the host without changing the local database. `--pull` snapshots the host and merges it into the local database without changing the host. These modes add missing data; they do not delete destination-only data or make the destination an exact mirror.
|
||||||
|
|
||||||
Known-word status from Anki does not sync. Each machine reads it from its own Anki collection.
|
Each rsync transfer explicitly uses SSH and has a 30-minute time limit. A timed-out transfer stops the sync before merging the incomplete snapshot.
|
||||||
|
|
||||||
<details>
|
Transfers write separate temporary files and verify the reconstructed content before merging. Cached comparison snapshots are preserved throughout the transfer. After a successful rsync sync, each receiver keeps one snapshot per peer/database identity in `sync-transfer-cache/` under its SubMiner config directory. This uses roughly one database-sized file per identity; deleting that cache is safe and only makes the next sync transfer more data. Missing or unwritable caches do not prevent syncing. Older peers without the cache helper still support compressed transfers, but cannot retain the upload comparison copy.
|
||||||
<summary><b>More sync options</b></summary>
|
|
||||||
|
|
||||||
| Option | Description |
|
Command-line sync defaults to a cold-start safety check: close SubMiner (and stop the background stats daemon with `subminer stats -s`) on both machines before running it, or pass `--force`. Syncs started from the Sync window use live mode automatically, including scheduled auto-syncs while SubMiner or playback is active. SQLite WAL provides a consistent snapshot, the transactional merge serializes with live writes, and each machine's unfinished session is excluded from the transfer; that session syncs normally after it finishes. The mpv safety check requires a live socket connection, so a stale socket file left after mpv exits does not block command-line sync. Both machines must be on the same SubMiner version; otherwise, the sync aborts on a stats schema mismatch.
|
||||||
| ------------------- | ----------------------------------------------------------- |
|
|
||||||
| `-f, --force` | Skip the check that SubMiner is closed |
|
|
||||||
| `--db <file>` | Use a different local stats database |
|
|
||||||
| `--json` | Print progress as NDJSON |
|
|
||||||
| `--snapshot <file>` | Write a snapshot of the local database, e.g. to copy by USB |
|
|
||||||
| `--merge <file>` | Merge a snapshot file into the local database |
|
|
||||||
|
|
||||||
A Windows remote needs the built-in **OpenSSH Server** enabled. SubMiner finds itself in the default install location there.
|
On the remote, sync looks for the `subminer` launcher first (PATH and `~/.local/bin`), then the app binary in `--sync-cli` mode (`SubMiner` on PATH, then the standard macOS `/Applications` and `~/Applications` installs), checking standard SubMiner and Bun locations (`~/.local/bin`, `~/.bun/bin`, Homebrew, `/usr/local/bin`, `/usr/bin`, and `/bin`) even when the non-interactive SSH shell omits them from `PATH`. An AppImage in a custom location can be addressed with `--remote-cmd /path/to/SubMiner.AppImage` (or symlink it as `SubMiner` somewhere on the remote PATH).
|
||||||
|
|
||||||
If the remote cannot find SubMiner, point `--remote-cmd` at the app or launcher, or link it as `SubMiner` somewhere on the remote `PATH`.
|
Windows remotes are supported: enable Windows' built-in **OpenSSH Server** and sync detects the remote shell (cmd or PowerShell) automatically, finding SubMiner in its default install location (`%LOCALAPPDATA%\Programs\SubMiner`), the launcher shim (`%LOCALAPPDATA%\SubMiner\bin`), or on PATH. Temp files on the remote are created and removed by SubMiner itself (`sync --make-temp` / `--remove-temp`), so no POSIX tools are required on the remote side.
|
||||||
|
|
||||||
Received snapshots are cached in `sync-transfer-cache/` in the config directory to speed up later syncs. Deleting it is safe.
|
Two lower-level modes are used internally over SSH and also work standalone for manual transfers (e.g. via a USB drive):
|
||||||
|
|
||||||
</details>
|
```bash
|
||||||
|
subminer sync --snapshot /tmp/stats.sqlite # write a consistent snapshot of the local database
|
||||||
|
subminer sync --merge /tmp/stats.sqlite # merge a snapshot file into the local database
|
||||||
|
```
|
||||||
|
|
||||||
|
Unfinished sessions (a crash mid-playback) are skipped until the app finalizes them; they sync on the next run. Word/kanji "known" state from Anki is not part of the database and does not sync. Each machine derives it from its own Anki collection.
|
||||||
|
|
||||||
|
`subminer sync <host> --check` verifies a host without touching any data: it probes the SSH connection, locates SubMiner on the remote (launcher or app binary), and reports its version. `--json` switches any sync mode to machine-readable NDJSON progress output (this is what the sync window consumes).
|
||||||
|
|
||||||
|
`sync --make-temp` creates a restricted temporary directory and prints its path; `sync --remove-temp <dir>` removes one created by that command. The internal `--transfer-cache <key>` option seeds the temporary directory from a previous received snapshot when creating it, or saves the received snapshot before removing it after a successful sync. Keys are 64-character lowercase hexadecimal identifiers. These are internal SSH transfer helpers, exposed for compatibility but normally invoked only by sync itself. `SubMiner --sync-cli sync ...` is the packaged app's headless compatibility entrypoint; use `SubMiner --sync-cli --help` for its sync-specific help. The `subminer sync` launcher command selects this entrypoint automatically and runs AppImages in Node-only mode, so remote sync does not require a graphical session.
|
||||||
|
|
||||||
### Sync window
|
### Sync window
|
||||||
|
|
||||||
`subminer sync --ui`, or **Sync Stats & History** in the tray, opens a window where you can:
|
`subminer sync --ui` opens a dedicated window for the same engine in a detached app process, returning the shell immediately. Closing that standalone-launched window exits its app instance. Opening **Sync Stats & History** from the tray keeps the resident app running when the window closes:
|
||||||
|
|
||||||
- Save devices, each with a direction (two-way, push, or pull), and run **Sync now** or **Test**.
|
- **Devices:** saved hosts with a per-host direction (two-way / push / pull), an auto-sync toggle, last-sync status, and one-click **Sync now** / **Test** / **Remove**. Hosts synced from the command line appear here automatically.
|
||||||
- Turn on **Auto-sync** for a device. It syncs in the background every 60 minutes by default, including during playback.
|
- **Add a device:** test SSH + remote SubMiner availability before saving, with a setup checklist for first-time SSH configuration.
|
||||||
- Watch progress and see what was merged on each machine.
|
- **Activity:** live stage-by-stage progress, remote output, and separate merge summaries (sessions, words, kanji, rollups) for each machine updated by the run. Runs can be cancelled and can proceed while the app, stats server, or playback is active.
|
||||||
- Create, merge, or delete database snapshots.
|
- **Snapshots:** create manual database snapshots (stored in `/tmp/subminer-db-snapshots/` by default), merge a snapshot file into the local database, or reveal/delete existing snapshots.
|
||||||
|
|
||||||
Saved devices live in `sync-hosts.json` in the config directory.
|
Hosts with **Auto-sync** enabled are synced in the background on a configurable interval (default every 60 minutes), including during active playback; results surface as overlay notifications. The unfinished playback session is skipped until a later sync sees it finalized. Host bookkeeping lives in `<config dir>/sync-hosts.json`.
|
||||||
|
|
||||||
## Environment variables
|
## Common commands
|
||||||
|
|
||||||
| Variable | Use |
|
```bash
|
||||||
| ------------------------ | --------------------------------------------------------------------- |
|
subminer video.mkv # play a specific file (managed launches auto-start the visible overlay by default)
|
||||||
| `SUBMINER_BINARY_PATH` | Path to the SubMiner app, if it is not in a standard install location |
|
subminer https://youtu.be/... # YouTube playback (requires yt-dlp)
|
||||||
| `SUBMINER_APPIMAGE_PATH` | Same, for an AppImage (Linux) |
|
subminer --backend x11 video.mkv # Force x11 backend for a specific file
|
||||||
| `SUBMINER_ROFI_THEME` | Path to a custom rofi theme |
|
subminer -u # check for SubMiner updates
|
||||||
|
subminer logs -e # export sanitized log ZIP
|
||||||
|
subminer stats # open immersion dashboard
|
||||||
|
subminer stats -b # start background stats daemon
|
||||||
|
```
|
||||||
|
|
||||||
|
## Subcommands
|
||||||
|
|
||||||
|
| Subcommand | Purpose |
|
||||||
|
| ------------------------------------------ | ------------------------------------------------------------------------------------------------- |
|
||||||
|
| `subminer jellyfin` / `jf` | Jellyfin workflows (`-d` discovery, `-p` play, `-l` login, `--logout`, `--setup`) |
|
||||||
|
| `subminer stats` | Start the stats server (opens the dashboard when `stats.autoOpenBrowser` is on) |
|
||||||
|
| `subminer stats -b` / `-s` | Start/reuse or stop the background stats daemon |
|
||||||
|
| `subminer stats cleanup` | Backfill vocabulary metadata and prune stale rows (`-v` vocab, `-l` lifetime summaries) |
|
||||||
|
| `subminer stats cleanup -d` | Collapse repeated lines from typeset subs (`--dry-run`, `--lookback-days <n>`) |
|
||||||
|
| `subminer stats rebuild` / `backfill` | Rebuild or backfill rollup data |
|
||||||
|
| `subminer doctor` | Dependency + config + socket diagnostics (`--refresh-known-words` refreshes the known-word cache) |
|
||||||
|
| `subminer settings` | Open the SubMiner settings window |
|
||||||
|
| `subminer generate-subs [video]` | Generate [Japanese subtitles](/usage#generate-japanese-subtitles-locally) locally |
|
||||||
|
| `subminer logs -e` | Export a sanitized local-date log ZIP and print its path |
|
||||||
|
| `subminer config path` | Print active config file path |
|
||||||
|
| `subminer config show` | Print active config contents |
|
||||||
|
| `subminer mpv status` | Check mpv socket readiness |
|
||||||
|
| `subminer mpv socket` | Print active socket path |
|
||||||
|
| `subminer mpv idle` | Launch detached idle mpv instance |
|
||||||
|
| `subminer sync <host>` | Two-way stats/history sync with another machine over SSH |
|
||||||
|
| `subminer sync <host> --push` | Merge local stats/history into another machine only |
|
||||||
|
| `subminer sync <host> --pull` | Merge another machine's stats/history into the local database only |
|
||||||
|
| `subminer sync <host> --check` | Test SSH connection and remote launcher availability |
|
||||||
|
| `subminer sync --ui` | Open the sync window (saved devices, auto-sync, snapshots) |
|
||||||
|
| `subminer dictionary <path>` / `dict` | Generate character dictionary ZIP from file/dir target |
|
||||||
|
| `subminer dictionary --candidates <path>` | List AniList candidate matches for character dictionary correction |
|
||||||
|
| `subminer dictionary --select <id> <path>` | Pin an AniList media ID for that target series |
|
||||||
|
| `subminer texthooker` | Launch texthooker-only mode |
|
||||||
|
| `subminer texthooker -o` | Launch texthooker and open it in the default browser |
|
||||||
|
| `subminer app` / `bin` | Pass arguments directly to SubMiner binary (e.g. `subminer app --setup`) |
|
||||||
|
|
||||||
|
Use `subminer <subcommand> -h` for command-specific help.
|
||||||
|
|
||||||
|
## Options
|
||||||
|
|
||||||
|
| Flag | Description |
|
||||||
|
| --------------------- | ---------------------------------------------------------------------------- |
|
||||||
|
| `-d, --directory` | Video search directory (default: cwd) |
|
||||||
|
| `-r, --recursive` | Search directories recursively |
|
||||||
|
| `-R, --rofi` | Use rofi instead of fzf |
|
||||||
|
| `-H, --history` | Browse local watch history (see [Watch History](#watch-history)) |
|
||||||
|
| `-v, --version` | Print the launcher's own version (can differ from the installed app binary) |
|
||||||
|
| `-u, --update` | Check for SubMiner updates and update the app/launcher when possible |
|
||||||
|
| `--start` | Explicitly start overlay after mpv launches |
|
||||||
|
| `-S, --start-overlay` | Force the visible overlay on start |
|
||||||
|
| `-T, --no-texthooker` | Disable texthooker server |
|
||||||
|
| `-p, --profile` | mpv profile name (no default; omitted unless set) |
|
||||||
|
| `-a, --args` | Pass additional mpv arguments as a quoted string |
|
||||||
|
| `-b, --backend` | Force window backend (`auto`, `hyprland`, `sway`, `x11`, `macos`, `windows`) |
|
||||||
|
| `--settings` | Open the SubMiner settings window |
|
||||||
|
| `--log-level` | Logger verbosity (`debug`, `info`, `warn`, `error`) |
|
||||||
|
|
||||||
|
App-binary flags such as `--setup`, `--dev`, and `--debug` are not launcher flags - pass them through with `subminer app`, for example `subminer app --setup`.
|
||||||
|
|
||||||
|
On Linux, `subminer -u` updates from the launcher process itself. It can check and replace the AppImage, launcher, runtime plugin copy, and rofi theme even when SubMiner is already running in the tray.
|
||||||
|
|
||||||
|
Managed launches inject `auto_start=yes`, `auto_start_visible_overlay=yes`, and `auto_start_pause_until_ready=yes` as plugin script-opts from SubMiner's config defaults (`mpv.autoStartSubMiner`, `auto_start_overlay`), so explicit start flags are usually unnecessary. The plugin's own built-in defaults are off - mpv launched outside SubMiner does not auto-start the overlay.
|
||||||
|
|
||||||
## Logging
|
## Logging
|
||||||
|
|
||||||
The default log level is `warn`. Change it for one run with `--log-level`, or permanently with `logging.level` in the config. The app's `--dev` and `--debug` flags turn on developer mode. They do not change the log level.
|
- Default log level is `warn` (launcher and app; configurable via `logging.level`)
|
||||||
|
- `--dev` / `--debug` are app-binary flags that control app dev-mode, not logging verbosity - use `--log-level` for that
|
||||||
+154
-51
@@ -1,87 +1,190 @@
|
|||||||
# Mining workflow
|
# Mining workflow
|
||||||
|
|
||||||
SubMiner turns lines from the video you are watching into Anki cards. You look up a word on the overlay, add it with Yomitan, and SubMiner fills in the sentence, an audio clip, and a screenshot. For Anki setup, field mapping, and media options, see [Anki integration](/anki-integration).
|
This guide walks the whole sentence mining loop, from starting a video to ending up with an Anki card that has audio, a screenshot, and the surrounding sentence.
|
||||||
|
|
||||||
## Look up a word
|
## Overview
|
||||||
|
|
||||||
1. Hover the subtitle line on the overlay. Each word is its own hover target.
|
_Sentence mining_ means turning sentences you hit while watching native video into Anki cards, so you learn a word in the context where you first met it. The idea is old. The tedious part is everything between spotting the word and having a finished card, and that is the part SubMiner does for you.
|
||||||
2. Press your Yomitan scan key or modifier (whatever your Yomitan profile uses, for example `Shift`).
|
|
||||||
3. The Yomitan popup opens for that word.
|
|
||||||
|
|
||||||
Playback pauses while you hover the subtitle and while the Yomitan popup is open. Turn this off with `subtitleStyle.autoPauseVideoOnHover` and `subtitleStyle.autoPauseVideoOnYomitanPopup`.
|
SubMiner draws a transparent overlay on top of mpv and renders each subtitle line as interactive text. Hover a word, trigger a Yomitan lookup with your configured key or modifier, then add the card. SubMiner attaches the sentence, an audio clip, and a screenshot on its own, so there is nothing to copy-paste or screenshot by hand.
|
||||||
|
|
||||||
## Add a word card
|
> **Yomitan** is the popup dictionary that shows definitions when you hover or scan a word. **AnkiConnect** is the add-on that lets SubMiner talk to Anki. Both are set up during installation - see [Anki Integration](/anki-integration) if you have not configured them yet.
|
||||||
|
|
||||||
Click the add button in the Yomitan popup. SubMiner sees the new note and fills it in:
|
## Creating Anki cards
|
||||||
|
|
||||||
| Field | Content |
|
There are four ways to create or enrich cards, depending on your workflow.
|
||||||
| -------- | ------------------------------------------------------ |
|
|
||||||
| Sentence | The current subtitle line, with the mined word in bold |
|
|
||||||
| Audio | A clip cut from the video using the subtitle's timing |
|
|
||||||
| Image | A screenshot, or an animated AVIF clip of the line |
|
|
||||||
| MiscInfo | Source file name and timestamp |
|
|
||||||
|
|
||||||
Which note fields receive each item is set in [`ankiConnect.fields`](/anki-integration#field-mapping). With the default proxy mode the card is filled as soon as Yomitan adds it. If you disable the proxy, SubMiner polls Anki and fills the card a few seconds later.
|
### 1. Auto-update from Yomitan
|
||||||
|
|
||||||
## Update the last card by hand
|
This is the most common flow. Yomitan creates a card in Anki, and SubMiner enriches it automatically.
|
||||||
|
|
||||||
Use this when auto-update is off, or when the line you want is not the one on screen.
|
1. Hover a word, then trigger Yomitan lookup → Yomitan popup appears.
|
||||||
|
2. Click the Anki icon in Yomitan to add the word.
|
||||||
|
3. SubMiner receives or detects the new card:
|
||||||
|
- **Proxy mode** (default, `ankiConnect.proxy.enabled: true`): immediate enrich after a successful `addNote` / `addNotes` is pushed through the local proxy.
|
||||||
|
- **Polling mode** (fallback, when the proxy is disabled): detects new cards via AnkiConnect polling (`ankiConnect.pollingRate`, default 3 seconds).
|
||||||
|
4. SubMiner updates the card with:
|
||||||
|
- **Sentence**: The current subtitle line.
|
||||||
|
- **Audio**: Extracted from the video using the subtitle's start/end timing (plus optional configured padding).
|
||||||
|
- **Image**: A screenshot or animated clip from the current playback position.
|
||||||
|
- **MiscInfo**: Metadata like filename and timestamp.
|
||||||
|
|
||||||
1. Add the word with Yomitan.
|
Configure which fields to fill in `ankiConnect.fields`. See [Anki Integration](/anki-integration) for details.
|
||||||
2. Press `Ctrl/Cmd+C` to copy the current line. To combine lines, press `Ctrl/Cmd+Shift+C`, then a digit `1` to `9` for how many recent lines to include.
|
|
||||||
3. Press `Ctrl/Cmd+V`. SubMiner writes the clipboard text into the last-added card's sentence field and adds fresh audio and an image.
|
|
||||||
|
|
||||||
A manual update always replaces the sentence audio, even when `ankiConnect.behavior.overwriteAudio` is `false`.
|
### 2. manual update from clipboard
|
||||||
|
|
||||||
## Mine a sentence card
|
If you prefer a hands-on approach (animecards-style), you can copy the current subtitle to the clipboard and then paste it onto the last-added Anki card:
|
||||||
|
|
||||||
Press `Ctrl/Cmd+S` to create a sentence card from the current line without a Yomitan lookup. Press `Ctrl/Cmd+Shift+S`, then a digit `1` to `9`, to combine several recent lines into one card. The digit prompt closes after `shortcuts.multiCopyTimeoutMs`.
|
1. Add a word via Yomitan as usual.
|
||||||
|
2. Press `Ctrl/Cmd+C` to copy the current subtitle line to the clipboard.
|
||||||
|
- For multiple lines: press `Ctrl/Cmd+Shift+C`, then a digit `1`–`9` to select how many recent subtitle lines to combine. The combined text is copied to the clipboard.
|
||||||
|
3. Press `Ctrl/Cmd+V` to update the last-added card with the clipboard contents plus audio and image, the same fields auto-update would fill.
|
||||||
|
|
||||||
Sentence cards use the note type named in `ankiConnect.isLapis.sentenceCardModel` and write to its `Sentence` and `SentenceAudio` fields. That note type must exist in Anki. See [sentence cards](/anki-integration#sentence-cards-lapis).
|
Manual clipboard updates always replace generated sentence audio in `ankiConnect.fields.audio`, even when `ankiConnect.behavior.overwriteAudio` is disabled. Normal word-card updates use the configured sentence and audio fields even when Lapis or Kiku support is enabled.
|
||||||
|
|
||||||
## Mark an audio card
|
Use this when auto-update is off, or when the line you want on the card is not the line currently on screen.
|
||||||
|
|
||||||
After adding a word, press `Ctrl/Cmd+Shift+A`. SubMiner sets the Lapis/Kiku `IsAudioCard` flag on the last-added card and fills `Sentence`, `SentenceAudio`, the image, and MiscInfo.
|
| Shortcut | Action | Config key |
|
||||||
|
| -------------------------- | ------------------------------- | --------------------------------------- |
|
||||||
|
| `Ctrl/Cmd+C` | Copy current subtitle | `shortcuts.copySubtitle` |
|
||||||
|
| `Ctrl/Cmd+Shift+C` + digit | Copy multiple recent lines | `shortcuts.copySubtitleMultiple` |
|
||||||
|
| `Ctrl/Cmd+V` | Update last card from clipboard | `shortcuts.updateLastCardFromClipboard` |
|
||||||
|
|
||||||
## Merge repeated words
|
### 3. mine Sentence (hotkey)
|
||||||
|
|
||||||
If you mine a word you already have a card for, SubMiner can merge the new sentence, audio, and image into the existing card instead of keeping a duplicate. This needs the Kiku or Senren note type with field grouping turned on. In manual mode a dialog shows both cards and lets you pick which one to keep. See [field grouping](/anki-integration#field-grouping-kiku-senren).
|
Create a standalone sentence card without going through Yomitan:
|
||||||
|
|
||||||
## Subtitle display
|
- **Mine current sentence**: `Ctrl/Cmd+S` (configurable via `shortcuts.mineSentence`)
|
||||||
|
- **Mine multiple lines**: `Ctrl/Cmd+Shift+S` followed by a digit 1–9 to select how many recent subtitle lines to combine (the digit selector times out after 3 seconds, configurable via `shortcuts.multiCopyTimeoutMs`).
|
||||||
|
|
||||||
The overlay has a primary subtitle bar (the Japanese line you mine from) and a secondary bar for a translation track. Each bar is hidden, visible, or shown only on hover.
|
The sentence card uses the note type configured in `isLapis.sentenceCardModel` and always maps sentence/audio to `Sentence` and `SentenceAudio`.
|
||||||
|
|
||||||
| Shortcut | Action |
|
::: warning Requires Lapis/Kiku note type
|
||||||
| ------------------ | ---------------------------------- |
|
Sentence card creation requires `ankiConnect.isLapis.sentenceCardModel` to name a [Lapis](https://github.com/donkuri/lapis) or [Kiku](https://github.com/youyoumu/kiku) compatible note type that exists in Anki (default: `"Lapis"`). See [Anki Integration - Sentence Cards](/anki-integration#sentence-cards-lapis) for setup.
|
||||||
| `V` | Cycle primary bar mode |
|
:::
|
||||||
| `Ctrl/Cmd+Shift+V` | Cycle secondary bar mode |
|
|
||||||
| `Shift+J` | Cycle the secondary subtitle track |
|
|
||||||
| Right-click | Pause or resume |
|
|
||||||
| Right-click + drag | Move the subtitles |
|
|
||||||
|
|
||||||
Set the starting modes with `subtitleStyle.primaryDefaultMode` and `secondarySub.defaultMode`. The full list of keys is on [Keyboard shortcuts](/shortcuts).
|
### 4. mark as audio card
|
||||||
|
|
||||||
## Controller
|
After adding a word via Yomitan, press the audio card shortcut (`Ctrl/Cmd+Shift+A` by default, `shortcuts.markAudioCard`) to mark the card as an audio card. This sets the audio-card flag and fills sentence, image, and metadata fields alongside the full-subtitle audio clip.
|
||||||
|
|
||||||
With a gamepad and keyboard-only mode on, you can mine without a mouse: move across words with the left stick, look up with `A`, mine with `X`, and close the popup with `B`. The keyboard keeps working alongside it. See [controller support](/usage#controller-support).
|
::: warning Requires Lapis/Kiku note type
|
||||||
|
Audio card marking uses the same `ankiConnect.isLapis.sentenceCardModel` note type as sentence cards. See [Anki Integration - Sentence Cards](/anki-integration#sentence-cards-lapis) for setup.
|
||||||
|
:::
|
||||||
|
|
||||||
## Fix subtitle timing (subsync)
|
### Field grouping (Kiku/Senren)
|
||||||
|
|
||||||
If the subtitles are out of sync, press `Ctrl+Alt+S` to open the subsync dialog. It uses [alass](https://github.com/kaegi/alass) or [ffsubsync](https://github.com/smacke/ffsubsync), which you install separately.
|
If you mine the same word from different sentences, SubMiner can merge the cards instead of creating duplicates. This is built for [Kiku](https://github.com/youyoumu/kiku) and [Senren](https://github.com/BrenoAqua/Senren) note types that support grouped fields (Senren calls it scene switching).
|
||||||
|
|
||||||
1. Pick the engine.
|
1. You add a word via Yomitan.
|
||||||
2. For alass, pick a reference: a subtitle track with correct timing (the secondary track by default) or the video file.
|
2. SubMiner detects the new card and checks if a card with the same expression already exists.
|
||||||
3. Pick the track to retime (the active primary track by default).
|
3. If a duplicate is found (this requires Kiku or Senren to be enabled with a field grouping mode of `"auto"` or `"manual"`):
|
||||||
4. Run it. SubMiner loads the retimed subtitle back into the same slot.
|
- **Auto mode**: Merges automatically. Both sentences, audio clips, images, and source info are combined into the existing card. The duplicate is optionally deleted.
|
||||||
|
- **Manual mode**: A modal appears showing both cards side by side. You choose which card to keep and preview the merged result before confirming.
|
||||||
|
|
||||||
For remote streams such as Jellyfin, only alass with a subtitle reference is available, because ffsubsync and the video reference need the local file. If the tools are not found, see [Troubleshooting](/troubleshooting#subtitle-sync-subsync).
|
See [Anki Integration - Field Grouping](/anki-integration#field-grouping-kiku-senren) for configuration options, merge behavior, and modal keyboard shortcuts.
|
||||||
|
|
||||||
|
## Overlay model
|
||||||
|
|
||||||
|
SubMiner uses one overlay window with modal surfaces. It carries two subtitle bars - a primary reading bar and a secondary translation/context bar - plus modal dialogs that open on top.
|
||||||
|
|
||||||
|
Toggle the entire overlay window with `Alt+Shift+O` (global) or `y-t` (mpv plugin).
|
||||||
|
|
||||||
|
### Primary subtitle layer
|
||||||
|
|
||||||
|
The primary bar renders each subtitle as separate hoverable word spans, each carrying its reading and headword. Its styling is independent of mpv's own subtitle rendering. It supports:
|
||||||
|
|
||||||
|
- Word-level hover targets for Yomitan lookup
|
||||||
|
- Auto pause/resume on subtitle hover (enabled by default via `subtitleStyle.autoPauseVideoOnHover`)
|
||||||
|
- Auto pause/resume while the Yomitan popup is open (enabled by default via `subtitleStyle.autoPauseVideoOnYomitanPopup`)
|
||||||
|
- Right-click to pause/resume
|
||||||
|
- Right-click + drag to reposition subtitles
|
||||||
|
- **Reading annotations** - known words, N+1 targets, character-name matches, JLPT levels, and frequency hits can all be visually highlighted
|
||||||
|
|
||||||
|
### Secondary subtitle bar
|
||||||
|
|
||||||
|
The secondary bar is a compact top-strip region in the same overlay window. It shows a secondary subtitle track, usually English, above the primary reading line. Use it to sanity-check your comprehension without breaking out of the mining flow.
|
||||||
|
|
||||||
|
For local media, SubMiner can parse supported embedded secondary tracks into timed cues. For remote URLs and files on network mounts, it uses mpv's live secondary subtitle text instead of scanning the media with ffmpeg.
|
||||||
|
|
||||||
|
The `secondarySub` config controls it, and it opens and closes with the main overlay window. Cycle which track feeds it with `Shift+J`.
|
||||||
|
|
||||||
|
SubMiner collapses duplicate ASS layers in parsed secondary tracks. Exact repeated lines collapse at any length, while distinct simultaneous short lines remain separate. Long dialogue and positioned-sign copies also collapse when they differ only in whitespace or terminal punctuation. Dense multi-row sign layouts, such as translated timetables, are excluded instead of being concatenated into the secondary bar.
|
||||||
|
|
||||||
|
### Display modes
|
||||||
|
|
||||||
|
Both the primary and secondary subtitle bars share the same three visibility modes, and each can be changed independently at runtime:
|
||||||
|
|
||||||
|
- **Hidden** - the bar is not shown.
|
||||||
|
- **Visible** - the bar is always shown.
|
||||||
|
- **Hover** - the bar is revealed only while you hover over the overlay.
|
||||||
|
|
||||||
|
By default the **primary** bar is `visible` (`subtitleStyle.primaryDefaultMode`) and the **secondary** bar is `hover` (`secondarySub.defaultMode`).
|
||||||
|
|
||||||
|
Cycle each bar's mode at runtime with its own shortcut:
|
||||||
|
|
||||||
|
| Shortcut | Action | Config key |
|
||||||
|
| ------------------ | -------------------------------------------------------- | ------------------------------ |
|
||||||
|
| `V` | Cycle primary subtitle mode (hidden → visible → hover) | overlay-local |
|
||||||
|
| `Ctrl/Cmd+Shift+V` | Cycle secondary subtitle mode (hidden → visible → hover) | `shortcuts.toggleSecondarySub` |
|
||||||
|
|
||||||
|
### Modal surfaces
|
||||||
|
|
||||||
|
Jimaku search, field-grouping, runtime options, and manual subsync open as modal surfaces on top of the same overlay window.
|
||||||
|
|
||||||
|
## Looking up words
|
||||||
|
|
||||||
|
1. Hover over the subtitle area - the overlay activates pointer events.
|
||||||
|
2. Hover the word you want. SubMiner keeps per-token boundaries so Yomitan can target that token cleanly.
|
||||||
|
3. Trigger Yomitan lookup with your configured lookup key/modifier (for example `Shift` if that is how your Yomitan profile is set up).
|
||||||
|
4. Yomitan opens its lookup popup for the hovered token.
|
||||||
|
5. From the popup, add the word to Anki.
|
||||||
|
|
||||||
|
### Controller workflow
|
||||||
|
|
||||||
|
With a gamepad connected and keyboard-only mode enabled, the full mining loop works without a mouse or keyboard:
|
||||||
|
|
||||||
|
1. **Navigate** - push the left stick left/right to move the token highlight across subtitle words.
|
||||||
|
2. **Look up** - press `A` to trigger Yomitan lookup on the highlighted word.
|
||||||
|
3. **Browse the popup** - push the left stick up/down to smooth-scroll through the Yomitan popup, or use the right stick for larger jumps.
|
||||||
|
4. **Cycle audio** - press `R1` to move to the next dictionary audio entry, `L1` to play the current one.
|
||||||
|
5. **Mine** - press `X` to create an Anki card for the current sentence (same as `Ctrl+S`).
|
||||||
|
6. **Close** - press `B` to dismiss the Yomitan popup and return to subtitle navigation.
|
||||||
|
7. **Pause/resume** - press `L3` (left stick click) to toggle mpv pause at any time.
|
||||||
|
|
||||||
|
Once controller support is on, the controller and keyboard both stay live. You can drop the controller mid-episode and keep going with the keyboard. Toggle keyboard-only mode with `Y` on the controller.
|
||||||
|
|
||||||
|
See [Usage - Controller Support](/usage#controller-support) for setup details and [Configuration - Controller Support](/configuration#controller-support) for the full mapping and tuning options.
|
||||||
|
|
||||||
|
## Subtitle sync (subsync)
|
||||||
|
|
||||||
|
If your subtitle file is out of sync with the audio, SubMiner can resynchronize it using [alass](https://github.com/kaegi/alass) or [ffsubsync](https://github.com/smacke/ffsubsync).
|
||||||
|
|
||||||
|
1. Open the subsync modal from the overlay.
|
||||||
|
2. Select the sync engine (alass or ffsubsync).
|
||||||
|
3. For alass, pick the **reference** - the subtitle with correct timing. This defaults to the secondary subtitle track. The loaded video file can also be used as the reference (alass extracts the audio itself), but it is never the default.
|
||||||
|
4. Pick the **out-of-sync subtitle** - the track that gets retimed. This defaults to the active primary subtitle track and applies to both engines.
|
||||||
|
5. SubMiner runs the sync and reloads the corrected subtitle into the slot the out-of-sync track came from: retiming the secondary track keeps it secondary and leaves the primary track selected.
|
||||||
|
|
||||||
|
The reference and the out-of-sync subtitle must be different tracks; the reference list hides whichever track is selected as the target.
|
||||||
|
|
||||||
|
For remote streams, including Jellyfin playback, the modal only offers alass with a subtitle reference. Jellyfin subtitle URLs are cached as temporary subtitle files so alass can read them, but the video stream is not downloaded. ffsubsync and the video-file reference need direct access to the local media file and are unavailable for stream URLs.
|
||||||
|
|
||||||
|
Install the sync tools separately - see [Troubleshooting](/troubleshooting#subtitle-sync-subsync) if the tools are not found.
|
||||||
|
|
||||||
## Texthooker
|
## Texthooker
|
||||||
|
|
||||||
SubMiner can serve a texthooker page at `http://127.0.0.1:5174` that shows each subtitle line as it arrives, so you can do lookups in a browser instead of on the overlay. Start it with `texthooker.launchAtStartup`, the `--texthooker` flag, or the mpv plugin's `texthooker_enabled` option. Change the port with the plugin's `texthooker_port` option. To build your own client, see the [WebSocket / texthooker API](/websocket-texthooker-api).
|
SubMiner serves a texthooker UI from a local HTTP server at `http://127.0.0.1:5174`. The port is fixed unless you override it with the mpv plugin's `texthooker_port` script-opt. External tools read subtitle text from it as lines arrive, which is how you would feed a browser-based Yomitan instance.
|
||||||
|
|
||||||
|
The texthooker page displays the current subtitle and updates as new lines arrive. This is useful if you prefer to do lookups in a browser rather than through the overlay's built-in Yomitan.
|
||||||
|
|
||||||
|
If you want to build your own browser client, websocket consumer, or automation relay, see [WebSocket / Texthooker API & Integration](/websocket-texthooker-api).
|
||||||
|
|
||||||
## Related features
|
## Related features
|
||||||
|
|
||||||
- [Jimaku](/jimaku-integration): search and download subtitle files from the overlay (`Ctrl+Shift+J`).
|
These feed into the mining loop but each has its own page:
|
||||||
- [Subtitle annotations](/subtitle-annotations): highlight known words, N+1 targets, JLPT levels, and frequency.
|
|
||||||
- [Immersion tracking](/immersion-tracking): log watch time and cards mined, and view them in the stats dashboard.
|
- **[Jimaku subtitle search](/jimaku-integration)** - search and download anime subtitle files directly from the overlay (`Ctrl+Shift+J` by default), then load them into mpv.
|
||||||
|
- **[N+1 word highlighting](/subtitle-annotations#n-1-word-highlighting)** - reads your Anki decks and highlights words you already know, so a line with exactly one unknown word stands out while you watch.
|
||||||
|
- **[Immersion tracking](/immersion-tracking)** - log watching and mining activity to a local database and view session times, words seen, and cards mined in the built-in stats dashboard.
|
||||||
|
|
||||||
|
Next: [Anki Integration](/anki-integration) - field mapping, media generation, and card enrichment configuration.
|
||||||
Loaded 100 of 919 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user