mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added new wizard page with more chapter image control
This commit is contained in:
parent
bc1996111a
commit
0b9f6ce000
2 changed files with 106 additions and 0 deletions
51
dashboard-ui/scripts/wizardimagesettings.js
Normal file
51
dashboard-ui/scripts/wizardimagesettings.js
Normal file
|
@ -0,0 +1,51 @@
|
|||
(function ($, document) {
|
||||
|
||||
function save(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
// After saving chapter task, now save server config
|
||||
ApiClient.getServerConfiguration().done(function (config) {
|
||||
|
||||
config.EnableVideoImageExtraction = $('#chkVIdeoImages', page).checked();
|
||||
config.ImageSavingConvention = $('#selectImageSavingConvention', page).val();
|
||||
|
||||
config.EnableMovieChapterImageExtraction = $('#chkMovies', page).checked();
|
||||
config.EnableEpisodeChapterImageExtraction = $('#chkEpisodes', page).checked();
|
||||
config.EnableOtherVideoChapterImageExtraction = $('#chkOtherVideos', page).checked();
|
||||
|
||||
ApiClient.updateServerConfiguration(config).done(function (result) {
|
||||
|
||||
navigateToNextPage();
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function navigateToNextPage() {
|
||||
|
||||
ApiClient.getSystemInfo().done(function (systemInfo) {
|
||||
|
||||
var os = systemInfo.OperatingSystem.toLowerCase();
|
||||
|
||||
if (os.indexOf('windows') != -1) {
|
||||
Dashboard.navigate('wizardservice.html');
|
||||
} else {
|
||||
Dashboard.navigate('wizardfinish.html');
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#wizardImageSettingsPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('#btnNextPage', page).on('click', function () {
|
||||
|
||||
save(page);
|
||||
});
|
||||
});
|
||||
|
||||
})(jQuery, document, window);
|
Loading…
Add table
Add a link
Reference in a new issue