diff --git a/dashboard-ui/bower_components/polymer/.bower.json b/dashboard-ui/bower_components/polymer/.bower.json index 727804326d..d34072056c 100644 --- a/dashboard-ui/bower_components/polymer/.bower.json +++ b/dashboard-ui/bower_components/polymer/.bower.json @@ -1,6 +1,6 @@ { "name": "polymer", - "version": "1.1.4", + "version": "1.1.5", "main": [ "polymer.html" ], @@ -25,11 +25,11 @@ }, "private": true, "homepage": "https://github.com/Polymer/polymer", - "_release": "1.1.4", + "_release": "1.1.5", "_resolution": { "type": "version", - "tag": "v1.1.4", - "commit": "eaedcbc28671ee6cf6a4c0350133bdddfbff50b8" + "tag": "v1.1.5", + "commit": "4c94736fac6681e84ec8c00da53484c5d3c2226b" }, "_source": "git://github.com/Polymer/polymer.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/polymer/bower.json b/dashboard-ui/bower_components/polymer/bower.json index 8bc57dfe26..a7d4b0a726 100644 --- a/dashboard-ui/bower_components/polymer/bower.json +++ b/dashboard-ui/bower_components/polymer/bower.json @@ -1,6 +1,6 @@ { "name": "polymer", - "version": "1.1.4", + "version": "1.1.5", "main": [ "polymer.html" ], diff --git a/dashboard-ui/cordova/android/iap.js b/dashboard-ui/cordova/android/iap.js index 716f4065ca..c2be5bf73b 100644 --- a/dashboard-ui/cordova/android/iap.js +++ b/dashboard-ui/cordova/android/iap.js @@ -5,7 +5,7 @@ function getStoreFeatureId(feature) { if (feature == 'embypremieremonthly') { - return "emby.supporter.weekly"; + return "emby.supporter.monthly"; } return "com.mb.android.unlock"; @@ -39,14 +39,26 @@ return products.length ? products[0] : null; } + var storeReady = false; + function onStoreReady() { + storeReady = true; + refreshPurchases(); + } + function isPurchaseAvailable(feature) { - return NativeIapManager.isStoreAvailable(); + return storeReady; } function beginPurchase(feature, email) { - var id = getStoreFeatureId(feature); - return MainActivity.beginPurchase(id, email); + + if (feature == 'embypremieremonthly') { + return MainActivity.purchasePremiereMonthly(email); + } + if (feature == 'embypremiereweekly') { + return MainActivity.purchasePremiereWeekly(email); + } + return MainActivity.purchaseUnlock(email); } function onPurchaseComplete(result) { @@ -90,10 +102,10 @@ updateProduct: updateProductInfo, beginPurchase: beginPurchase, onPurchaseComplete: onPurchaseComplete, - getStoreFeatureId: getStoreFeatureId, - getSubscriptionOptions: getSubscriptionOptions + getSubscriptionOptions: getSubscriptionOptions, + onStoreReady: onStoreReady }; - refreshPurchases(); + NativeIapManager.initStore(); })(); \ No newline at end of file diff --git a/dashboard-ui/cordova/iap.js b/dashboard-ui/cordova/iap.js index 4dad7d6fe1..54933a92fd 100644 --- a/dashboard-ui/cordova/iap.js +++ b/dashboard-ui/cordova/iap.js @@ -1,6 +1,7 @@ (function () { var updatedProducts = []; + var enteredEmail; function getStoreFeatureId(feature) { @@ -41,6 +42,11 @@ } function beginPurchase(feature, email) { + + if (email) { + enteredEmail = email; + } + var id = getStoreFeatureId(feature); store.order(id); } @@ -54,32 +60,45 @@ // product attributes: // https://github.com/j3k0/cordova-plugin-purchase/blob/master/doc/api.md#validation-error-codes - alert(JSON.stringify(product)); - alert(JSON.stringify(product.transaction)); + var productId = product.id; + var transactionId = product.transaction.id; + var receipt = product.transaction.appStoreReceipt; + var price = product.price; - callback(true, { + HttpClient.send({ + type: "POST", + url: "https://mb3admin.com/test/admin/service/appstore/register", + contentType: 'application/x-www-form-urlencoded; charset=UTF-8', + data: { + store: "Apple", + application: "com.emby.mobile", + product: productId, + type: "Subscription", + feature: "MBSClubMonthly", + email: enteredEmail, + token: receipt, + amt: price, + storeId: transactionId + }, + headers: { + "X-Emby-Token": "08606E86D043" + } + }).done(function () { + + callback(true, product); + + }).fail(function () { + + callback(false, product); }); - - //callback(true, { ... transaction details ... }); // success! - - //// OR - //callback(false, { - // error: { - // code: store.PURCHASE_EXPIRED, - // message: "XYZ" - // } - //}); - - //// OR - //callback(false, "Impossible to proceed with validation"); } - function initProduct(id, alias, type) { + function initProduct(id, requiresVerification, type) { store.register({ id: id, - alias: alias, + alias: id, type: type }); @@ -87,12 +106,12 @@ // show some logs and finish the transaction. store.when(id).approved(function (product) { - product.finish(); - //if (product.type == store.PAID_SUBSCRIPTION) { - // product.verify(); - //} else { - // product.finish(); - //} + //product.finish(); + if (requiresVerification) { + product.verify(); + } else { + product.finish(); + } }); store.when(id).verified(function (p) { @@ -105,7 +124,11 @@ if (product.loaded && product.valid && product.state == store.APPROVED) { Logger.log('finishing previously created transaction'); - product.finish(); + if (requiresVerification) { + product.verify(); + } else { + product.finish(); + } } updateProductInfo(product); }); @@ -119,8 +142,8 @@ store.validator = validateProduct; - initProduct(getStoreFeatureId(""), "premium features", store.NON_CONSUMABLE); - initProduct(getStoreFeatureId("embypremieremonthly"), "emby premiere monthly", store.PAID_SUBSCRIPTION); + initProduct(getStoreFeatureId(""), false, store.NON_CONSUMABLE); + initProduct(getStoreFeatureId("embypremieremonthly"), true, store.PAID_SUBSCRIPTION); // When every goes as expected, it's time to celebrate! // The "ready" event should be welcomed with music and fireworks, @@ -163,7 +186,6 @@ getProductInfo: getProduct, beginPurchase: beginPurchase, restorePurchase: restorePurchase, - getStoreFeatureId: getStoreFeatureId, getSubscriptionOptions: getSubscriptionOptions }; diff --git a/dashboard-ui/cordova/registrationservices.js b/dashboard-ui/cordova/registrationservices.js index f98a975133..de20473a5b 100644 --- a/dashboard-ui/cordova/registrationservices.js +++ b/dashboard-ui/cordova/registrationservices.js @@ -13,8 +13,6 @@ function validateFeature(feature, deferred) { - var id = IapManager.getStoreFeatureId(feature); - if (validatedFeatures.indexOf(feature) != -1) { deferred.resolve(); return; @@ -23,7 +21,7 @@ var info = IapManager.getProductInfo(feature) || {}; if (info.owned) { - notifyServer(id); + notifyServer(info.id); validatedFeatures.push(feature); deferred.resolve(); return; @@ -31,7 +29,7 @@ var unlockableProductInfo = IapManager.isPurchaseAvailable(feature) ? { enableAppUnlock: IapManager.isPurchaseAvailable(feature), - id: id, + id: info.id, price: info.price, feature: feature @@ -211,7 +209,7 @@ $('.btnRestorePurchase', elem).on('click', function () { isCancelled = false; - IapManager.restorePurchase(info.feature); + IapManager.restorePurchase(); }); $(elem).on('iron-overlay-closed', function () { diff --git a/dashboard-ui/scripts/sections.js b/dashboard-ui/scripts/sections.js index 1c00099a22..1a43989bd9 100644 --- a/dashboard-ui/scripts/sections.js +++ b/dashboard-ui/scripts/sections.js @@ -363,17 +363,23 @@ if (items.length) { - var cssClass = index !== 0 ? 'listHeader' : 'listHeader'; + var screenWidth = $(window).width(); html += '
'; - html += '

