Closed SenorSmartyPants closed 6 months ago
[Subtitle]
default-language = eng
It seems like the above setting is the problem. From the wiki descript If subtitle stream language is undefined, assumed this language
I thought it would just set the language flag of subtitle streams that were unknown to eng. But it is (also?) setting the disposition default flag to true.
Not a bug, just intended behavior. Most players only will display subtitles for 'forced' subtitles by default so this is VLC being different Currently the script will attempt to figure out a default subtitle if one isn't present if you have a default language specified, this feature doesn't trigger if there's no default language which is why you're changing the behavior by changing the default-language option
8041e2957c8f328564e50e9a703f013174d17b06
This adds a new option force-default
which is set to True
, setting this to false will disable this behavior for you
@mdhiggins I have a question about subtitles names (saves opening new issue) I've looked at the wiki but wasn't able to find an answer. How do I go about making sure the script keep SDH (for Hearing Impaired) in the name without keeping the title as is? Could the script add SDH while renaming it if it was detected?
Before script: Description: SDH after script: not listed in VLC.
It already marks the subtitle as "Hearing Impaired" in the title if the disposition is appropriately set
# Get title for subtitle stream based on disposition
def subtitleStreamTitle(self, stream, options, imageBased=False, path=None, tagdata=None):
if streamTitle:
try:
customTitle = streamTitle(self, stream, options, imageBased=imageBased, path=path, tagdata=None)
if customTitle is not None:
return customTitle
except:
self.log.exception("Custom streamTitle exception")
if self.settings.keep_titles and stream.metadata.get('title'):
return stream.metadata.get('title')
output = ""
disposition = stream.disposition
for dispo in BaseCodec.DISPO_STRINGS:
if disposition.get(dispo):
output += "%s " % BaseCodec.DISPO_STRINGS[dispo]
return output.strip() if output else None
The script should also infer the disposition from the existing title if the title contains SDH even if the disposition metadata isn't appropriately set
If this isn't working then please open a new issue with some logs
It already marks the subtitle as "Hearing Impaired" in the title if the disposition is appropriately set
# Get title for subtitle stream based on disposition def subtitleStreamTitle(self, stream, options, imageBased=False, path=None, tagdata=None): if streamTitle: try: customTitle = streamTitle(self, stream, options, imageBased=imageBased, path=path, tagdata=None) if customTitle is not None: return customTitle except: self.log.exception("Custom streamTitle exception") if self.settings.keep_titles and stream.metadata.get('title'): return stream.metadata.get('title') output = "" disposition = stream.disposition for dispo in BaseCodec.DISPO_STRINGS: if disposition.get(dispo): output += "%s " % BaseCodec.DISPO_STRINGS[dispo] return output.strip() if output else None
The script should also infer the disposition from the existing title if the title contains SDH even if the disposition metadata isn't appropriately set
If this isn't working then please open a new issue with some logs
Was doing some testing and found that the issue was with Clean it, set to false the subtitle keeps SDH.
This is probably because cleanit exports the subtitle to a file before merging it back in
You can add hearing_impaired to the filename-dispositions option to preserve this if you want to keep cleanit
b53701d96a582bbea13fd8db81217c1978442737
This update has the cleanit extracted subtitles automatically include all disposition data since its just going to be reimported anyway, now you don't need to modify the filename-dispositions setting
Good to know, thank you. Does this also include SMA as well?
What?
Sonarr SMA mod
Next time it auto rebuilds or you can just use SMA_UPDATE and restart the container to pull the latest
Describe the bug I'm doing several things, one is striping extra subtitle languages out. I'm leaving english (2 tracks) neither are marked default in the source, but the first is marked default in the output. How do I disable this? (VLC shows the default subtitles when I don't need it to)
autoProcess.ini settings
Log files