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> </div>
<form id="advancedMetadataConfigurationForm"> <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"> <ul data-role="listview" class="ulForm">
<li> <li>
<label>Extract chapter images for:</label> <label>Extract chapter images for:</label>

View File

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

View File

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

View File

@ -23,8 +23,8 @@
</div> </div>
<div style="margin: 2em 0;"> <div style="margin: 2em 0;">
<label for="chkVIdeoImages">Enable video image extraction</label> <label for="chkVideoImages">Enable video image extraction</label>
<input id="chkVIdeoImages" name="chkVIdeoImages" type="checkbox" checked="checked" /> <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 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> </div>