mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update schedules direct mapping
This commit is contained in:
parent
bd43e4e167
commit
c97c4ac4e3
10 changed files with 126 additions and 80 deletions
26
dashboard-ui/cordova/android/iap.js
vendored
26
dashboard-ui/cordova/android/iap.js
vendored
|
@ -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();
|
||||
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue