Subtitle custom format support #8249

Open
opened 2026-02-20 00:01:58 -05:00 by deekerman · 7 comments
Owner

Originally created by @Maxmystere on GitHub (Jan 28, 2024).

Is there an existing issue for this?

  • I have searched the existing open and closed issues

I would like to be able to do the same as the current LanguageSpecification but for subtitles

Describe the solution you'd like

Adding a new CustomFormatSpecificationBase that would read the input.Movie.MovieFile.MediaInfo.Subtitles

Describe alternatives you've considered

Using the Release Title condition but it isn't really practical

Anything else?

.

Originally created by @Maxmystere on GitHub (Jan 28, 2024). ### Is there an existing issue for this? - [X] I have searched the existing open and closed issues ### Is your feature request related to a problem? Please describe I would like to be able to do the same as the current LanguageSpecification but for subtitles ### Describe the solution you'd like Adding a new `CustomFormatSpecificationBase` that would read the `input.Movie.MovieFile.MediaInfo.Subtitles` ### Describe alternatives you've considered Using the Release Title condition but it isn't really practical ### Anything else? .
Author
Owner

@Maxmystere commented on GitHub (Jan 28, 2024):

A practical usage would be to ensure the file has the subtitles embedded (for example mkv file)

@Maxmystere commented on GitHub (Jan 28, 2024): A practical usage would be to ensure the file has the subtitles embedded (for example mkv file)
Author
Owner

@Qstick commented on GitHub (Feb 4, 2024):

The problem is, we won't know what it is 50% of the time prior to downloading. So upgrades will never get grabbed reliably.

@Qstick commented on GitHub (Feb 4, 2024): The problem is, we won't know what it is 50% of the time prior to downloading. So upgrades will never get grabbed reliably.
Author
Owner

@Maxmystere commented on GitHub (Feb 4, 2024):

From what I saw this is what the Language Custom Format already does no ?

@Maxmystere commented on GitHub (Feb 4, 2024): From what I saw this is what the Language Custom Format already does no ?
Author
Owner

@Qstick commented on GitHub (Feb 4, 2024):

Language is in the release title much more often than subtitle language is

@Qstick commented on GitHub (Feb 4, 2024): Language is in the release title much more often than subtitle language is
Author
Owner

@Maxmystere commented on GitHub (Feb 4, 2024):

Don't hesitate to tell me if I'm wrong with anything I say about the code
After checking a bit more the LanguageSpecification class github.com/Radarr/Radarr@4a9c0b2240/src/NzbDrone.Core/CustomFormats/Specifications/LanguageSpecification.cs (L23)
It's detecting the language before downloading then also after with the resulting downloaded file
Before:
github.com/Radarr/Radarr@4a9c0b2240/src/NzbDrone.Core/CustomFormats/CustomFormatCalculationService.cs (L44)

After:
github.com/Radarr/Radarr@4a9c0b2240/src/NzbDrone.Core/CustomFormats/CustomFormatCalculationService.cs (L207)

So if I understood well the issue with my proposal is that there is no "before" checkup ?

My goal was to improve the already existing basic subtitle detection possible with trash-guide and make it possible to invalidate a downloaded files to try to find a better match if no subtitles were found

@Maxmystere commented on GitHub (Feb 4, 2024): Don't hesitate to tell me if I'm wrong with anything I say about the code After checking a bit more the LanguageSpecification class https://github.com/Radarr/Radarr/blob/4a9c0b2240ebe53f759db4409c39dfa59efbaf70/src/NzbDrone.Core/CustomFormats/Specifications/LanguageSpecification.cs#L23 It's detecting the language before downloading then also after with the resulting downloaded file Before: https://github.com/Radarr/Radarr/blob/4a9c0b2240ebe53f759db4409c39dfa59efbaf70/src/NzbDrone.Core/CustomFormats/CustomFormatCalculationService.cs#L44 After: https://github.com/Radarr/Radarr/blob/4a9c0b2240ebe53f759db4409c39dfa59efbaf70/src/NzbDrone.Core/CustomFormats/CustomFormatCalculationService.cs#L207 So if I understood well the issue with my proposal is that there is no "before" checkup ? My goal was to improve the already existing basic subtitle detection possible with [trash-guide](https://trash-guides.info/Radarr/Radarr-collection-of-custom-formats/#vostfr) and make it possible to invalidate a downloaded files to try to find a better match if no subtitles were found
Author
Owner

@Qstick commented on GitHub (Feb 4, 2024):

Correct, very rarely do we know the subtitle language BEFORE download. This results in an issue that the file on disk will always be scored higher than any release on the indexer (simply due to us not knowing the sub languages). It's hard to implement a custom format specification on a property where the BEFORE and AFTER are not each reliable.

@Qstick commented on GitHub (Feb 4, 2024): Correct, very rarely do we know the subtitle language BEFORE download. This results in an issue that the file on disk will always be scored higher than any release on the indexer (simply due to us not knowing the sub languages). It's hard to implement a custom format specification on a property where the BEFORE and AFTER are not each reliable.
Author
Owner

@Maxmystere commented on GitHub (Feb 4, 2024):

My idea for using this Custom format was to give a negative score if no good subtitles were found
For example it would give a score of 0 before downloading then after downloading would either give a +1 or -1 to the resulting file
Is this a relevant use case for the Custom Formats ?

@Maxmystere commented on GitHub (Feb 4, 2024): My idea for using this Custom format was to give a negative score if no good subtitles were found For example it would give a score of 0 before downloading then after downloading would either give a +1 or -1 to the resulting file Is this a relevant use case for the Custom Formats ?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Radarr#8249
No description provided.