update recording creation process

This commit is contained in:
Luke Pulverenti 2016-02-12 13:12:59 -05:00
parent 6aca855749
commit 31bb32ee03
7 changed files with 54 additions and 31 deletions

View file

@ -49,6 +49,13 @@
var form = this; var form = this;
ApiClient.getNamedConfiguration("livetv").then(function (config) {
config.EnableRecordingEncoding = $('#chkConvertRecordings', form).checked();
ApiClient.updateNamedConfiguration("livetv", config).then(Dashboard.processServerConfigurationUpdateResult);
});
ApiClient.getNewLiveTvTimerDefaults({ programId: currentProgramId }).then(function (item) { ApiClient.getNewLiveTvTimerDefaults({ programId: currentProgramId }).then(function (item) {
item.PrePaddingSeconds = $('#txtPrePaddingMinutes', form).val() * 60; item.PrePaddingSeconds = $('#txtPrePaddingMinutes', form).val() * 60;
@ -127,12 +134,6 @@
context.querySelector('.supporterContainer').classList.remove('hide'); context.querySelector('.supporterContainer').classList.remove('hide');
if (AppInfo.enableSupporterMembership) {
context.querySelector('.btnSupporter').classList.remove('hide');
} else {
context.querySelector('.btnSupporter').classList.add('hide');
}
if (regInfo.TrialVersion) { if (regInfo.TrialVersion) {
context.querySelector('.supporterTrial').classList.remove('hide'); context.querySelector('.supporterTrial').classList.remove('hide');
} else { } else {
@ -216,6 +217,20 @@
}); });
$('form', context).off('submit', onSubmit).on('submit', onSubmit); $('form', context).off('submit', onSubmit).on('submit', onSubmit);
var supporterButtons = context.querySelectorAll('.btnSupporter');
for (var i = 0, length = supporterButtons.length; i < length; i++) {
if (AppInfo.enableSupporterMembership) {
supporterButtons[i].classList.remove('hide');
} else {
supporterButtons[i].classList.add('hide');
}
}
ApiClient.getNamedConfiguration("livetv").then(function (config) {
$('#chkConvertRecordings', context).checked(config.EnableRecordingEncoding);
});
} }
function selectDays(page, days) { function selectDays(page, days) {

View file

@ -45,7 +45,13 @@
</div> </div>
</div> </div>
</div> </div>
<br />
<div>
<paper-checkbox id="chkConvertRecordings">${OptionConvertRecordingsToStreamingFormat}</paper-checkbox>
<div class="fieldDescription paperCheckboxFieldDescription">${OptionConvertRecordingsToStreamingFormatHelp}</div>
<div class="fieldDescription paperCheckboxFieldDescription hide btnSupporter"><a href="http://emby.media/premiere" target="_blank">${ButtonLearnMore}</a></div>
</div>
<br />
<div class="advancedToggle hide"> <div class="advancedToggle hide">
<div> <div>
<paper-input type="number" id="txtPrePaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelPrePaddingMinutes}"></paper-input> <paper-input type="number" id="txtPrePaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelPrePaddingMinutes}"></paper-input>

View file

@ -4,12 +4,6 @@
page.querySelector('#chkEnableThrottle').checked = config.EnableThrottling; page.querySelector('#chkEnableThrottle').checked = config.EnableThrottling;
$('.radioEncodingQuality', page).each(function () {
this.checked = config.EncodingQuality == this.value;
}).checkboxradio('refresh');
$('#selectVideoDecoder', page).val(config.HardwareAccelerationType); $('#selectVideoDecoder', page).val(config.HardwareAccelerationType);
$('#selectThreadCount', page).val(config.EncodingThreadCount); $('#selectThreadCount', page).val(config.EncodingThreadCount);
$('#txtDownMixAudioBoost', page).val(config.DownMixAudioBoost); $('#txtDownMixAudioBoost', page).val(config.DownMixAudioBoost);
@ -27,7 +21,6 @@
ApiClient.getNamedConfiguration("encoding").then(function (config) { ApiClient.getNamedConfiguration("encoding").then(function (config) {
config.EncodingQuality = $('.radioEncodingQuality:checked', form).val();
config.DownMixAudioBoost = $('#txtDownMixAudioBoost', form).val(); config.DownMixAudioBoost = $('#txtDownMixAudioBoost', form).val();
config.TranscodingTempPath = $('#txtTranscodingTempPath', form).val(); config.TranscodingTempPath = $('#txtTranscodingTempPath', form).val();
config.EncodingThreadCount = $('#selectThreadCount', form).val(); config.EncodingThreadCount = $('#selectThreadCount', form).val();

View file

@ -21,26 +21,26 @@
function onSubmit() { function onSubmit() {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();
var form = this; var form = this;
ApiClient.getNamedConfiguration("livetv").then(function (config) { ApiClient.getNamedConfiguration("livetv").then(function (config) {
config.GuideDays = $('#selectGuideDays', form).val() || null; config.GuideDays = $('#selectGuideDays', form).val() || null;
config.EnableMovieProviders = $('#chkMovies', form).checked(); config.EnableMovieProviders = $('#chkMovies', form).checked();
config.EnableAutoOrganize = $('#chkOrganize', form).checked(); config.EnableAutoOrganize = $('#chkOrganize', form).checked();
config.EnableRecordingEncoding = $('#chkConvertRecordings', form).checked(); config.EnableRecordingEncoding = $('#chkConvertRecordings', form).checked();
config.RecordingPath = $('#txtRecordingPath', form).val() || null; config.RecordingPath = $('#txtRecordingPath', form).val() || null;
config.PrePaddingSeconds = $('#txtPrePaddingMinutes', form).val() * 60; config.PrePaddingSeconds = $('#txtPrePaddingMinutes', form).val() * 60;
config.PostPaddingSeconds = $('#txtPostPaddingMinutes', form).val() * 60; config.PostPaddingSeconds = $('#txtPostPaddingMinutes', form).val() * 60;
ApiClient.updateNamedConfiguration("livetv", config).then(Dashboard.processServerConfigurationUpdateResult); ApiClient.updateNamedConfiguration("livetv", config).then(Dashboard.processServerConfigurationUpdateResult);
}); });
// Disable default form submission // Disable default form submission
return false; return false;
} }
$(document).on('pageinit', "#liveTvSettingsPage", function () { $(document).on('pageinit', "#liveTvSettingsPage", function () {

View file

@ -321,6 +321,15 @@
Dashboard.alert(Globalize.translate('PasswordSaved')); Dashboard.alert(Globalize.translate('PasswordSaved'));
loadUser(page); loadUser(page);
}, function() {
Dashboard.hideLoadingMsg();
Dashboard.alert({
title: Globalize.translate('HeaderLoginFailure'),
message: Globalize.translate('MessageInvalidUser')
});
}); });
} }

View file

@ -1534,6 +1534,6 @@
"ButtonAdvanced": "Advanced", "ButtonAdvanced": "Advanced",
"LabelCodecIntrosPath": "Codec intros path:", "LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.", "LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to streaming friendly formats.", "OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
"OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly for easy playback on any device. This feature requires an active Emby Premiere subscription." "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 for easy playback on any device. This feature requires an active Emby Premiere subscription."
} }

View file

@ -1549,6 +1549,6 @@
"ButtonAdvanced": "Advanced", "ButtonAdvanced": "Advanced",
"LabelCodecIntrosPath": "Codec intros path:", "LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.", "LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to streaming friendly formats", "OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
"OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 for easy playback on any device. This feature requires an active Emby Premiere subscription." "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 for easy playback on any device. This feature requires an active Emby Premiere subscription."
} }