diff --git a/dashboard-ui/apiclient/apiclient.js b/dashboard-ui/apiclient/apiclient.js index 74a1debbe2..663a32f13e 100644 --- a/dashboard-ui/apiclient/apiclient.js +++ b/dashboard-ui/apiclient/apiclient.js @@ -138,6 +138,30 @@ }]); } + self.setRequestHeaders = function(headers) { + + var currentServerInfo = self.serverInfo(); + + if (clientName) { + + var auth = 'MediaBrowser Client="' + clientName + '", Device="' + deviceName + '", DeviceId="' + deviceId + '", Version="' + applicationVersion + '"'; + + var userId = currentServerInfo.UserId; + + if (userId) { + auth += ', UserId="' + userId + '"'; + } + + headers.Authorization = auth; + } + + var accessToken = currentServerInfo.AccessToken; + + if (accessToken) { + headers['X-MediaBrowser-Token'] = accessToken; + } + }; + /** * Wraps around jQuery ajax methods to add additional info to the request. */ @@ -149,28 +173,8 @@ if (includeAuthorization !== false) { - var currentServerInfo = self.serverInfo(); - - if (clientName) { - - var auth = 'MediaBrowser Client="' + clientName + '", Device="' + deviceName + '", DeviceId="' + deviceId + '", Version="' + applicationVersion + '"'; - - var userId = currentServerInfo.UserId; - - if (userId) { - auth += ', UserId="' + userId + '"'; - } - - request.headers = { - Authorization: auth - }; - } - - var accessToken = currentServerInfo.AccessToken; - - if (accessToken) { - request.headers['X-MediaBrowser-Token'] = accessToken; - } + request.headers = {}; + self.setRequestHeaders(request.headers); } if (self.enableAutomaticNetworking === false || request.type != "GET") { @@ -521,7 +525,7 @@ } else { // If that produced a fairly high speed, try again with a larger size to get a more accurate result - self.getDownloadSpeed(2000000).done(function (bitrate) { + self.getDownloadSpeed(3000000).done(function (bitrate) { deferred.resolveWith(null, [Math.round(bitrate * .8)]); diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/.bower.json b/dashboard-ui/bower_components/iron-a11y-announcer/.bower.json index 786e569307..422f44ae6e 100644 --- a/dashboard-ui/bower_components/iron-a11y-announcer/.bower.json +++ b/dashboard-ui/bower_components/iron-a11y-announcer/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-a11y-announcer", - "version": "1.0.1", + "version": "1.0.2", "description": "A singleton element that simplifies announcing text to screen readers.", "keywords": [ "web-components", @@ -30,11 +30,11 @@ "web-component-tester": "*" }, "homepage": "https://github.com/polymerelements/iron-a11y-announcer", - "_release": "1.0.1", + "_release": "1.0.2", "_resolution": { "type": "version", - "tag": "v1.0.1", - "commit": "699697fe8935400ab11e3e33cd6a5a54d762300e" + "tag": "v1.0.2", + "commit": "6010b30a67a12333f76394a558c820db727f7c84" }, "_source": "git://github.com/polymerelements/iron-a11y-announcer.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/bower.json b/dashboard-ui/bower_components/iron-a11y-announcer/bower.json index cbe80e0a6b..1a2bf2e462 100644 --- a/dashboard-ui/bower_components/iron-a11y-announcer/bower.json +++ b/dashboard-ui/bower_components/iron-a11y-announcer/bower.json @@ -1,6 +1,6 @@ { "name": "iron-a11y-announcer", - "version": "1.0.1", + "version": "1.0.2", "description": "A singleton element that simplifies announcing text to screen readers.", "keywords": [ "web-components", diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/iron-a11y-announcer.html b/dashboard-ui/bower_components/iron-a11y-announcer/iron-a11y-announcer.html index 87e2be1ab0..49067880d5 100644 --- a/dashboard-ui/bower_components/iron-a11y-announcer/iron-a11y-announcer.html +++ b/dashboard-ui/bower_components/iron-a11y-announcer/iron-a11y-announcer.html @@ -114,7 +114,7 @@ Note: announcements are only audible if you have a screen reader enabled. Polymer.IronA11yAnnouncer.requestAvailability = function() { if (!Polymer.IronA11yAnnouncer.instance) { - document.createElement('iron-a11y-announcer'); + Polymer.IronA11yAnnouncer.instance = document.createElement('iron-a11y-announcer'); } document.body.appendChild(Polymer.IronA11yAnnouncer.instance); diff --git a/dashboard-ui/bower_components/iron-form-element-behavior/.bower.json b/dashboard-ui/bower_components/iron-form-element-behavior/.bower.json index f1369b1635..1e354dbde9 100644 --- a/dashboard-ui/bower_components/iron-form-element-behavior/.bower.json +++ b/dashboard-ui/bower_components/iron-form-element-behavior/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-form-element-behavior", - "version": "1.0.1", + "version": "1.0.2", "license": "http://polymer.github.io/LICENSE.txt", "private": true, "main": "iron-form-element-behavior", @@ -22,14 +22,15 @@ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0", "web-component-tester": "*", - "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.0" }, "homepage": "https://github.com/PolymerElements/iron-form-element-behavior", - "_release": "1.0.1", + "_release": "1.0.2", "_resolution": { "type": "version", - "tag": "v1.0.1", - "commit": "f386143e866c320025589f3d79798c12103377a4" + "tag": "v1.0.2", + "commit": "3d46178a7cd9e4025004476a8fd0eef7a5416cd3" }, "_source": "git://github.com/PolymerElements/iron-form-element-behavior.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-form-element-behavior/bower.json b/dashboard-ui/bower_components/iron-form-element-behavior/bower.json index 1e141f2c61..359b3c0d64 100644 --- a/dashboard-ui/bower_components/iron-form-element-behavior/bower.json +++ b/dashboard-ui/bower_components/iron-form-element-behavior/bower.json @@ -1,6 +1,6 @@ { "name": "iron-form-element-behavior", - "version": "1.0.1", + "version": "1.0.2", "license": "http://polymer.github.io/LICENSE.txt", "private": true, "main": "iron-form-element-behavior", @@ -22,6 +22,7 @@ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0", "web-component-tester": "*", - "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.0" } } diff --git a/dashboard-ui/bower_components/iron-form-element-behavior/demo/index.html b/dashboard-ui/bower_components/iron-form-element-behavior/demo/index.html index b40998de4d..ae3cb09e8d 100644 --- a/dashboard-ui/bower_components/iron-form-element-behavior/demo/index.html +++ b/dashboard-ui/bower_components/iron-form-element-behavior/demo/index.html @@ -19,35 +19,50 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + + - +
-