From 6a162d400167e549f206ccb22886aa63cffe3767 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 26 Oct 2015 12:21:00 -0400 Subject: [PATCH] fix cinema mode failure --- .../medialibrarycreator/medialibrarycreator.js | 2 +- .../medialibraryeditor/medialibraryeditor.js | 2 +- dashboard-ui/css/card.css | 2 +- dashboard-ui/scripts/htmlmediarenderer.js | 9 ++++++++- dashboard-ui/scripts/useredit.js | 14 ++++++++++++++ dashboard-ui/scripts/wizarduserpage.js | 11 ++++++++++- dashboard-ui/strings/javascript/javascript.json | 5 ++++- dashboard-ui/themes/halloween/theme.js | 4 ++-- 8 files changed, 41 insertions(+), 8 deletions(-) diff --git a/dashboard-ui/components/medialibrarycreator/medialibrarycreator.js b/dashboard-ui/components/medialibrarycreator/medialibrarycreator.js index 7614d0801..d3af649c5 100644 --- a/dashboard-ui/components/medialibrarycreator/medialibrarycreator.js +++ b/dashboard-ui/components/medialibrarycreator/medialibrarycreator.js @@ -31,7 +31,7 @@ }).fail(function () { - Dashboard.showError(Globalize.translate('DefaultErrorMessage')); + Dashboard.showError(Globalize.translate('ErrorAddingMediaPathToVirtualFolder')); }); return false; diff --git a/dashboard-ui/components/medialibraryeditor/medialibraryeditor.js b/dashboard-ui/components/medialibraryeditor/medialibraryeditor.js index 0e163e0d0..184e0b3e9 100644 --- a/dashboard-ui/components/medialibraryeditor/medialibraryeditor.js +++ b/dashboard-ui/components/medialibraryeditor/medialibraryeditor.js @@ -17,7 +17,7 @@ }).fail(function () { - Dashboard.showError(Globalize.translate('DefaultErrorMessage')); + Dashboard.showError(Globalize.translate('ErrorAddingMediaPathToVirtualFolder')); }); } diff --git a/dashboard-ui/css/card.css b/dashboard-ui/css/card.css index 237ceeccc..513fc2c09 100644 --- a/dashboard-ui/css/card.css +++ b/dashboard-ui/css/card.css @@ -201,7 +201,7 @@ } .cardContent .cardFooter:not(.fullCardFooter) { - background: rgba(0, 0, 0, .5) !important; + background: rgba(0, 0, 0, .6) !important; } .lightCardFooter { diff --git a/dashboard-ui/scripts/htmlmediarenderer.js b/dashboard-ui/scripts/htmlmediarenderer.js index cc8b2b2c8..c3b342776 100644 --- a/dashboard-ui/scripts/htmlmediarenderer.js +++ b/dashboard-ui/scripts/htmlmediarenderer.js @@ -301,7 +301,14 @@ if (isViblastStarted) { _currentTime = mediaElement.currentTime; - viblast('#' + mediaElement.id).stop(); + // Sometimes this fails + try { + viblast('#' + mediaElement.id).stop(); + } + catch (err) { + Logger.log(err); + } + isViblastStarted = false; } } diff --git a/dashboard-ui/scripts/useredit.js b/dashboard-ui/scripts/useredit.js index 4e4cac7ca..8d846822b 100644 --- a/dashboard-ui/scripts/useredit.js +++ b/dashboard-ui/scripts/useredit.js @@ -77,6 +77,13 @@ callback: actionCallback + }); + }).fail(function () { + + Dashboard.alert({ + + message: Globalize.translate('ErrorRemovingEmbyConnectAccount') + }); }); @@ -102,6 +109,13 @@ callback: actionCallback + }).fail(function () { + + Dashboard.alert({ + + message: Globalize.translate('ErrorAddingEmbyConnectAccount') + + }); }); }); } else { diff --git a/dashboard-ui/scripts/wizarduserpage.js b/dashboard-ui/scripts/wizarduserpage.js index c55d81776..326139f52 100644 --- a/dashboard-ui/scripts/wizarduserpage.js +++ b/dashboard-ui/scripts/wizarduserpage.js @@ -45,7 +45,16 @@ url: apiClient.getUrl('Startup/User'), dataType: 'json' - }).done(onUpdateUserComplete); + }).done(onUpdateUserComplete).fail(function () { + + var msgKey = form.querySelector('#txtConnectUserName').value ? 'ErrorAddingEmbyConnectAccount' : 'DefaultErrorMessage'; + + Dashboard.alert({ + + message: Globalize.translate(msgKey) + + }); + }); } function onSubmit() { diff --git a/dashboard-ui/strings/javascript/javascript.json b/dashboard-ui/strings/javascript/javascript.json index 50b048514..6340be86c 100644 --- a/dashboard-ui/strings/javascript/javascript.json +++ b/dashboard-ui/strings/javascript/javascript.json @@ -922,5 +922,8 @@ "HeaderTryMicrosoftEdge": "Try Microsoft Edge", "MessageTryMicrosoftEdge": "For a better experience on Windows 10, try the new Microsoft Edge Browser.", "ErrorAddingListingsToSchedulesDirect": "There was an error adding the lineup to your Schedules Direct account. Schedules Direct only allows a limited number of lineups per account. You may need to log into the Schedules Direct website and remove others listings from your account before proceeeding.", - "PleaseAddAtLeastOneFolder": "Please add at least one folder to this library by clicking the Add button." + "PleaseAddAtLeastOneFolder": "Please add at least one folder to this library by clicking the Add button.", + "ErrorAddingMediaPathToVirtualFolder": "There was an error adding the media path. Please ensure the path is valid and the Emby Server process has access to that location.", + "ErrorRemovingEmbyConnectAccount": "There was an error removing the Emby Connect account. Please ensure you have an active internet connection and try again.", + "ErrorAddingEmbyConnectAccount": "There was an error adding the Emby Connect account. Please ensure the Emby account has been activated by following the instructions in the email sent after creating the account. If this email was not received please send an email to apps@emby.media from the email address used with the Emby account." } diff --git a/dashboard-ui/themes/halloween/theme.js b/dashboard-ui/themes/halloween/theme.js index 61d56cc44..c0ba3c351 100644 --- a/dashboard-ui/themes/halloween/theme.js +++ b/dashboard-ui/themes/halloween/theme.js @@ -4,8 +4,8 @@ var iconCreated; var destroyed; var currentSound; - var cancelKey = 'cancelHalloween'; - var cancelValue = '5'; + var cancelKey = 'cancelHalloween2015'; + var cancelValue = '6'; function onPageShow() { var page = this;