From 65442321a05a1c5778169a87b88b8909084a023b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 6 Oct 2015 10:59:42 -0400 Subject: [PATCH] retry image saving to internal location --- dashboard-ui/apiclient/apiclient.js | 4 ++-- dashboard-ui/apiclient/connectionmanager.js | 6 +++--- .../bower_components/iron-behaviors/.bower.json | 6 +++--- dashboard-ui/cordova/iap.js | 11 +++++++++-- dashboard-ui/themes/ios.css | 2 +- 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/dashboard-ui/apiclient/apiclient.js b/dashboard-ui/apiclient/apiclient.js index d023a534e..bff043df1 100644 --- a/dashboard-ui/apiclient/apiclient.js +++ b/dashboard-ui/apiclient/apiclient.js @@ -355,8 +355,8 @@ if (!url) { throw new Error("serverAddress is yet not set"); } - - if (url.toLowerCase().indexOf('/emby') == -1) { + var lowered = url.toLowerCase(); + if (lowered.indexOf('/emby') == -1 && lowered.indexOf('/mediabrowser') == -1) { url += '/emby'; } diff --git a/dashboard-ui/apiclient/connectionmanager.js b/dashboard-ui/apiclient/connectionmanager.js index 6ea1e10ce..3bd2ebc61 100644 --- a/dashboard-ui/apiclient/connectionmanager.js +++ b/dashboard-ui/apiclient/connectionmanager.js @@ -410,7 +410,7 @@ url: url, dataType: "json", headers: { - "X-Emby-Token": server.ExchangeToken + "X-MediaBrowser-Token": server.ExchangeToken } }).done(function (auth) { @@ -437,7 +437,7 @@ url: getEmbyServerUrl(url, "System/Info"), dataType: "json", headers: { - "X-Emby-Token": server.AccessToken + "X-MediaBrowser-Token": server.AccessToken } }).done(function (systemInfo) { @@ -452,7 +452,7 @@ url: getEmbyServerUrl(url, "users/" + server.UserId), dataType: "json", headers: { - "X-Emby-Token": server.AccessToken + "X-MediaBrowser-Token": server.AccessToken } }).done(function (user) { diff --git a/dashboard-ui/bower_components/iron-behaviors/.bower.json b/dashboard-ui/bower_components/iron-behaviors/.bower.json index f49935188..5d7b926af 100644 --- a/dashboard-ui/bower_components/iron-behaviors/.bower.json +++ b/dashboard-ui/bower_components/iron-behaviors/.bower.json @@ -27,14 +27,14 @@ "web-component-tester": "*", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "homepage": "https://github.com/PolymerElements/iron-behaviors", + "homepage": "https://github.com/polymerelements/iron-behaviors", "_release": "1.0.8", "_resolution": { "type": "version", "tag": "v1.0.8", "commit": "663ad706b43989f4961d945b8116cf4db346532f" }, - "_source": "git://github.com/PolymerElements/iron-behaviors.git", + "_source": "git://github.com/polymerelements/iron-behaviors.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/iron-behaviors" + "_originalSource": "polymerelements/iron-behaviors" } \ No newline at end of file diff --git a/dashboard-ui/cordova/iap.js b/dashboard-ui/cordova/iap.js index 587279e5c..ee18d271e 100644 --- a/dashboard-ui/cordova/iap.js +++ b/dashboard-ui/cordova/iap.js @@ -54,6 +54,8 @@ // product attributes: // https://github.com/j3k0/cordova-plugin-purchase/blob/master/doc/api.md#validation-error-codes + alert(JSON.stringify(product.transaction)); + callback(true, { }); @@ -82,8 +84,13 @@ // When purchase of the full version is approved, // show some logs and finish the transaction. - store.when(id).approved(function (order) { - order.finish(); + store.when(id).approved(function (product) { + + if (product.type == store.PAID_SUBSCRIPTION) { + product.verify(); + } else { + product.finish(); + } }); store.when(id).verified(function (p) { diff --git a/dashboard-ui/themes/ios.css b/dashboard-ui/themes/ios.css index c3fb2f4aa..fb4a859e2 100644 --- a/dashboard-ui/themes/ios.css +++ b/dashboard-ui/themes/ios.css @@ -33,7 +33,7 @@ body { } .background-theme-b, paper-dialog.background-theme-b { - background: radial-gradient(circle, #303030, #101010) fixed; + background: radial-gradient(circle, #303030, #101010); } .backdropContainer .pageBackground {