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

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