' + Globalize.translate('HeaderMyMedia') + '

'; + html += '

' + Globalize.translate('HeaderMyMedia') + '

'; html += '
'; - html += '
'; + var scrollX = enableScrollX() && $.browser.safari && screenWidth > 800; + + if (scrollX) { + html += '
'; + } else { + html += '
'; + } html += LibraryBrowser.getPosterViewHtml({ items: items, - shape: shape, + shape: scrollX ? 'overflowBackdrop' : shape, showTitle: showTitles, centerText: true, lazy: true, diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 819265f925..2fb0370906 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -95,7 +95,7 @@ var Dashboard = { var url = data.url.toLowerCase(); // Don't bounce to login on failures to contact our external servers - if (url.indexOf('emby.media') != -1) { + if (url.indexOf('emby.media') != -1 || url.indexOf('mb3admin.com') != -1) { Dashboard.hideLoadingMsg(); return; } diff --git a/dashboard-ui/themes/ios.css b/dashboard-ui/themes/ios.css index 275575449a..5ec07ebb40 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, #282828, #101010); + background: #181818; } .backdropContainer .pageBackground { diff --git a/dashboard-ui/tvproviders/schedulesdirect.js b/dashboard-ui/tvproviders/schedulesdirect.js index 9ecd3478af..f647f0214a 100644 --- a/dashboard-ui/tvproviders/schedulesdirect.js +++ b/dashboard-ui/tvproviders/schedulesdirect.js @@ -19,10 +19,16 @@ listingsId = info.ListingsId; $('#selectListing', page).val(info.ListingsId || ''); page.querySelector('.txtUser').value = info.Username || ''; - page.querySelector('.txtPass').value = info.Username || ''; + page.querySelector('.txtPass').value = ''; page.querySelector('.txtZipCode').value = info.ZipCode || ''; + if (info.Username && info.Password) { + page.querySelector('.listingsSection').classList.remove('hide'); + } else { + page.querySelector('.listingsSection').classList.add('hide'); + } + setCountry(info); }); } diff --git a/dashboard-ui/tvproviders/schedulesdirect.template.html b/dashboard-ui/tvproviders/schedulesdirect.template.html index 2177f4f6a4..b79e13cfc4 100644 --- a/dashboard-ui/tvproviders/schedulesdirect.template.html +++ b/dashboard-ui/tvproviders/schedulesdirect.template.html @@ -28,34 +28,36 @@


-
-
- 2 -
-
- ${GuideProviderSelectListings} -
-
-
-
-
-
- - +
+
+
+ 2
-
- -
-
-
- - -
-
- - ${ButtonCancel} +
+ ${GuideProviderSelectListings}
- \ No newline at end of file +
+
+
+
+ + +
+
+ +
+
+
+ + +
+
+ + ${ButtonCancel} +
+
+
+
\ No newline at end of file