clear cached icons and posters if they are changed. fixes #841

This commit is contained in:
j 2012-07-01 14:00:48 +00:00
commit a56fec601c
2 changed files with 13 additions and 0 deletions

View file

@ -182,6 +182,17 @@ pandora.changeListStatus = function(id, status, callback) {
}
};
pandora.clearIconCache = function(item) {
['poster', 'icon'].forEach(function(icon) {
['', 64, 128, 512].forEach(function(size) {
var url = '/' + item + '/' + icon + size + '.jpg',
xhr = new XMLHttpRequest();
xhr.open('POST', url);
xhr.send();
});
});
}
pandora.clickLink = function(e) {
if (
e.target.hostname == document.location.hostname