1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/scripts/wizardimagesettings.js

55 lines
1.4 KiB
JavaScript
Raw Normal View History

(function ($, document) {
function save(page) {
Dashboard.showLoadingMsg();
2014-07-05 11:01:29 -04:00
// After saving chapter task, now save server config
ApiClient.getServerConfiguration().done(function (config) {
2014-07-05 11:01:29 -04:00
config.EnableUPnP = $('#chkEnableUpnp', page).checked();
2014-07-05 11:01:29 -04:00
ApiClient.updateServerConfiguration(config).done(function (result) {
2014-07-05 11:01:29 -04:00
ApiClient.getNamedConfiguration("chapters").done(function (chapterConfig) {
2014-07-05 11:01:29 -04:00
chapterConfig.EnableMovieChapterImageExtraction = $('#chkMovies', page).checked();
2014-03-06 00:17:13 -05:00
2014-07-05 11:01:29 -04:00
ApiClient.updateNamedConfiguration("chapters", chapterConfig).done(function () {
2014-02-19 13:50:37 -05:00
2014-07-05 11:01:29 -04:00
Dashboard.hideLoadingMsg();
2014-06-29 13:35:05 -04:00
2014-07-05 11:01:29 -04:00
navigateToNextPage();
2014-06-29 13:35:05 -04:00
});
2014-02-19 13:50:37 -05:00
});
});
});
}
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);