mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update startup dependencies
This commit is contained in:
parent
5200b37787
commit
96eb9ea63a
7 changed files with 34 additions and 33 deletions
41
dashboard-ui/cordova/android/iap.js
vendored
41
dashboard-ui/cordova/android/iap.js
vendored
|
@ -110,40 +110,37 @@
|
|||
|
||||
function isUnlockedOverride(feature) {
|
||||
|
||||
var deferred = DeferredBuilder.Deferred();
|
||||
|
||||
if (feature == 'playback' || feature == 'livetv') {
|
||||
isPlaybackUnlockedViaOldApp(deferred);
|
||||
return isPlaybackUnlockedViaOldApp();
|
||||
} else {
|
||||
deferred.resolveWith(null, [false]);
|
||||
}
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
return deferred.promise();
|
||||
resolve(false);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function isPlaybackUnlockedViaOldApp(deferred) {
|
||||
function isPlaybackUnlockedViaOldApp() {
|
||||
|
||||
testDeviceId(ConnectionManager.deviceId()).then(function (isUnlocked) {
|
||||
return testDeviceId(ConnectionManager.deviceId()).then(function (isUnlocked) {
|
||||
|
||||
if (isUnlocked) {
|
||||
deferred.resolveWith(null, [true]);
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
var legacyDeviceId = NativeIapManager.getLegacyDeviceId();
|
||||
if (legacyDeviceId) {
|
||||
testDeviceId(legacyDeviceId).then(function(isUnlocked) {
|
||||
return testDeviceId(device.uuid).then(function (isUnlocked) {
|
||||
|
||||
if (isUnlocked) {
|
||||
deferred.resolveWith(null, [true]);
|
||||
return;
|
||||
}
|
||||
if (isUnlocked) {
|
||||
return true;
|
||||
}
|
||||
|
||||
deferred.resolveWith(null, [false]);
|
||||
});
|
||||
} else {
|
||||
deferred.resolveWith(null, [false]);
|
||||
}
|
||||
var legacyDeviceId = MainActivity.getLegacyDeviceId();
|
||||
if (legacyDeviceId) {
|
||||
return testDeviceId(legacyDeviceId);
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue