Stop offering a forced subtitle grab #233

Closed
opened 2026-08-25 08:36:54 +01:00 by naps62-yolo · 1 comment
Owner

POST /api/media-files/{id}/subtitles/grab still accepts forced: true and
writes the result to <video>.<lang>.srt — the same name a plain subtitle
uses. The flag, and the test
a_forced_grab_is_recorded_without_satisfying_the_language, predate the §15
amendment in ab001b5.

§15 now says a forced track never satisfies a want, gets no sidecar name of its
own, and that a language holds exactly one sidecar. So a forced manual grab
today either consumes the single slot that language has — leaving no room for
the real subtitle it was never meant to replace — or is refused by #222's new
invariant. Neither is a coherent thing to offer in an API.

Decide and make it one thing:

  • Remove the flag. Simplest, and matches §15: arr never goes looking for a
    forced track, and a manual grab of one has nowhere to put it. Ranking already
    rejects forced candidates, so the manual panel shows them in the rejected
    bucket with the rule that killed them — which is the honest answer.
  • Or give forced subtitles a real home, which means reopening the naming
    question §15 just closed. Not recommended; the operator settled it.

Whichever way, drop or rewrite the stale test, and make the manual panel agree
so a candidate the UI offers is one the API accepts.

Found while implementing #222.

Depends on: #203, #222

`POST /api/media-files/{id}/subtitles/grab` still accepts `forced: true` and writes the result to `<video>.<lang>.srt` — the same name a plain subtitle uses. The flag, and the test `a_forced_grab_is_recorded_without_satisfying_the_language`, predate the §15 amendment in ab001b5. §15 now says a forced track never satisfies a want, gets no sidecar name of its own, and that a language holds exactly one sidecar. So a forced manual grab today either consumes the single slot that language has — leaving no room for the real subtitle it was never meant to replace — or is refused by #222's new invariant. Neither is a coherent thing to offer in an API. Decide and make it one thing: - **Remove the flag.** Simplest, and matches §15: arr never goes looking for a forced track, and a manual grab of one has nowhere to put it. Ranking already rejects forced candidates, so the manual panel shows them in the rejected bucket with the rule that killed them — which is the honest answer. - **Or** give forced subtitles a real home, which means reopening the naming question §15 just closed. Not recommended; the operator settled it. Whichever way, drop or rewrite the stale test, and make the manual panel agree so a candidate the UI offers is one the API accepts. Found while implementing #222. Depends on: #203, #222
naps62-yolo added this to the Subtitles milestone 2026-08-25 08:36:54 +01:00
naps62-yolo added the area/apidifficulty/easytype/bugphase/9-subtitles labels 2026-08-25 08:36:54 +01:00
Author
Owner

Removed the forced flag from POST /api/media-files/{id}/subtitles/grab — the "Remove the flag" option from the issue. SubtitleGrabInput no longer has a forced field; the grab handler always writes a plain/SDH sidecar and always marks the language satisfied (the forced exception in finish is gone, since a forced candidate can never reach a grab any more). The manual panel already only renders a "grab" button on the eligible bucket, and ranking already rejects every forced candidate into the rejected bucket, so the frontend needed only the corresponding field dropped from the request body it sends — no UI logic change. Replaced the stale a_forced_grab_is_recorded_without_satisfying_the_language test with one asserting the grab body carries no forced key and the resulting subtitle is never forced.

Branch: subtitles/233-no-forced-grab.

just ci passed: 720/720 tests, clippy clean, check-tokens clean.

Findings

None outside this issue's scope.

Removed the `forced` flag from `POST /api/media-files/{id}/subtitles/grab` — the "Remove the flag" option from the issue. `SubtitleGrabInput` no longer has a `forced` field; the grab handler always writes a plain/SDH sidecar and always marks the language satisfied (the forced exception in `finish` is gone, since a forced candidate can never reach a grab any more). The manual panel already only renders a "grab" button on the eligible bucket, and ranking already rejects every forced candidate into the rejected bucket, so the frontend needed only the corresponding field dropped from the request body it sends — no UI logic change. Replaced the stale `a_forced_grab_is_recorded_without_satisfying_the_language` test with one asserting the grab body carries no `forced` key and the resulting subtitle is never forced. Branch: `subtitles/233-no-forced-grab`. `just ci` passed: 720/720 tests, clippy clean, `check-tokens` clean. ## Findings None outside this issue's scope.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yolo/arr#233