mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add option to enable/disable libraries
This commit adds the option to enable/disable libraries from the library options editor. The backend changes required for this functionality are in jellyfin PR 11037. This commit adds a checkbox in the library options editor. It adds a checkbox saying "Library Enabled" that is checked by default. libraryoptionseditor.js - added logic to handle enable libraries checkbox. Enables libraries by default libraryoptionseditor.template.html - added "enable libraries" checkbox src/strings/en-us.json - added English strings for enable library checkbox.
This commit is contained in:
parent
6c8967110e
commit
60fc2c72b2
4 changed files with 13 additions and 0 deletions
|
@ -511,6 +511,7 @@ function setImageOptionsIntoOptions(options) {
|
|||
|
||||
export function getLibraryOptions(parent) {
|
||||
const options = {
|
||||
Disabled: !parent.querySelector('.chkEnabled').checked,
|
||||
EnableArchiveMediaFiles: false,
|
||||
EnablePhotos: parent.querySelector('.chkEnablePhotos').checked,
|
||||
EnableRealtimeMonitor: parent.querySelector('.chkEnableRealtimeMonitor').checked,
|
||||
|
@ -574,6 +575,7 @@ export function setLibraryOptions(parent, options) {
|
|||
parent.querySelector('#selectCountry').value = options.MetadataCountryCode || '';
|
||||
parent.querySelector('#selectAutoRefreshInterval').value = options.AutomaticRefreshIntervalDays || '0';
|
||||
parent.querySelector('#txtSeasonZeroName').value = options.SeasonZeroDisplayName || 'Specials';
|
||||
parent.querySelector('.chkEnabled').checked = !options.Disabled;
|
||||
parent.querySelector('.chkEnablePhotos').checked = options.EnablePhotos;
|
||||
parent.querySelector('.chkEnableRealtimeMonitor').checked = options.EnableRealtimeMonitor;
|
||||
parent.querySelector('.chkEnableLUFSScan').checked = options.EnableLUFSScan;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue