mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
factor device pixel ratio into downloaded image size
This commit is contained in:
parent
8cadabcbe5
commit
5677ce1011
27 changed files with 295 additions and 195 deletions
|
@ -68,9 +68,12 @@
|
|||
var index = getRandom(0, images.length - 1);
|
||||
var item = images[index];
|
||||
|
||||
var imgUrl = ApiClient.getImageUrl(item.id, {
|
||||
var screenWidth = $(window).width();
|
||||
|
||||
var imgUrl = ApiClient.getScaledImageUrl(item.id, {
|
||||
type: "Backdrop",
|
||||
tag: item.tag
|
||||
tag: item.tag,
|
||||
maxWidth: screenWidth
|
||||
});
|
||||
|
||||
getElement().css('backgroundImage', 'url(\'' + imgUrl + '\')');
|
||||
|
@ -99,7 +102,7 @@
|
|||
|
||||
var val = LocalSettings.val('enableBackdrops', userId);
|
||||
|
||||
return val != '0';
|
||||
return val == '1';
|
||||
}
|
||||
|
||||
$(document).on('pagebeforeshow', ".backdropPage", function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue