diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 6811962cc7..34e077c433 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -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 diff --git a/src/components/libraryoptionseditor/libraryoptionseditor.js b/src/components/libraryoptionseditor/libraryoptionseditor.js index d73f7233b5..b8950ebed0 100644 --- a/src/components/libraryoptionseditor/libraryoptionseditor.js +++ b/src/components/libraryoptionseditor/libraryoptionseditor.js @@ -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('.fldAllowEmbeddedSubtitlesContainer').classList.remove('hide'); + } else { + parent.querySelector('.fldAllowEmbeddedSubtitlesContainer').classList.add('hide'); + } + parent.querySelector('.chkAutomaticallyAddToCollectionContainer').classList.toggle('hide', contentType !== 'movies' && contentType !== 'mixed'); 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, + AllowEmbeddedSubtitles: parent.querySelector('#selectAllowEmbeddedSubtitles').value, SkipSubtitlesIfEmbeddedSubtitlesPresent: parent.querySelector('#chkSkipIfGraphicalSubsPresent').checked, SkipSubtitlesIfAudioTrackMatches: parent.querySelector('#chkSkipIfAudioTrackPresent').checked, SaveSubtitlesWithMedia: parent.querySelector('#chkSaveSubtitlesLocally').checked, @@ -560,7 +567,8 @@ import template from './libraryoptionseditor.template.html'; parent.querySelector('#chkSaveLocal').checked = options.SaveLocalMetadata; parent.querySelector('.chkAutomaticallyGroupSeries').checked = options.EnableAutomaticSeriesGrouping; parent.querySelector('#chkEnableEmbeddedTitles').checked = options.EnableEmbeddedTitles; - parent.querySelector('#chkEnableEmbeddedEpisodeInfos').checked = options.EnableEmbeddedEpisodeInfos; + parent.querySelector('#chkEnableEmbeddedEpisodeInfos').value = options.EnableEmbeddedEpisodeInfos; + parent.querySelector('#selectAllowEmbeddedSubtitles').value = options.AllowEmbeddedSubtitles; parent.querySelector('#chkSkipIfGraphicalSubsPresent').checked = options.SkipSubtitlesIfEmbeddedSubtitlesPresent; parent.querySelector('#chkSaveSubtitlesLocally').checked = options.SaveSubtitlesWithMedia; parent.querySelector('#chkSkipIfAudioTrackPresent').checked = options.SkipSubtitlesIfAudioTrackMatches; diff --git a/src/components/libraryoptionseditor/libraryoptionseditor.template.html b/src/components/libraryoptionseditor/libraryoptionseditor.template.html index bb94e0ee20..8f792eaab2 100644 --- a/src/components/libraryoptionseditor/libraryoptionseditor.template.html +++ b/src/components/libraryoptionseditor/libraryoptionseditor.template.html @@ -30,6 +30,15 @@
${PreferEmbeddedEpisodeInfosOverFileNamesHelp}
+
+ +
${AllowEmbeddedSubtitlesHelp}
+