From 31bb32ee03ac21167ac468eef3d848b204b56388 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 12 Feb 2016 13:12:59 -0500 Subject: [PATCH] update recording creation process --- .../recordingcreator/recordingcreator.js | 27 ++++++++++++++---- .../recordingcreator.template.html | 8 +++++- dashboard-ui/scripts/encodingsettings.js | 7 ----- dashboard-ui/scripts/livetvsettings.js | 28 +++++++++---------- dashboard-ui/scripts/myprofile.js | 9 ++++++ dashboard-ui/strings/html/en-US.json | 4 +-- dashboard-ui/strings/html/server.json | 2 +- 7 files changed, 54 insertions(+), 31 deletions(-) diff --git a/dashboard-ui/components/recordingcreator/recordingcreator.js b/dashboard-ui/components/recordingcreator/recordingcreator.js index 9c28bfecb4..2cecb5be93 100644 --- a/dashboard-ui/components/recordingcreator/recordingcreator.js +++ b/dashboard-ui/components/recordingcreator/recordingcreator.js @@ -49,6 +49,13 @@ 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) { item.PrePaddingSeconds = $('#txtPrePaddingMinutes', form).val() * 60; @@ -127,12 +134,6 @@ 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) { context.querySelector('.supporterTrial').classList.remove('hide'); } else { @@ -216,6 +217,20 @@ }); $('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) { diff --git a/dashboard-ui/components/recordingcreator/recordingcreator.template.html b/dashboard-ui/components/recordingcreator/recordingcreator.template.html index 7aa0e94541..3ba4a35277 100644 --- a/dashboard-ui/components/recordingcreator/recordingcreator.template.html +++ b/dashboard-ui/components/recordingcreator/recordingcreator.template.html @@ -45,7 +45,13 @@ - +
+
+ ${OptionConvertRecordingsToStreamingFormat} +
${OptionConvertRecordingsToStreamingFormatHelp}
+ +
+
diff --git a/dashboard-ui/scripts/encodingsettings.js b/dashboard-ui/scripts/encodingsettings.js index 4181a4dd4a..0ccd8e9745 100644 --- a/dashboard-ui/scripts/encodingsettings.js +++ b/dashboard-ui/scripts/encodingsettings.js @@ -4,12 +4,6 @@ page.querySelector('#chkEnableThrottle').checked = config.EnableThrottling; - $('.radioEncodingQuality', page).each(function () { - - this.checked = config.EncodingQuality == this.value; - - }).checkboxradio('refresh'); - $('#selectVideoDecoder', page).val(config.HardwareAccelerationType); $('#selectThreadCount', page).val(config.EncodingThreadCount); $('#txtDownMixAudioBoost', page).val(config.DownMixAudioBoost); @@ -27,7 +21,6 @@ ApiClient.getNamedConfiguration("encoding").then(function (config) { - config.EncodingQuality = $('.radioEncodingQuality:checked', form).val(); config.DownMixAudioBoost = $('#txtDownMixAudioBoost', form).val(); config.TranscodingTempPath = $('#txtTranscodingTempPath', form).val(); config.EncodingThreadCount = $('#selectThreadCount', form).val(); diff --git a/dashboard-ui/scripts/livetvsettings.js b/dashboard-ui/scripts/livetvsettings.js index e17f0231b7..54c5721735 100644 --- a/dashboard-ui/scripts/livetvsettings.js +++ b/dashboard-ui/scripts/livetvsettings.js @@ -21,26 +21,26 @@ 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.EnableMovieProviders = $('#chkMovies', form).checked(); - config.EnableAutoOrganize = $('#chkOrganize', form).checked(); - config.EnableRecordingEncoding = $('#chkConvertRecordings', form).checked(); - config.RecordingPath = $('#txtRecordingPath', form).val() || null; + config.GuideDays = $('#selectGuideDays', form).val() || null; + config.EnableMovieProviders = $('#chkMovies', form).checked(); + config.EnableAutoOrganize = $('#chkOrganize', form).checked(); + config.EnableRecordingEncoding = $('#chkConvertRecordings', form).checked(); + config.RecordingPath = $('#txtRecordingPath', form).val() || null; - config.PrePaddingSeconds = $('#txtPrePaddingMinutes', form).val() * 60; - config.PostPaddingSeconds = $('#txtPostPaddingMinutes', form).val() * 60; + config.PrePaddingSeconds = $('#txtPrePaddingMinutes', 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 - return false; + // Disable default form submission + return false; } $(document).on('pageinit', "#liveTvSettingsPage", function () { diff --git a/dashboard-ui/scripts/myprofile.js b/dashboard-ui/scripts/myprofile.js index 518d35ef40..e36efa6a0f 100644 --- a/dashboard-ui/scripts/myprofile.js +++ b/dashboard-ui/scripts/myprofile.js @@ -321,6 +321,15 @@ Dashboard.alert(Globalize.translate('PasswordSaved')); loadUser(page); + }, function() { + + Dashboard.hideLoadingMsg(); + + Dashboard.alert({ + title: Globalize.translate('HeaderLoginFailure'), + message: Globalize.translate('MessageInvalidUser') + }); + }); } diff --git a/dashboard-ui/strings/html/en-US.json b/dashboard-ui/strings/html/en-US.json index 614b0173ca..740c327ec4 100644 --- a/dashboard-ui/strings/html/en-US.json +++ b/dashboard-ui/strings/html/en-US.json @@ -1534,6 +1534,6 @@ "ButtonAdvanced": "Advanced", "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.", - "OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to streaming friendly formats.", - "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly for easy playback on any device. This feature requires an active Emby Premiere subscription." + "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." } \ No newline at end of file diff --git a/dashboard-ui/strings/html/server.json b/dashboard-ui/strings/html/server.json index 5f76c3c974..a57b298242 100644 --- a/dashboard-ui/strings/html/server.json +++ b/dashboard-ui/strings/html/server.json @@ -1549,6 +1549,6 @@ "ButtonAdvanced": "Advanced", "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.", - "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." }