update components
This commit is contained in:
parent
746135c2f7
commit
95e11bfdf0
4 changed files with 63 additions and 9 deletions
|
@ -16,12 +16,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.1.98",
|
"version": "1.1.99",
|
||||||
"_release": "1.1.98",
|
"_release": "1.1.99",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.1.98",
|
"tag": "1.1.99",
|
||||||
"commit": "2c4731c06ef514ea295b8e9528d14a1de822d5e3"
|
"commit": "dd95a9e2d720c1ec148b46389b9ba513d72af231"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "~1.1.5",
|
"_target": "~1.1.5",
|
||||||
|
|
|
@ -54,12 +54,66 @@ define(['cryptojs-md5'], function () {
|
||||||
|
|
||||||
imageCacheDirectoryEntry = dirEntry;
|
imageCacheDirectoryEntry = dirEntry;
|
||||||
|
|
||||||
|
// TODO: find a better time to schedule this
|
||||||
|
setTimeout(cleanCache, 60000);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function toArray(list) {
|
||||||
|
return Array.prototype.slice.call(list || [], 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
function cleanCache() {
|
||||||
|
|
||||||
|
var dirReader = imageCacheDirectoryEntry.createReader();
|
||||||
|
var entries = [];
|
||||||
|
|
||||||
|
var onReadFail = function () {
|
||||||
|
console.log('dirReader.readEntries failed');
|
||||||
|
};
|
||||||
|
|
||||||
|
// Keep calling readEntries() until no more results are returned.
|
||||||
|
var readEntries = function () {
|
||||||
|
dirReader.readEntries(function (results) {
|
||||||
|
if (!results.length) {
|
||||||
|
entries.forEach(cleanFile);
|
||||||
|
} else {
|
||||||
|
entries = entries.concat(toArray(results));
|
||||||
|
readEntries();
|
||||||
|
}
|
||||||
|
}, onReadFail);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Start reading the directory.
|
||||||
|
readEntries();
|
||||||
|
}
|
||||||
|
|
||||||
|
function cleanFile(fileEntry) {
|
||||||
|
if (!fileEntry.isFile) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
fileEntry.file(function (file) {
|
||||||
|
var elapsed = new Date().getTime() - file.lastModifiedDate.getTime();
|
||||||
|
// 60 days
|
||||||
|
var maxElapsed = 5184000000;
|
||||||
|
if (elapsed >= maxElapsed) {
|
||||||
|
|
||||||
|
var fullPath = fileEntry.fullPath;
|
||||||
|
console.log('deleting file: ' + fullPath);
|
||||||
|
|
||||||
|
fileEntry.remove(function () {
|
||||||
|
console.log('File deleted: ' + fullPath);
|
||||||
|
}, function () {
|
||||||
|
console.log('Failed to delete file: ' + fullPath);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function getCacheKey(url) {
|
function getCacheKey(url) {
|
||||||
|
|
||||||
// Try to strip off the domain to share the cache between local and remote connections
|
// Try to strip off the domain to share the cache between local and remote connections
|
||||||
|
|
|
@ -32,14 +32,14 @@
|
||||||
"web-component-tester": "^4.0.0",
|
"web-component-tester": "^4.0.0",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/PolymerElements/iron-icon",
|
"homepage": "https://github.com/polymerelements/iron-icon",
|
||||||
"_release": "1.0.8",
|
"_release": "1.0.8",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.8",
|
"tag": "v1.0.8",
|
||||||
"commit": "f36b38928849ef3853db727faa8c9ef104d611eb"
|
"commit": "f36b38928849ef3853db727faa8c9ef104d611eb"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/iron-icon.git",
|
"_source": "git://github.com/polymerelements/iron-icon.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/iron-icon"
|
"_originalSource": "polymerelements/iron-icon"
|
||||||
}
|
}
|
|
@ -36,7 +36,7 @@
|
||||||
"tag": "v1.3.0",
|
"tag": "v1.3.0",
|
||||||
"commit": "1662093611cda3fd29125cdab94a61d3d88093da"
|
"commit": "1662093611cda3fd29125cdab94a61d3d88093da"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/iron-selector.git",
|
"_source": "git://github.com/PolymerElements/iron-selector.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "polymerelements/iron-selector"
|
"_originalSource": "PolymerElements/iron-selector"
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue