mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add additional metadata config tab
This commit is contained in:
parent
121d1de0af
commit
02cd0a7b6f
8 changed files with 111 additions and 45 deletions
|
@ -6,19 +6,18 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
var promise1 = ApiClient.getServerConfiguration();
|
||||
var promise2 = ApiClient.getItemTypes({ HasInternetProvider: true });
|
||||
ApiClient.getServerConfiguration().done(function (configuration) {
|
||||
|
||||
$.when(promise1, promise2).done(function (response1, response2) {
|
||||
|
||||
AdvancedMetadataConfigurationPage.load(page, response1[0], response2[0]);
|
||||
AdvancedMetadataConfigurationPage.load(page, configuration);
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
load: function (page, config, itemTypes) {
|
||||
load: function (page, config) {
|
||||
|
||||
$('#chkEnableTmdbPersonUpdates', page).checked(config.EnableTmdbUpdates).checkboxradio("refresh");
|
||||
$('#chkEnableTvdbUpdates', page).checked(config.EnableTvDbUpdates).checkboxradio("refresh");
|
||||
|
||||
AdvancedMetadataConfigurationPage.loadItemTypes(page, config, itemTypes);
|
||||
Dashboard.hideLoadingMsg();
|
||||
},
|
||||
|
||||
|
@ -49,10 +48,8 @@
|
|||
|
||||
ApiClient.getServerConfiguration().done(function (config) {
|
||||
|
||||
config.InternetProviderExcludeTypes = $.map($('.chkItemType:checked', form), function (currentCheckbox) {
|
||||
|
||||
return currentCheckbox.getAttribute('data-itemtype');
|
||||
});
|
||||
config.EnableTvDbUpdates = $('#chkEnableTvdbUpdates', form).checked();
|
||||
config.EnableTmdbUpdates = $('#chkEnableTmdbPersonUpdates', form).checked();
|
||||
|
||||
ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
|
||||
});
|
||||
|
|
|
@ -42,8 +42,6 @@
|
|||
$('#selectLanguage', page).val(config.PreferredMetadataLanguage).selectmenu("refresh");
|
||||
$('#selectCountry', page).val(config.MetadataCountryCode).selectmenu("refresh");
|
||||
$('#chkEnableInternetProviders', page).checked(config.EnableInternetProviders).checkboxradio("refresh");
|
||||
$('#chkEnableTmdbPersonUpdates', page).checked(config.EnableTmdbUpdates).checkboxradio("refresh");
|
||||
$('#chkEnableTvdbUpdates', page).checked(config.EnableTvDbUpdates).checkboxradio("refresh");
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
},
|
||||
|
@ -87,12 +85,10 @@
|
|||
|
||||
ApiClient.getServerConfiguration().done(function (config) {
|
||||
|
||||
config.EnableTmdbUpdates = $('#chkEnableTmdbPersonUpdates', form).checked();
|
||||
config.EnableInternetProviders = $('#chkEnableInternetProviders', form).checked();
|
||||
config.SaveLocalMeta = $('#chkSaveLocal', form).checked();
|
||||
config.PreferredMetadataLanguage = $('#selectLanguage', form).val();
|
||||
config.MetadataCountryCode = $('#selectCountry', form).val();
|
||||
config.EnableTvDbUpdates = $('#chkEnableTvdbUpdates', form).checked();
|
||||
|
||||
ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
|
||||
});
|
||||
|
|
38
dashboard-ui/scripts/metadataimageextraction.js
Normal file
38
dashboard-ui/scripts/metadataimageextraction.js
Normal file
|
@ -0,0 +1,38 @@
|
|||
var MetadataImageExtractionPage = {
|
||||
|
||||
onPageShow: function () {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var page = this;
|
||||
|
||||
ApiClient.getServerConfiguration().done(function (result) {
|
||||
MetadataImageExtractionPage.load(page, result);
|
||||
});
|
||||
},
|
||||
|
||||
load: function (page, config) {
|
||||
|
||||
$('#chkVIdeoImages', page).checked(config.EnableVideoImageExtraction).checkboxradio("refresh");
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
},
|
||||
|
||||
onSubmit: function () {
|
||||
var form = this;
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.getServerConfiguration().done(function (config) {
|
||||
|
||||
config.EnableVideoImageExtraction = $('#chkVIdeoImages', form).checked();
|
||||
|
||||
ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
|
||||
});
|
||||
|
||||
// Disable default form submission
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
$(document).on('pageshow', "#metadataImageExtractionPage", MetadataImageExtractionPage.onPageShow);
|
|
@ -43,8 +43,6 @@
|
|||
$('#chkDownloadAlbumBackdrops', page).checked(config.DownloadMusicAlbumImages.Backdrops).checkboxradio("refresh");
|
||||
$('#chkMusicAlbumDisc', page).checked(config.DownloadMusicAlbumImages.Disc).checkboxradio("refresh");
|
||||
|
||||
$('#chkVIdeoImages', page).checked(config.EnableVideoImageExtraction).checkboxradio("refresh");
|
||||
|
||||
$('#selectImageSavingConvention', page).val(config.ImageSavingConvention).selectmenu("refresh");
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
|
@ -89,8 +87,6 @@
|
|||
config.DownloadMusicAlbumImages.Backdrops = $('#chkDownloadAlbumBackdrops', form).checked();
|
||||
config.DownloadMusicAlbumImages.Disc = $('#chkMusicAlbumDisc', form).checked();
|
||||
|
||||
config.EnableVideoImageExtraction = $('#chkVIdeoImages', form).checked();
|
||||
|
||||
ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue