Skip to content

v0.3.3

Pre-release
Pre-release

Choose a tag to compare

@NandySun NandySun released this 30 Jun 01:42

v0.3.3 — Series-level font auto-loading

New

  • Auto-load subtitle fonts from the series-level fonts/ directory. ASS subtitles referencing {\fnFontName} tags now render with the correct bundled fonts instead of falling back to the system default.
    • Scanner detects the fonts/ subdirectory (case-insensitive: fonts/Fonts/FONTS) at scan and rescan time, storing the absolute path in series.fonts_dir.
    • On each loadfile call, the player injects sub-fonts-dir=<path> via the loadfile command's options argument — bypassing the libmpv-wrapper v0.1.1 bug where setProperty with a string value silently corrupts the mpv handle.
    • Path-escape utility (escapeMpvOptionValue) wraps paths containing [\s,"=] in double quotes, so Chinese folder names and Windows paths with spaces work correctly.
    • No-op when the series has no fonts/ directory — preserves existing behavior.

Known limitations

  • Does not auto-extract .rar/.zip archives. If a release group ships fonts as Fonts.rar, unpack it to fonts/ first.
  • Only matches fonts/ (case-insensitive) at the series-folder level — does not scan nested directories.
  • Depends on mpv's sub-fonts-dir behavior. Verified working with libmpv v0.41.0 (mpv 0.39+); unrelated to mpv issue #15461 which affects global command-line --sub-fonts-dir.

Implementation notes

  • DB: series table gains fonts_dir TEXT column. Migration is backward-compatible.
  • get_episode_path now returns { file_path, fonts_dir } so the frontend has both pieces at hand.
  • useMpv.loadFile(filePath, options?) accepts a per-file options array. When options is provided, the internal wrapper automatically fills the index placeholder (-1) required by mpv 0.38+'s positional loadfile argument parser.

Installers

  • Installer (NSIS): Mochi_0.3.3_x64-setup.exe — full install, data in %APPDATA%\mochi
  • Portable: mochi-v0.3.3-portable.zip — extract anywhere, data alongside exe (.portable marker included)