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
parent ad01da8f36
commit a56fec601c
2 changed files with 13 additions and 0 deletions

View file

@ -762,6 +762,8 @@ pandora.ui.infoView = function(data) {
}), function() {
// fixme: update the info (video preview) frame as well
var src;
pandora.clearIconCache(data.id);
Ox.Request.clearCache();
if (ui.icons == 'frames') {
src = '/' + data.id + '/icon512.jpg?' + Ox.uid()
$icon.attr({src: src});

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