1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Add AutoCollection option to libraryoptionseditor

Signed-off-by: Petrus.Z <silencly07@gmail.com>
This commit is contained in:
Petrus.Z 2021-11-17 13:52:54 +08:00
parent 05eeba9012
commit 29483abc62
No known key found for this signature in database
GPG key ID: 71B321E14F898C3D
5 changed files with 21 additions and 0 deletions

View file

@ -410,6 +410,11 @@ import template from './libraryoptionseditor.template.html';
} else {
parent.querySelector('.chkEnableEmbeddedEpisodeInfosContainer').classList.add('hide');
}
if (contentType === 'movies') {
parent.querySelector('.chkAutoCollectionContainer').classList.remove('hide');
} else {
parent.querySelector('.chkAutoCollectionContainer').classList.add('hide');
}
return populateMetadataSettings(parent, contentType);
}
@ -511,6 +516,7 @@ import template from './libraryoptionseditor.template.html';
SkipSubtitlesIfAudioTrackMatches: parent.querySelector('#chkSkipIfAudioTrackPresent').checked,
SaveSubtitlesWithMedia: parent.querySelector('#chkSaveSubtitlesLocally').checked,
RequirePerfectSubtitleMatch: parent.querySelector('#chkRequirePerfectMatch').checked,
AutoCollection: parent.querySelector('#chkAutoCollection').checked,
MetadataSavers: Array.prototype.map.call(Array.prototype.filter.call(parent.querySelectorAll('.chkMetadataSaver'), elem => {
return elem.checked;
}), elem => {
@ -562,6 +568,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('#chkAutoCollection').checked = options.AutoCollection;
Array.prototype.forEach.call(parent.querySelectorAll('.chkMetadataSaver'), elem => {
elem.checked = options.MetadataSavers ? options.MetadataSavers.includes(elem.getAttribute('data-pluginname')) : elem.getAttribute('data-defaultenabled') === 'true';
});

View file

@ -39,6 +39,14 @@
<div class="fieldDescription checkboxFieldDescription">${LabelEnableRealtimeMonitorHelp}</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription chkAutoCollectionContainer hide advanced">
<label>
<input is="emby-checkbox" type="checkbox" id="chkAutoCollection" checked />
<span>${LabelAutoCollection}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelAutoCollectionHelp}</div>
</div>
<div class="metadataReaders hide advanced" style="margin-bottom: 2em;">
</div>

View file

@ -995,6 +995,8 @@
"LabelBirthYear": "Birth year:",
"LabelBirthDate": "Birth date:",
"LabelBindToLocalNetworkAddress": "Bind to local network address:",
"LabelAutoCollection": "Auto create collection",
"LabelAutoCollectionHelp": "When at least 2 movies in the library have the same collection name, the collection will be automatically created",
"LabelAutomaticallyRefreshInternetMetadataEvery": "Automatically refresh metadata from the internet:",
"LabelAuthProvider": "Authentication Provider:",
"LabelAudioLanguagePreference": "Preferred audio language:",

View file

@ -533,6 +533,8 @@
"LabelAudioLanguagePreference": "Preferred audio language:",
"LabelAudioSampleRate": "Audio sample rate:",
"LabelAuthProvider": "Authentication Provider:",
"LabelAutoCollection": "Auto create collection",
"LabelAutoCollectionHelp": "When at least 2 movies in the library have the same collection name, the collection will be automatically created",
"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:",

View file

@ -402,6 +402,8 @@
"LabelArtists": "艺术家:",
"LabelArtistsHelp": "将多个艺术家用分号分隔。",
"LabelAudioLanguagePreference": "首选音频语言:",
"LabelAutoCollection": "自动创建合集",
"LabelAutoCollectionHelp": "当库中至少有2个电影拥有相同的合集名称时将自动创建合集",
"LabelAutomaticallyRefreshInternetMetadataEvery": "自动从互联网获取元数据并刷新:",
"LabelBindToLocalNetworkAddress": "监听的本地网络地址:",
"LabelBindToLocalNetworkAddressHelp": "覆盖 HTTP 服务器绑定的本地 IP 地址。如果留空,服务器将会监听所有可用的地址。重启后生效。",