Files
SubMiner/backlog/tasks/task-80 - Jimaku-download-rename-subtitle-to-match-current-video.md

1.6 KiB

id, title, status, assignee, created_date, updated_date, labels, dependencies, priority, ordinal
id title status assignee created_date updated_date labels dependencies priority ordinal
TASK-80 Jimaku download: rename subtitle to current video basename Done
2026-03-01 14:17 2026-03-01 14:19
medium 11000

Description

When user selects a Jimaku subtitle, save subtitle with filename derived from currently playing media filename instead of Jimaku release filename.

Example:

  • Current media: anime.mkv
  • Downloaded subtitle extension: .srt
  • Saved subtitle path: anime.ja.srt

Scope:

  • Apply in Jimaku download IPC path before writing file.
  • Preserve collision-avoidance behavior (suffix with jimaku entry id/counter when target exists).
  • Keep mpv load flow unchanged except using renamed path.

Acceptance Criteria

  • #1 Jimaku subtitle destination name uses current media basename plus .ja and subtitle extension.
  • #2 Existing duplicate filename conflict handling still works.
  • #3 Regression tests cover renamed destination path behavior.

Final Summary

Jimaku download path generation now derives subtitle filename from currently playing media basename and keeps subtitle extension from Jimaku file (anime.mkv + .srt => anime.ja.srt). Added pure helper buildJimakuSubtitleFilenameFromMediaPath and routed IPC download flow through it before existing duplicate-path conflict handling. Added regression tests for local path, missing extension fallback, and remote URL media paths.