Add DisableEmbeddedSubtitles support

Adds the option to disable embedded subs for libraries
This commit is contained in:
Matthew Jones 2021-12-26 19:11:07 +00:00
parent 07bbb9d027
commit fad290483e
5 changed files with 20 additions and 0 deletions

View file

@ -50,6 +50,7 @@
- [Keegan Dahm](https://github.com/keegandahm)
- [GodTamIt](https://github.com/GodTamIt)
- [MinecraftPlaye](https://github.com/MinecraftPlaye)
- [Matthew Jones](https://github.com/matthew-jones-uk)
# Emby Contributors

View file

@ -411,6 +411,12 @@ import template from './libraryoptionseditor.template.html';
parent.querySelector('.chkEnableEmbeddedEpisodeInfosContainer').classList.add('hide');
}
if (contentType !== 'tvshows' || contentType !== 'movies' || contentType !== 'musicvideos' || contentType !== 'mixed') {
parent.querySelector('.chkDisableEmbeddedSubtitlesContainer').classList.remove('hide');
} else {
parent.querySelector('.chkDisableEmbeddedSubtitlesContainer').classList.add('hide');
}
parent.querySelector('.chkAutomaticallyAddToCollectionContainer').classList.toggle('hide', contentType !== 'movies');
return populateMetadataSettings(parent, contentType);
@ -509,6 +515,7 @@ import template from './libraryoptionseditor.template.html';
AutomaticRefreshIntervalDays: parseInt(parent.querySelector('#selectAutoRefreshInterval').value),
EnableEmbeddedTitles: parent.querySelector('#chkEnableEmbeddedTitles').checked,
EnableEmbeddedEpisodeInfos: parent.querySelector('#chkEnableEmbeddedEpisodeInfos').checked,
DisableEmbeddedSubtitles: parent.querySelector('#chkDisableEmbeddedSubtitles').checked,
SkipSubtitlesIfEmbeddedSubtitlesPresent: parent.querySelector('#chkSkipIfGraphicalSubsPresent').checked,
SkipSubtitlesIfAudioTrackMatches: parent.querySelector('#chkSkipIfAudioTrackPresent').checked,
SaveSubtitlesWithMedia: parent.querySelector('#chkSaveSubtitlesLocally').checked,
@ -561,6 +568,7 @@ import template from './libraryoptionseditor.template.html';
parent.querySelector('.chkAutomaticallyGroupSeries').checked = options.EnableAutomaticSeriesGrouping;
parent.querySelector('#chkEnableEmbeddedTitles').checked = options.EnableEmbeddedTitles;
parent.querySelector('#chkEnableEmbeddedEpisodeInfos').checked = options.EnableEmbeddedEpisodeInfos;
parent.querySelector('#chkDisableEmbeddedSubtitles').checked = options.DisableEmbeddedSubtitles;
parent.querySelector('#chkSkipIfGraphicalSubsPresent').checked = options.SkipSubtitlesIfEmbeddedSubtitlesPresent;
parent.querySelector('#chkSaveSubtitlesLocally').checked = options.SaveSubtitlesWithMedia;
parent.querySelector('#chkSkipIfAudioTrackPresent').checked = options.SkipSubtitlesIfAudioTrackMatches;

View file

@ -30,6 +30,13 @@
</label>
<div class="fieldDescription checkboxFieldDescription">${PreferEmbeddedEpisodeInfosOverFileNamesHelp}</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription chkDisableEmbeddedSubtitlesContainer hide advanced">
<label>
<input is="emby-checkbox" type="checkbox" id="chkDisableEmbeddedSubtitles" />
<span>${DisableEmbeddedSubtitles}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${DisableEmbeddedSubtitlesHelp}</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription advanced">
<label>

View file

@ -1266,6 +1266,8 @@
"Season": "Series",
"PreferEmbeddedEpisodeInfosOverFileNames": "Prefer embedded episode information over filenames",
"PreferEmbeddedEpisodeInfosOverFileNamesHelp": "Use the episode information from the embedded metadata if available.",
"DisableEmbeddedSubtitles": "Disable embedded subtitles",
"DisableEmbeddedSubtitlesHelp": "Disable subtitles that are packaged within video files.",
"Person": "Person",
"Movie": "Film",
"LabelLibraryPageSizeHelp": "Set the amount of items to show on a library page. Set to 0 in order to disable paging.",

View file

@ -1288,6 +1288,8 @@
"PreferEmbeddedEpisodeInfosOverFileNamesHelp": "Use the episode information from the embedded metadata if available.",
"PreferEmbeddedTitlesOverFileNames": "Prefer embedded titles over filenames",
"PreferEmbeddedTitlesOverFileNamesHelp": "Determine the display title to use when no internet metadata or local metadata is available.",
"DisableEmbeddedSubtitles": "Disable embedded subtitles",
"DisableEmbeddedSubtitlesHelp": "Disable subtitles that are packaged within video files.",
"Premiere": "Premiere",
"Premieres": "Premieres",
"Preview": "Preview",