clear cached icons and posters if they are changed. fixes #841
This commit is contained in:
parent
ad01da8f36
commit
a56fec601c
2 changed files with 13 additions and 0 deletions
|
@ -762,6 +762,8 @@ pandora.ui.infoView = function(data) {
|
||||||
}), function() {
|
}), function() {
|
||||||
// fixme: update the info (video preview) frame as well
|
// fixme: update the info (video preview) frame as well
|
||||||
var src;
|
var src;
|
||||||
|
pandora.clearIconCache(data.id);
|
||||||
|
Ox.Request.clearCache();
|
||||||
if (ui.icons == 'frames') {
|
if (ui.icons == 'frames') {
|
||||||
src = '/' + data.id + '/icon512.jpg?' + Ox.uid()
|
src = '/' + data.id + '/icon512.jpg?' + Ox.uid()
|
||||||
$icon.attr({src: src});
|
$icon.attr({src: src});
|
||||||
|
|
|
@ -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) {
|
pandora.clickLink = function(e) {
|
||||||
if (
|
if (
|
||||||
e.target.hostname == document.location.hostname
|
e.target.hostname == document.location.hostname
|
||||||
|
|
Loading…
Reference in a new issue