make chapter images a per-library setting
This commit is contained in:
parent
fc63d39e27
commit
0659c5bdc1
6 changed files with 41 additions and 61 deletions
|
@ -35,17 +35,6 @@
|
|||
$('#txtFanartApiKey', page).val(config.UserApiKey || '');
|
||||
}
|
||||
|
||||
function loadChapters(page, config, providers) {
|
||||
|
||||
$('#chkChaptersMovies', page).checked(config.EnableMovieChapterImageExtraction);
|
||||
$('#chkChaptersEpisodes', page).checked(config.EnableEpisodeChapterImageExtraction);
|
||||
$('#chkChaptersOtherVideos', page).checked(config.EnableOtherVideoChapterImageExtraction);
|
||||
|
||||
$('#chkExtractChaptersDuringLibraryScan', page).checked(config.ExtractDuringLibraryScan);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
function saveFanart(form) {
|
||||
|
||||
ApiClient.getNamedConfiguration("fanart").then(function (config) {
|
||||
|
@ -66,20 +55,6 @@
|
|||
});
|
||||
}
|
||||
|
||||
function saveChapters(form) {
|
||||
|
||||
ApiClient.getNamedConfiguration("chapters").then(function (config) {
|
||||
|
||||
config.EnableMovieChapterImageExtraction = $('#chkChaptersMovies', form).checked();
|
||||
config.EnableEpisodeChapterImageExtraction = $('#chkChaptersEpisodes', form).checked();
|
||||
config.EnableOtherVideoChapterImageExtraction = $('#chkChaptersOtherVideos', form).checked();
|
||||
|
||||
config.ExtractDuringLibraryScan = $('#chkExtractChaptersDuringLibraryScan', form).checked();
|
||||
|
||||
ApiClient.updateNamedConfiguration("chapters", config);
|
||||
});
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
|
@ -108,7 +83,6 @@
|
|||
ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult);
|
||||
});
|
||||
|
||||
saveChapters(form);
|
||||
saveMetadata(form);
|
||||
saveFanart(form);
|
||||
|
||||
|
@ -185,14 +159,6 @@
|
|||
|
||||
loadFanartConfig(page, metadata);
|
||||
});
|
||||
|
||||
var promise1 = ApiClient.getNamedConfiguration("chapters");
|
||||
var promise2 = ApiClient.getJSON(ApiClient.getUrl("Providers/Chapters"));
|
||||
|
||||
Promise.all([promise1, promise2]).then(function (responses) {
|
||||
|
||||
loadChapters(page, responses[0], responses[1]);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue