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:
parent
05eeba9012
commit
29483abc62
5 changed files with 21 additions and 0 deletions
|
@ -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';
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue