1
0
Fork 0
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:
Luke Pulverenti 2015-12-01 23:15:58 -05:00
parent 5200b37787
commit 96eb9ea63a
7 changed files with 34 additions and 33 deletions

View file

@ -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;
});
});
}