use date item.modified as uid for icons/posters to avoid cache issues

This commit is contained in:
j 2013-05-10 11:59:20 +00:00
parent 1c1b65fa32
commit 9d5ac8ade7
5 changed files with 18 additions and 20 deletions

View file

@ -77,7 +77,7 @@ pandora.ui.browser = function() {
url = '/' + data.id + '/' + (
ui.icons == 'posters'
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
) + '128.jpg',
) + '128.jpg?' + data.modified,
format, info, sortKey = sort[0].key;
if (['title', 'director', 'random'].indexOf(sortKey) > -1) {
info = data['year'];
@ -111,7 +111,7 @@ pandora.ui.browser = function() {
query: pandora.user.ui.find
}), callback);
},
keys: ['director', 'id', 'posterRatio', 'title', 'year'],
keys: ['director', 'id', 'modified', 'posterRatio', 'title', 'year'],
max: 1,
min: 1,
orientation: 'horizontal',

View file

@ -26,7 +26,6 @@ pandora.ui.infoView = function(data) {
listWidth = 144 + Ox.UI.SCROLLBAR_SIZE,
margin = 16,
statisticsWidth = 128,
uid = Ox.uid(),
that = Ox.Element(),
@ -63,7 +62,7 @@ pandora.ui.infoView = function(data) {
src: '/' + data.id + '/' + (
ui.icons == 'posters'
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
) + '512.jpg?' + uid
) + '512.jpg?' + data.modified
})
.css({
position: 'absolute',
@ -96,7 +95,7 @@ pandora.ui.infoView = function(data) {
src: '/' + data.id + '/' + (
ui.icons == 'posters'
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
) + '512.jpg?' + uid
) + '512.jpg?' + data.modified
})
.css({
position: 'absolute',

View file

@ -37,7 +37,6 @@ pandora.ui.infoView = function(data) {
studios: getStudios()
},
statisticsWidth = 128,
uid = Ox.uid(),
that = Ox.Element(),
@ -67,7 +66,7 @@ pandora.ui.infoView = function(data) {
src: '/' + data.id + '/' + (
ui.icons == 'posters'
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
) + '512.jpg?' + uid
) + '512.jpg?' + data.modified
})
.css({
position: 'absolute',
@ -100,7 +99,7 @@ pandora.ui.infoView = function(data) {
src: '/' + data.id + '/' + (
ui.icons == 'posters'
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
) + '512.jpg?' + uid
) + '512.jpg?' + data.modified
})
.css({
position: 'absolute',

View file

@ -22,7 +22,6 @@ pandora.ui.infoView = function(data) {
nameKeys = ['director', 'cinematograper', 'featuring'],
listKeys = nameKeys.concat(['language', 'topic', 'license', 'groups']),
statisticsWidth = 128,
uid = Ox.uid(),
that = Ox.Element(),
@ -56,7 +55,7 @@ pandora.ui.infoView = function(data) {
.attr({
src: '/' + data.id + '/' + (
ui.icons == 'posters' ? 'poster' : 'icon'
) + '512.jpg?' + uid
) + '512.jpg?' + data.modified
})
.css({
position: 'absolute',
@ -90,7 +89,7 @@ pandora.ui.infoView = function(data) {
.attr({
src: '/' + data.id + '/' + (
ui.icons == 'posters' ? 'poster' : 'icon'
) + '512.jpg?' + uid
) + '512.jpg?' + data.modified
})
.css({
position: 'absolute',

View file

@ -44,7 +44,7 @@ pandora.ui.list = function() {
//background: 'transparent'
});
}).attr({
src: '/' + data.id + '/' + icon + '14.jpg'
src: '/' + data.id + '/' + icon + '14.jpg?' + data.modified
});
},
id: 'posterRatio',
@ -83,7 +83,8 @@ pandora.ui.list = function() {
items: function(data, callback) {
//Ox.Log('', 'data, pandora.Query.toObject', data, pandora.Query.toObject())
pandora.api.find(Ox.extend(data, {
query: pandora.user.ui.find
query: pandora.user.ui.find,
keys: ['modified'].concat(data.keys)
}), callback);
return Ox.clone(data, true);
},
@ -130,7 +131,7 @@ pandora.ui.list = function() {
url = '/' + data.id + '/' + (
ui.icons == 'posters'
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
) + size + '.jpg',
) + size + '.jpg?' + data.modified,
format, info, sortKey = sort[0].key;
if (['title', 'director', 'random'].indexOf(sortKey) > -1) {
info = data['year'];
@ -165,7 +166,7 @@ pandora.ui.list = function() {
}), callback);
return Ox.clone(data, true);
},
keys: ['director', 'id', 'posterRatio', 'title', 'year'],
keys: ['director', 'id', 'modified', 'posterRatio', 'title', 'year'],
selected: pandora.user.ui.listSelection,
size: 128,
sort: pandora.user.ui.listSort,
@ -188,7 +189,7 @@ pandora.ui.list = function() {
url = '/' + data.id + '/' + (
ui.icons == 'posters'
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
) + size + '.jpg',
) + size + '.jpg?' + data.modified,
format, info, sortKey = sort[0].key;
if (['title', 'director'].indexOf(sortKey) > -1) {
info = data['year'];
@ -239,7 +240,7 @@ pandora.ui.list = function() {
}), callback);
return Ox.clone(data, true);
},
keys: ['clips', 'director', 'duration', 'id', 'posterRatio', 'title', 'videoRatio', 'year'],
keys: ['clips', 'director', 'duration', 'id', 'modified', 'posterRatio', 'title', 'videoRatio', 'year'],
selected: pandora.user.ui.listSelection,
size: 192,
sort: pandora.user.ui.listSort,
@ -273,7 +274,7 @@ pandora.ui.list = function() {
url = '/' + data.id + '/' + (
ui.icons == 'posters'
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
) + size + '.jpg',
) + size + '.jpg?' + data.modified,
format, info, sortKey = sort[0].key;
if (['title', 'director'].indexOf(sortKey) > -1) {
info = data['year'];
@ -355,7 +356,7 @@ pandora.ui.list = function() {
}} : {})), callback);
return Ox.clone(data, true);
},
keys: ['clips', 'director', 'duration', 'id', 'posterRatio', 'rendered', 'title', 'year'],
keys: ['clips', 'director', 'duration', 'id', 'modified', 'posterRatio', 'rendered', 'title', 'year'],
selected: pandora.user.ui.listSelection,
size: 192,
sort: pandora.user.ui.listSort,
@ -448,7 +449,7 @@ pandora.ui.list = function() {
}
pandora.requests.preview && pandora.api.cancel(pandora.requests.preview);
pandora.requests.preview = pandora.api.find({
keys: ['director', 'id', 'posterRatio', 'title', 'year'],
keys: ['director', 'id', 'modified', 'posterRatio', 'title', 'year'],
query: {
conditions: data.ids.map(function(id) {
return {