1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update live tv database

This commit is contained in:
Luke Pulverenti 2015-06-01 10:49:23 -04:00
parent 8e0dc6d8e4
commit d4abbd5560
9 changed files with 116 additions and 25 deletions

View file

@ -9,10 +9,14 @@
return r.id != id;
});
updatedProducts.push({
var product = {
id: id,
owned: owned
});
};
updatedProducts.push(product);
Events.trigger(IapManager, 'productupdated', [product]);
}
function hasPurchased(id) {
@ -39,7 +43,14 @@
}
function onPurchaseComplete(result) {
alert(result);
if (result) {
refreshPurchases();
}
}
function refreshPurchases() {
NativeIapManager.isPurchased(unlockId, "window.IapManager.updateProduct");
}
window.IapManager = {
@ -50,6 +61,6 @@
onPurchaseComplete: onPurchaseComplete
};
NativeIapManager.isPurchased(unlockId, "window.IapManager.updateProduct");
refreshPurchases();
})();

View file

@ -139,11 +139,30 @@
return deferred.promise();
};
function getCacheKey(url) {
// Try to strip off the domain to share the cache between local and remote connections
var index = url.indexOf('://');
if (index != -1) {
url = url.substring(index + 3);
index = url.indexOf('/');
if (index != -1) {
url = url.substring(index + 1);
}
}
return CryptoJS.MD5(url).toString();
}
self.getImageUrl = function (originalUrl) {
console.log('getImageUrl:' + originalUrl);
var key = CryptoJS.MD5(originalUrl + "1").toString();
var key = getCacheKey(originalUrl);
var deferred = DeferredBuilder.Deferred();