diff --git a/dashboard-ui/bower_components/emby-apiclient/.bower.json b/dashboard-ui/bower_components/emby-apiclient/.bower.json index 2ec3d5c76..47c6f055a 100644 --- a/dashboard-ui/bower_components/emby-apiclient/.bower.json +++ b/dashboard-ui/bower_components/emby-apiclient/.bower.json @@ -16,12 +16,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.1.113", - "_release": "1.1.113", + "version": "1.1.114", + "_release": "1.1.114", "_resolution": { "type": "version", - "tag": "1.1.113", - "commit": "69a87cba28f55f11fcef19cef9e71329623c4635" + "tag": "1.1.114", + "commit": "48c97330f32bf96d488c71e922fd7258916b82cb" }, "_source": "https://github.com/MediaBrowser/Emby.ApiClient.Javascript.git", "_target": "^1.1.51", diff --git a/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js b/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js index 58f9dac64..ca6f0ea0a 100644 --- a/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js +++ b/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js @@ -357,6 +357,8 @@ function onConnectUserSignIn(user) { + appStorage.removeItem('lastLocalServerId'); + connectUser = user; events.trigger(self, 'connectusersignedin', [user]); } @@ -462,6 +464,12 @@ function onLocalUserSignIn(server, connectionMode, user) { + if (self.connectUserId()) { + appStorage.removeItem('lastLocalServerId'); + } else { + appStorage.setItem('lastLocalServerId', server.Id); + } + // Ensure this is created so that listeners of the event can get the apiClient instance getOrAddApiClient(server, connectionMode); @@ -475,29 +483,26 @@ function ensureConnectUser(credentials) { - return new Promise(function (resolve, reject) { + if (connectUser && connectUser.Id === credentials.ConnectUserId) { + return Promise.resolve(); + } - if (connectUser && connectUser.Id === credentials.ConnectUserId) { - resolve(); - } + else if (credentials.ConnectUserId && credentials.ConnectAccessToken) { - else if (credentials.ConnectUserId && credentials.ConnectAccessToken) { + connectUser = null; - connectUser = null; + return getConnectUser(credentials.ConnectUserId, credentials.ConnectAccessToken).then(function (user) { - getConnectUser(credentials.ConnectUserId, credentials.ConnectAccessToken).then(function (user) { + onConnectUserSignIn(user); + return Promise.resolve(); - onConnectUserSignIn(user); - resolve(); + }, function () { + return Promise.resolve(); + }); - }, function () { - resolve(); - }); - - } else { - resolve(); - } - }); + } else { + return Promise.resolve(); + } } function getConnectUrl(handler) { @@ -732,6 +737,10 @@ } } + if (credentials.ConnectAccessToken) { + appStorage.removeItem('lastLocalServerId'); + } + credentials.Servers = servers; credentials.ConnectAccessToken = null; credentials.ConnectUserId = null; @@ -930,9 +939,18 @@ console.log('Begin connectToServers, with ' + servers.length + ' servers'); - if (servers.length === 1) { + var defaultServer = servers.length === 1 ? servers[0] : null; - return self.connectToServer(servers[0], options).then(function (result) { + if (!defaultServer) { + var lastLocalServerId = appStorage.getItem('lastLocalServerId'); + defaultServer = servers.filter(function (s) { + return s.Id === lastLocalServerId; + })[0]; + } + + if (defaultServer) { + + return self.connectToServer(defaultServer, options).then(function (result) { if (result.State === ConnectionState.Unavailable) { diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index c6a81c33d..90af38ef5 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -14,12 +14,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.4.467", - "_release": "1.4.467", + "version": "1.4.468", + "_release": "1.4.468", "_resolution": { "type": "version", - "tag": "1.4.467", - "commit": "bd1118e1637ab6edef1c61eb66593171eea35962" + "tag": "1.4.468", + "commit": "3f10ed5f1938f5c1c9eb84f1f36e3b8606f03b88" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.1", diff --git a/dashboard-ui/bower_components/emby-webcomponents/registrationservices/registrationservices.js b/dashboard-ui/bower_components/emby-webcomponents/registrationservices/registrationservices.js index 624c922fe..cea6a64a3 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/registrationservices/registrationservices.js +++ b/dashboard-ui/bower_components/emby-webcomponents/registrationservices/registrationservices.js @@ -151,20 +151,20 @@ return Promise.resolve(); } - var settingsKey = 'periodicmessage-' + feature; + var settingsKey = 'periodicmessage2-' + feature; var lastMessage = parseInt(appSettings.get(settingsKey) || '0'); if (!lastMessage) { // Don't show on the very first playback attempt - appSettings.set(settingsKey, new Date().getTime()); + appSettings.set(settingsKey, new Date().getTime() - intervalMs); return Promise.resolve(); } if ((new Date().getTime() - lastMessage) > intervalMs) { - connectionManager.currentApiClient().getPluginSecurityInfo().then(function (regInfo) { + return connectionManager.currentApiClient().getPluginSecurityInfo().then(function (regInfo) { if (regInfo.IsMBSupporter) { appSettings.set(settingsKey, new Date().getTime()); diff --git a/dashboard-ui/bower_components/emby-webcomponents/scroller/smoothscroller.js b/dashboard-ui/bower_components/emby-webcomponents/scroller/smoothscroller.js index 013fc0248..d4d41697d 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/scroller/smoothscroller.js +++ b/dashboard-ui/bower_components/emby-webcomponents/scroller/smoothscroller.js @@ -806,7 +806,9 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'scrollStyles'], func capture: true }); - dragSourceElement.removeEventListener('mousedown', dragInitSlidee); + dom.removeEventListener(dragSourceElement, 'mousedown', dragInitSlidee, { + //passive: true + }); // Reset initialized status and return the instance self.initialized = 0; @@ -880,7 +882,12 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'scrollStyles'], func } } - dragSourceElement.addEventListener('mousedown', dragInitSlidee); + if (o.horizontal || transform) { + // This can prevent others from being able to listen to mouse events + dom.addEventListener(dragSourceElement, 'mousedown', dragInitSlidee, { + //passive: true + }); + } if (transform) { diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/es-MX.json b/dashboard-ui/bower_components/emby-webcomponents/strings/es-MX.json index 016fbddc5..b56516215 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/es-MX.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/es-MX.json @@ -379,5 +379,5 @@ "Retry": "Volver a intentar", "HeaderMyDevice": "Mi Dispositivo", "MediaQueued": "Medios en cola.", - "ContinuingInSecondsValue": "Continuing in {0} seconds." + "ContinuingInSecondsValue": "Continuando en {0} segundos." } \ No newline at end of file diff --git a/dashboard-ui/components/iap.js b/dashboard-ui/components/iap.js index a700304b9..106379086 100644 --- a/dashboard-ui/components/iap.js +++ b/dashboard-ui/components/iap.js @@ -54,7 +54,7 @@ function getPeriodicMessageIntervalMs(feature) { if (feature === 'playback') { - return 172800000; + return 43200000; } return 0; diff --git a/dashboard-ui/scripts/homenextup.js b/dashboard-ui/scripts/homenextup.js index 28961ad6a..cc27ea01b 100644 --- a/dashboard-ui/scripts/homenextup.js +++ b/dashboard-ui/scripts/homenextup.js @@ -38,7 +38,7 @@ preferThumb: true, showDetailsMenu: true, centerText: !supportsImageAnalysis, - overlayPlayButton: AppInfo.enableAppLayouts && !supportsImageAnalysis, + overlayPlayButton: true, context: 'home-nextup', cardLayout: supportsImageAnalysis, vibrant: supportsImageAnalysis