diff --git a/src/components/libraryoptionseditor/libraryoptionseditor.js b/src/components/libraryoptionseditor/libraryoptionseditor.js index 743bf7dc39..252b8b6dfc 100644 --- a/src/components/libraryoptionseditor/libraryoptionseditor.js +++ b/src/components/libraryoptionseditor/libraryoptionseditor.js @@ -411,6 +411,8 @@ import template from './libraryoptionseditor.template.html'; parent.querySelector('.chkEnableEmbeddedEpisodeInfosContainer').classList.add('hide'); } + parent.querySelector('.chkAutomaticallyAddToCollectionContainer').classList.toggle('hide', contentType !== 'movies'); + return populateMetadataSettings(parent, contentType); } @@ -511,6 +513,7 @@ import template from './libraryoptionseditor.template.html'; SkipSubtitlesIfAudioTrackMatches: parent.querySelector('#chkSkipIfAudioTrackPresent').checked, SaveSubtitlesWithMedia: parent.querySelector('#chkSaveSubtitlesLocally').checked, RequirePerfectSubtitleMatch: parent.querySelector('#chkRequirePerfectMatch').checked, + AutomaticallyAddToCollection: parent.querySelector('#chkAutomaticallyAddToCollection').checked, MetadataSavers: Array.prototype.map.call(Array.prototype.filter.call(parent.querySelectorAll('.chkMetadataSaver'), elem => { return elem.checked; }), elem => { @@ -562,6 +565,7 @@ import template from './libraryoptionseditor.template.html'; parent.querySelector('#chkSaveSubtitlesLocally').checked = options.SaveSubtitlesWithMedia; parent.querySelector('#chkSkipIfAudioTrackPresent').checked = options.SkipSubtitlesIfAudioTrackMatches; parent.querySelector('#chkRequirePerfectMatch').checked = options.RequirePerfectSubtitleMatch; + parent.querySelector('#chkAutomaticallyAddToCollection').checked = options.AutomaticallyAddToCollection; Array.prototype.forEach.call(parent.querySelectorAll('.chkMetadataSaver'), elem => { elem.checked = options.MetadataSavers ? options.MetadataSavers.includes(elem.getAttribute('data-pluginname')) : elem.getAttribute('data-defaultenabled') === 'true'; }); diff --git a/src/components/libraryoptionseditor/libraryoptionseditor.template.html b/src/components/libraryoptionseditor/libraryoptionseditor.template.html index bd70bcb54e..bb94e0ee20 100644 --- a/src/components/libraryoptionseditor/libraryoptionseditor.template.html +++ b/src/components/libraryoptionseditor/libraryoptionseditor.template.html @@ -39,6 +39,14 @@
${LabelEnableRealtimeMonitorHelp}
+
+ +
${LabelAutomaticallyAddToCollectionHelp}
+
+
diff --git a/src/strings/en-us.json b/src/strings/en-us.json index 8aa91763a5..1caa63068a 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -533,6 +533,8 @@ "LabelAudioLanguagePreference": "Preferred audio language:", "LabelAudioSampleRate": "Audio sample rate:", "LabelAuthProvider": "Authentication Provider:", + "LabelAutomaticallyAddToCollection": "Automatically add to collection", + "LabelAutomaticallyAddToCollectionHelp": "When at least 2 movies have the same collection name, they will be automatically added to the collection", "LabelAutoDiscoveryTracing": "Enable Auto Discovery tracing.", "LabelAutoDiscoveryTracingHelp": "When enabled, packets received on the auto discovery port will be logged.", "LabelAutomaticallyRefreshInternetMetadataEvery": "Automatically refresh metadata from the internet:", diff --git a/src/strings/zh-cn.json b/src/strings/zh-cn.json index e8bf6f130e..780ec8ffe0 100644 --- a/src/strings/zh-cn.json +++ b/src/strings/zh-cn.json @@ -402,6 +402,8 @@ "LabelArtists": "艺术家:", "LabelArtistsHelp": "将多个艺术家用分号分隔。", "LabelAudioLanguagePreference": "首选音频语言:", + "LabelAutomaticallyAddToCollection": "自动添加到合集", + "LabelAutomaticallyAddToCollectionHelp": "当至少有2个电影拥有相同的合集名称时,它们将会自动添加到合集中", "LabelAutomaticallyRefreshInternetMetadataEvery": "自动从互联网获取元数据并刷新:", "LabelBindToLocalNetworkAddress": "监听的本地网络地址:", "LabelBindToLocalNetworkAddressHelp": "覆盖 HTTP 服务器绑定的本地 IP 地址。如果留空,服务器将会监听所有可用的地址。重启后生效。",