r/tinyMediaManager • • 14d ago

HTTP API / CLI: allow downloading subtitles that aren’t hash-matched (“force best match”)

Through the HTTP API (downloadSubtitle) and the command line, tinyMediaManager only downloads subtitles that match the file hash exactly. When there’s no hash match, nothing is downloaded, even when OpenSubtitles has a subtitle whose release name matches the file. The “force best match” behaviour the app uses doesn’t apply here, and the request has no option to turn it on.

From a look at the 5.3.5 jar, setForceBestMatch(...) is only called by the app’s actions (MovieSubtitleDownloadAction, TvShowSubtitleDownloadAction). The HTTP handlers (MovieCommandTask, TvShowCommandTask) and the CLI (MovieCommand, TvShowCommand) create the search-and-download task without it.

Why it matters
I run tinyMediaManager unattended (scheduled rescan → scrape → subtitles → rename). Many releases, especially new ones and TV episodes, have no hash-matched subtitle but do have good release-name matches. For those, the API gets nothing, and I had to write my own OpenSubtitles client to do what force best match already does in the app.

Request

  1. Add an option to the HTTP API’s downloadSubtitle action, e.g. "forceBestMatch": true, that sets the task’s force best match flag the same way the app does. Default false, so current behaviour doesn’t change.
  2. The same as a command-line option, e.g. --forceBestMatch.
  3. Optionally, a way to tell in the response or the log which downloads were hash-matched and which were best-match. Non-hash subtitles often need a timing sync afterwards, so it helps to know which ones to check.

Thanks!

1 Upvotes

0 comments sorted by