2013-12-22 20:45:51 -07:00
|
|
|
|
(function ($, document) {
|
|
|
|
|
|
|
|
|
|
function save(page) {
|
|
|
|
|
|
|
|
|
|
Dashboard.showLoadingMsg();
|
|
|
|
|
|
2014-02-19 11:50:37 -07:00
|
|
|
|
$.ajax({
|
|
|
|
|
type: "POST",
|
|
|
|
|
url: ApiClient.getUrl("System/Configuration/VideoImageExtraction", { Enabled: $('#chkVideoImages', page).checked() })
|
2013-12-22 20:45:51 -07:00
|
|
|
|
|
2014-02-19 11:50:37 -07:00
|
|
|
|
}).done(function () {
|
2013-12-22 20:45:51 -07:00
|
|
|
|
|
|
|
|
|
|
2014-02-19 11:50:37 -07:00
|
|
|
|
// After saving chapter task, now save server config
|
|
|
|
|
ApiClient.getServerConfiguration().done(function (config) {
|
2013-12-22 20:45:51 -07:00
|
|
|
|
|
2014-02-19 11:50:37 -07:00
|
|
|
|
config.ImageSavingConvention = $('#selectImageSavingConvention', page).val();
|
|
|
|
|
config.EnableMovieChapterImageExtraction = $('#chkMovies', page).checked();
|
2013-12-22 20:45:51 -07:00
|
|
|
|
|
2014-02-19 11:50:37 -07:00
|
|
|
|
ApiClient.updateServerConfiguration(config).done(function (result) {
|
|
|
|
|
|
|
|
|
|
navigateToNextPage();
|
|
|
|
|
|
|
|
|
|
});
|
2013-12-22 20:45:51 -07: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);
|