mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update live tv cache location
This commit is contained in:
parent
8522ccbafb
commit
4d8da10b99
2 changed files with 34 additions and 18 deletions
46
dashboard-ui/cordova/iap.js
vendored
46
dashboard-ui/cordova/iap.js
vendored
|
@ -64,29 +64,44 @@
|
||||||
// product attributes:
|
// product attributes:
|
||||||
// https://github.com/j3k0/cordova-plugin-purchase/blob/master/doc/api.md#validation-error-codes
|
// https://github.com/j3k0/cordova-plugin-purchase/blob/master/doc/api.md#validation-error-codes
|
||||||
|
|
||||||
|
if (!product.transaction) {
|
||||||
|
Logger.log('Transaction info missing. Failing validateProduct');
|
||||||
|
callback(false, product);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!product.transaction.id) {
|
||||||
|
Logger.log('Transaction id missing. Failing validateProduct');
|
||||||
|
callback(false, product);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var productId = product.id;
|
var productId = product.id;
|
||||||
var transactionId = product.transaction.id;
|
var transactionId = product.transaction.id;
|
||||||
var receipt = product.transaction.appStoreReceipt;
|
var receipt = product.transaction.appStoreReceipt;
|
||||||
var price = product.price;
|
var price = product.price;
|
||||||
|
|
||||||
var url = ApiClient.getUrl("Appstore/Register");
|
var postData = {
|
||||||
|
store: "Apple",
|
||||||
|
application: "com.emby.mobile",
|
||||||
|
product: productId,
|
||||||
|
type: "Subscription",
|
||||||
|
feature: "MBSClubMonthly",
|
||||||
|
storeToken: receipt,
|
||||||
|
amt: price,
|
||||||
|
storeId: transactionId
|
||||||
|
};
|
||||||
|
|
||||||
|
if (enteredEmail) {
|
||||||
|
postData.email = enteredEmail;
|
||||||
|
}
|
||||||
|
|
||||||
ApiClient.ajax({
|
ApiClient.ajax({
|
||||||
|
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: ApiClient.getUrl("Appstore/Register"),
|
url: ApiClient.getUrl("Appstore/Register"),
|
||||||
data: {
|
data: {
|
||||||
Parameters: JSON.stringify({
|
Parameters: JSON.stringify(postData)
|
||||||
store: "Apple",
|
|
||||||
application: "com.emby.mobile",
|
|
||||||
product: productId,
|
|
||||||
type: "Subscription",
|
|
||||||
feature: "MBSClubMonthly",
|
|
||||||
email: enteredEmail,
|
|
||||||
storeToken: receipt,
|
|
||||||
amt: price,
|
|
||||||
storeId: transactionId
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}).done(function () {
|
}).done(function () {
|
||||||
|
|
||||||
|
@ -95,8 +110,7 @@
|
||||||
|
|
||||||
}).fail(function (e) {
|
}).fail(function (e) {
|
||||||
|
|
||||||
alert('validate fail: ' + e.status + ' ' + url);
|
alert('validate fail');
|
||||||
alert(JSON.stringify(e));
|
|
||||||
callback(false, product);
|
callback(false, product);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -123,6 +137,8 @@
|
||||||
|
|
||||||
if (requiresVerification) {
|
if (requiresVerification) {
|
||||||
store.when(id).verified(function (p) {
|
store.when(id).verified(function (p) {
|
||||||
|
alert('verified');
|
||||||
|
updateProductInfo(p);
|
||||||
p.finish();
|
p.finish();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -134,7 +150,7 @@
|
||||||
if (product.loaded && product.valid && product.state == store.APPROVED) {
|
if (product.loaded && product.valid && product.state == store.APPROVED) {
|
||||||
Logger.log('finishing previously created transaction');
|
Logger.log('finishing previously created transaction');
|
||||||
if (requiresVerification) {
|
if (requiresVerification) {
|
||||||
//product.verify();
|
product.verify();
|
||||||
} else {
|
} else {
|
||||||
product.finish();
|
product.finish();
|
||||||
}
|
}
|
||||||
|
|
4
dashboard-ui/cordova/registrationservices.js
vendored
4
dashboard-ui/cordova/registrationservices.js
vendored
|
@ -214,11 +214,12 @@
|
||||||
|
|
||||||
$(elem).on('iron-overlay-closed', function () {
|
$(elem).on('iron-overlay-closed', function () {
|
||||||
|
|
||||||
if (isCancelled) {
|
|
||||||
clearCurrentDisplayingInfo();
|
clearCurrentDisplayingInfo();
|
||||||
|
|
||||||
|
if (isCancelled) {
|
||||||
deferred.reject();
|
deferred.reject();
|
||||||
}
|
}
|
||||||
|
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -268,7 +269,6 @@
|
||||||
|
|
||||||
isCancelled = false;
|
isCancelled = false;
|
||||||
|
|
||||||
clearCurrentDisplayingInfo();
|
|
||||||
cancelInAppPurchase();
|
cancelInAppPurchase();
|
||||||
deferred.resolve();
|
deferred.resolve();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue