wrap image urls in pandora.getMediaURL to add option to load image from another domain

This commit is contained in:
j 2014-02-02 11:30:25 +00:00 committed by rolux
commit 522af49a73
22 changed files with 118 additions and 77 deletions

View file

@ -131,9 +131,9 @@ pandora.ui.infoView = function(data) {
element: '<img>'
})
.attr({
src: '/' + data.id + '/' + (
src: pandora.getMediaURL('/' + data.id + '/' + (
ui.icons == 'posters' ? 'poster' : 'icon'
) + '512.jpg?' + data.modified
) + '512.jpg?' + data.modified)
})
.css({
position: 'absolute',
@ -163,10 +163,10 @@ pandora.ui.infoView = function(data) {
$reflectionIcon = $('<img>')
.attr({
src: '/' + data.id + '/' + (
src: pandora.getMediaURL('/' + data.id + '/' + (
ui.icons == 'posters'
? (ui.showSitePosters ? 'siteposter' : 'poster') : 'icon'
) + '512.jpg?' + data.modified
) + '512.jpg?' + data.modified)
})
.css({
position: 'absolute',
@ -492,7 +492,7 @@ pandora.ui.infoView = function(data) {
Ox.contains(['title', 'director', 'year'], key)
&& ui.icons == 'posters'
) {
src = '/' + data.id + '/poster512.jpg?' + Ox.uid();
src = pandora.getMediaURL('/' + data.id + '/poster512.jpg?' + Ox.uid());
$icon.attr({src: src});
$reflectionIcon.attr({src: src});
}
@ -1042,9 +1042,9 @@ pandora.ui.infoView = function(data) {
}
that.reload = function() {
var src = src = '/' + data.id + '/' + (
var src = pandora.getMediaURL('/' + data.id + '/' + (
ui.icons == 'posters' ? 'poster' : 'icon'
) + '512.jpg?' + Ox.uid();
) + '512.jpg?' + Ox.uid());
$icon.attr({src: src});
$reflectionIcon.attr({src: src});
iconSize = iconSize == 256 ? 512 : 256;