use date item.modified as uid for icons/posters to avoid cache issues
This commit is contained in:
parent
1c1b65fa32
commit
9d5ac8ade7
5 changed files with 18 additions and 20 deletions
|
@ -77,7 +77,7 @@ pandora.ui.browser = function() {
|
||||||
url = '/' + data.id + '/' + (
|
url = '/' + data.id + '/' + (
|
||||||
ui.icons == 'posters'
|
ui.icons == 'posters'
|
||||||
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
|
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
|
||||||
) + '128.jpg',
|
) + '128.jpg?' + data.modified,
|
||||||
format, info, sortKey = sort[0].key;
|
format, info, sortKey = sort[0].key;
|
||||||
if (['title', 'director', 'random'].indexOf(sortKey) > -1) {
|
if (['title', 'director', 'random'].indexOf(sortKey) > -1) {
|
||||||
info = data['year'];
|
info = data['year'];
|
||||||
|
@ -111,7 +111,7 @@ pandora.ui.browser = function() {
|
||||||
query: pandora.user.ui.find
|
query: pandora.user.ui.find
|
||||||
}), callback);
|
}), callback);
|
||||||
},
|
},
|
||||||
keys: ['director', 'id', 'posterRatio', 'title', 'year'],
|
keys: ['director', 'id', 'modified', 'posterRatio', 'title', 'year'],
|
||||||
max: 1,
|
max: 1,
|
||||||
min: 1,
|
min: 1,
|
||||||
orientation: 'horizontal',
|
orientation: 'horizontal',
|
||||||
|
|
|
@ -26,7 +26,6 @@ pandora.ui.infoView = function(data) {
|
||||||
listWidth = 144 + Ox.UI.SCROLLBAR_SIZE,
|
listWidth = 144 + Ox.UI.SCROLLBAR_SIZE,
|
||||||
margin = 16,
|
margin = 16,
|
||||||
statisticsWidth = 128,
|
statisticsWidth = 128,
|
||||||
uid = Ox.uid(),
|
|
||||||
|
|
||||||
that = Ox.Element(),
|
that = Ox.Element(),
|
||||||
|
|
||||||
|
@ -63,7 +62,7 @@ pandora.ui.infoView = function(data) {
|
||||||
src: '/' + data.id + '/' + (
|
src: '/' + data.id + '/' + (
|
||||||
ui.icons == 'posters'
|
ui.icons == 'posters'
|
||||||
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
|
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
|
||||||
) + '512.jpg?' + uid
|
) + '512.jpg?' + data.modified
|
||||||
})
|
})
|
||||||
.css({
|
.css({
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
|
@ -96,7 +95,7 @@ pandora.ui.infoView = function(data) {
|
||||||
src: '/' + data.id + '/' + (
|
src: '/' + data.id + '/' + (
|
||||||
ui.icons == 'posters'
|
ui.icons == 'posters'
|
||||||
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
|
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
|
||||||
) + '512.jpg?' + uid
|
) + '512.jpg?' + data.modified
|
||||||
})
|
})
|
||||||
.css({
|
.css({
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
|
|
|
@ -37,7 +37,6 @@ pandora.ui.infoView = function(data) {
|
||||||
studios: getStudios()
|
studios: getStudios()
|
||||||
},
|
},
|
||||||
statisticsWidth = 128,
|
statisticsWidth = 128,
|
||||||
uid = Ox.uid(),
|
|
||||||
|
|
||||||
that = Ox.Element(),
|
that = Ox.Element(),
|
||||||
|
|
||||||
|
@ -67,7 +66,7 @@ pandora.ui.infoView = function(data) {
|
||||||
src: '/' + data.id + '/' + (
|
src: '/' + data.id + '/' + (
|
||||||
ui.icons == 'posters'
|
ui.icons == 'posters'
|
||||||
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
|
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
|
||||||
) + '512.jpg?' + uid
|
) + '512.jpg?' + data.modified
|
||||||
})
|
})
|
||||||
.css({
|
.css({
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
|
@ -100,7 +99,7 @@ pandora.ui.infoView = function(data) {
|
||||||
src: '/' + data.id + '/' + (
|
src: '/' + data.id + '/' + (
|
||||||
ui.icons == 'posters'
|
ui.icons == 'posters'
|
||||||
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
|
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
|
||||||
) + '512.jpg?' + uid
|
) + '512.jpg?' + data.modified
|
||||||
})
|
})
|
||||||
.css({
|
.css({
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
|
|
|
@ -22,7 +22,6 @@ pandora.ui.infoView = function(data) {
|
||||||
nameKeys = ['director', 'cinematograper', 'featuring'],
|
nameKeys = ['director', 'cinematograper', 'featuring'],
|
||||||
listKeys = nameKeys.concat(['language', 'topic', 'license', 'groups']),
|
listKeys = nameKeys.concat(['language', 'topic', 'license', 'groups']),
|
||||||
statisticsWidth = 128,
|
statisticsWidth = 128,
|
||||||
uid = Ox.uid(),
|
|
||||||
|
|
||||||
that = Ox.Element(),
|
that = Ox.Element(),
|
||||||
|
|
||||||
|
@ -56,7 +55,7 @@ pandora.ui.infoView = function(data) {
|
||||||
.attr({
|
.attr({
|
||||||
src: '/' + data.id + '/' + (
|
src: '/' + data.id + '/' + (
|
||||||
ui.icons == 'posters' ? 'poster' : 'icon'
|
ui.icons == 'posters' ? 'poster' : 'icon'
|
||||||
) + '512.jpg?' + uid
|
) + '512.jpg?' + data.modified
|
||||||
})
|
})
|
||||||
.css({
|
.css({
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
|
@ -90,7 +89,7 @@ pandora.ui.infoView = function(data) {
|
||||||
.attr({
|
.attr({
|
||||||
src: '/' + data.id + '/' + (
|
src: '/' + data.id + '/' + (
|
||||||
ui.icons == 'posters' ? 'poster' : 'icon'
|
ui.icons == 'posters' ? 'poster' : 'icon'
|
||||||
) + '512.jpg?' + uid
|
) + '512.jpg?' + data.modified
|
||||||
})
|
})
|
||||||
.css({
|
.css({
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
|
|
|
@ -44,7 +44,7 @@ pandora.ui.list = function() {
|
||||||
//background: 'transparent'
|
//background: 'transparent'
|
||||||
});
|
});
|
||||||
}).attr({
|
}).attr({
|
||||||
src: '/' + data.id + '/' + icon + '14.jpg'
|
src: '/' + data.id + '/' + icon + '14.jpg?' + data.modified
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
id: 'posterRatio',
|
id: 'posterRatio',
|
||||||
|
@ -83,7 +83,8 @@ pandora.ui.list = function() {
|
||||||
items: function(data, callback) {
|
items: function(data, callback) {
|
||||||
//Ox.Log('', 'data, pandora.Query.toObject', data, pandora.Query.toObject())
|
//Ox.Log('', 'data, pandora.Query.toObject', data, pandora.Query.toObject())
|
||||||
pandora.api.find(Ox.extend(data, {
|
pandora.api.find(Ox.extend(data, {
|
||||||
query: pandora.user.ui.find
|
query: pandora.user.ui.find,
|
||||||
|
keys: ['modified'].concat(data.keys)
|
||||||
}), callback);
|
}), callback);
|
||||||
return Ox.clone(data, true);
|
return Ox.clone(data, true);
|
||||||
},
|
},
|
||||||
|
@ -130,7 +131,7 @@ pandora.ui.list = function() {
|
||||||
url = '/' + data.id + '/' + (
|
url = '/' + data.id + '/' + (
|
||||||
ui.icons == 'posters'
|
ui.icons == 'posters'
|
||||||
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
|
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
|
||||||
) + size + '.jpg',
|
) + size + '.jpg?' + data.modified,
|
||||||
format, info, sortKey = sort[0].key;
|
format, info, sortKey = sort[0].key;
|
||||||
if (['title', 'director', 'random'].indexOf(sortKey) > -1) {
|
if (['title', 'director', 'random'].indexOf(sortKey) > -1) {
|
||||||
info = data['year'];
|
info = data['year'];
|
||||||
|
@ -165,7 +166,7 @@ pandora.ui.list = function() {
|
||||||
}), callback);
|
}), callback);
|
||||||
return Ox.clone(data, true);
|
return Ox.clone(data, true);
|
||||||
},
|
},
|
||||||
keys: ['director', 'id', 'posterRatio', 'title', 'year'],
|
keys: ['director', 'id', 'modified', 'posterRatio', 'title', 'year'],
|
||||||
selected: pandora.user.ui.listSelection,
|
selected: pandora.user.ui.listSelection,
|
||||||
size: 128,
|
size: 128,
|
||||||
sort: pandora.user.ui.listSort,
|
sort: pandora.user.ui.listSort,
|
||||||
|
@ -188,7 +189,7 @@ pandora.ui.list = function() {
|
||||||
url = '/' + data.id + '/' + (
|
url = '/' + data.id + '/' + (
|
||||||
ui.icons == 'posters'
|
ui.icons == 'posters'
|
||||||
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
|
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
|
||||||
) + size + '.jpg',
|
) + size + '.jpg?' + data.modified,
|
||||||
format, info, sortKey = sort[0].key;
|
format, info, sortKey = sort[0].key;
|
||||||
if (['title', 'director'].indexOf(sortKey) > -1) {
|
if (['title', 'director'].indexOf(sortKey) > -1) {
|
||||||
info = data['year'];
|
info = data['year'];
|
||||||
|
@ -239,7 +240,7 @@ pandora.ui.list = function() {
|
||||||
}), callback);
|
}), callback);
|
||||||
return Ox.clone(data, true);
|
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,
|
selected: pandora.user.ui.listSelection,
|
||||||
size: 192,
|
size: 192,
|
||||||
sort: pandora.user.ui.listSort,
|
sort: pandora.user.ui.listSort,
|
||||||
|
@ -273,7 +274,7 @@ pandora.ui.list = function() {
|
||||||
url = '/' + data.id + '/' + (
|
url = '/' + data.id + '/' + (
|
||||||
ui.icons == 'posters'
|
ui.icons == 'posters'
|
||||||
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
|
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
|
||||||
) + size + '.jpg',
|
) + size + '.jpg?' + data.modified,
|
||||||
format, info, sortKey = sort[0].key;
|
format, info, sortKey = sort[0].key;
|
||||||
if (['title', 'director'].indexOf(sortKey) > -1) {
|
if (['title', 'director'].indexOf(sortKey) > -1) {
|
||||||
info = data['year'];
|
info = data['year'];
|
||||||
|
@ -355,7 +356,7 @@ pandora.ui.list = function() {
|
||||||
}} : {})), callback);
|
}} : {})), callback);
|
||||||
return Ox.clone(data, true);
|
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,
|
selected: pandora.user.ui.listSelection,
|
||||||
size: 192,
|
size: 192,
|
||||||
sort: pandora.user.ui.listSort,
|
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.cancel(pandora.requests.preview);
|
||||||
pandora.requests.preview = pandora.api.find({
|
pandora.requests.preview = pandora.api.find({
|
||||||
keys: ['director', 'id', 'posterRatio', 'title', 'year'],
|
keys: ['director', 'id', 'modified', 'posterRatio', 'title', 'year'],
|
||||||
query: {
|
query: {
|
||||||
conditions: data.ids.map(function(id) {
|
conditions: data.ids.map(function(id) {
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in a new issue