rework image extraction settings

This commit is contained in:
Luke Pulverenti 2014-02-19 13:50:37 -05:00
parent 6c28e65a50
commit 9f346f271c
4 changed files with 15 additions and 22 deletions

View File

@ -20,14 +20,6 @@
</div>
<form id="advancedMetadataConfigurationForm">
<ul data-role="listview" class="ulForm">
<li>
<label for="chkVIdeoImages">Enable video image extraction</label>
<input id="chkVIdeoImages" name="chkVIdeoImages" type="checkbox" checked="checked" data-mini="true" />
<div class="fieldDescription">This is for videos that don't already have images, and that we're uanble to find internet images for. This will add some additional time to the initial library scan but will result in a more pleasing presentation.</div>
</li>
</ul>
<h2>Chapter Images</h2>
<ul data-role="listview" class="ulForm">
<li>
<label>Extract chapter images for:</label>

View File

@ -15,8 +15,6 @@
load: function (page, config) {
$('#chkVIdeoImages', page).checked(config.EnableVideoImageExtraction).checkboxradio("refresh");
$('#chkMovies', page).checked(config.EnableMovieChapterImageExtraction).checkboxradio("refresh");
$('#chkEpisodes', page).checked(config.EnableEpisodeChapterImageExtraction).checkboxradio("refresh");
$('#chkOtherVideos', page).checked(config.EnableOtherVideoChapterImageExtraction).checkboxradio("refresh");
@ -55,8 +53,6 @@
ApiClient.getServerConfiguration().done(function (config) {
config.EnableVideoImageExtraction = $('#chkVIdeoImages', form).checked();
config.EnableMovieChapterImageExtraction = $('#chkMovies', form).checked();
config.EnableEpisodeChapterImageExtraction = $('#chkEpisodes', form).checked();
config.EnableOtherVideoChapterImageExtraction = $('#chkOtherVideos', form).checked();

View File

@ -4,21 +4,26 @@
Dashboard.showLoadingMsg();
// After saving chapter task, now save server config
ApiClient.getServerConfiguration().done(function (config) {
$.ajax({
type: "POST",
url: ApiClient.getUrl("System/Configuration/VideoImageExtraction", { Enabled: $('#chkVideoImages', page).checked() })
config.EnableVideoImageExtraction = $('#chkVIdeoImages', page).checked();
config.ImageSavingConvention = $('#selectImageSavingConvention', page).val();
}).done(function () {
config.EnableMovieChapterImageExtraction = $('#chkMovies', page).checked();
ApiClient.updateServerConfiguration(config).done(function (result) {
// After saving chapter task, now save server config
ApiClient.getServerConfiguration().done(function (config) {
navigateToNextPage();
config.ImageSavingConvention = $('#selectImageSavingConvention', page).val();
config.EnableMovieChapterImageExtraction = $('#chkMovies', page).checked();
ApiClient.updateServerConfiguration(config).done(function (result) {
navigateToNextPage();
});
});
});
}
function navigateToNextPage() {

View File

@ -23,8 +23,8 @@
</div>
<div style="margin: 2em 0;">
<label for="chkVIdeoImages">Enable video image extraction</label>
<input id="chkVIdeoImages" name="chkVIdeoImages" type="checkbox" checked="checked" />
<label for="chkVideoImages">Enable video image extraction</label>
<input id="chkVideoImages" name="chkVideoImages" type="checkbox" checked="checked" />
<div class="fieldDescription">For videos that don't already have images, and that we're unable to find internet images for. This will add some additional time to the initial library scan but will result in a more pleasing presentation.</div>
</div>