mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Remove image size hack
This commit is contained in:
parent
f430518d45
commit
ae520390c6
6 changed files with 13 additions and 13 deletions
|
@ -277,7 +277,7 @@ import 'programStyles';
|
||||||
*/
|
*/
|
||||||
function getImageWidth(shape, screenWidth, isOrientationLandscape) {
|
function getImageWidth(shape, screenWidth, isOrientationLandscape) {
|
||||||
const imagesPerRow = getPostersPerRow(shape, screenWidth, isOrientationLandscape);
|
const imagesPerRow = getPostersPerRow(shape, screenWidth, isOrientationLandscape);
|
||||||
return Math.round(screenWidth / imagesPerRow) * 2;
|
return Math.round(screenWidth / imagesPerRow);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -73,7 +73,7 @@ import browser from 'browser';
|
||||||
if (ImageTag) {
|
if (ImageTag) {
|
||||||
return apiClient.getScaledImageUrl(Id, {
|
return apiClient.getScaledImageUrl(Id, {
|
||||||
|
|
||||||
maxWidth: maxWidth * 2,
|
maxWidth: maxWidth,
|
||||||
tag: ImageTag,
|
tag: ImageTag,
|
||||||
type: 'Chapter',
|
type: 'Chapter',
|
||||||
index
|
index
|
||||||
|
|
|
@ -81,7 +81,7 @@ import 'emby-playstatebutton';
|
||||||
let itemId;
|
let itemId;
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
maxWidth: width * 2,
|
maxWidth: width,
|
||||||
type: 'Primary'
|
type: 'Primary'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ import 'emby-playstatebutton';
|
||||||
function getChannelImageUrl(item, width) {
|
function getChannelImageUrl(item, width) {
|
||||||
const apiClient = connectionManager.getApiClient(item.ServerId);
|
const apiClient = connectionManager.getApiClient(item.ServerId);
|
||||||
const options = {
|
const options = {
|
||||||
maxWidth: width * 2,
|
maxWidth: width,
|
||||||
type: 'Primary'
|
type: 'Primary'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -171,9 +171,9 @@ define(['browser', 'datetime', 'backdrop', 'libraryBrowser', 'listView', 'imageL
|
||||||
}
|
}
|
||||||
|
|
||||||
var url = item ? seriesImageUrl(item, {
|
var url = item ? seriesImageUrl(item, {
|
||||||
maxHeight: 300 * 2
|
maxHeight: 300
|
||||||
}) || imageUrl(item, {
|
}) || imageUrl(item, {
|
||||||
maxHeight: 300 * 2
|
maxHeight: 300
|
||||||
}) : null;
|
}) : null;
|
||||||
|
|
||||||
let contextButton = context.querySelector('.btnToggleContextMenu');
|
let contextButton = context.querySelector('.btnToggleContextMenu');
|
||||||
|
|
|
@ -731,7 +731,7 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
|
||||||
disableIndicators: true,
|
disableIndicators: true,
|
||||||
disableHoverMenu: true,
|
disableHoverMenu: true,
|
||||||
overlayPlayButton: true,
|
overlayPlayButton: true,
|
||||||
width: dom.getWindowSize().innerWidth * 0.5
|
width: dom.getWindowSize().innerWidth * 0.25
|
||||||
});
|
});
|
||||||
|
|
||||||
elem.innerHTML = cardHtml;
|
elem.innerHTML = cardHtml;
|
||||||
|
|
|
@ -330,24 +330,24 @@ import 'css!assets/css/videoosd';
|
||||||
|
|
||||||
if (item) {
|
if (item) {
|
||||||
let imgUrl = seriesImageUrl(item, {
|
let imgUrl = seriesImageUrl(item, {
|
||||||
maxWidth: osdPoster.clientWidth * 2,
|
maxWidth: osdPoster.clientWidth,
|
||||||
type: 'Primary'
|
type: 'Primary'
|
||||||
}) || seriesImageUrl(item, {
|
}) || seriesImageUrl(item, {
|
||||||
maxWidth: osdPoster.clientWidth * 2,
|
maxWidth: osdPoster.clientWidth,
|
||||||
type: 'Thumb'
|
type: 'Thumb'
|
||||||
}) || imageUrl(item, {
|
}) || imageUrl(item, {
|
||||||
maxWidth: osdPoster.clientWidth * 2,
|
maxWidth: osdPoster.clientWidth,
|
||||||
type: 'Primary'
|
type: 'Primary'
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!imgUrl && secondaryItem && (imgUrl = seriesImageUrl(secondaryItem, {
|
if (!imgUrl && secondaryItem && (imgUrl = seriesImageUrl(secondaryItem, {
|
||||||
maxWidth: osdPoster.clientWidth * 2,
|
maxWidth: osdPoster.clientWidth,
|
||||||
type: 'Primary'
|
type: 'Primary'
|
||||||
}) || seriesImageUrl(secondaryItem, {
|
}) || seriesImageUrl(secondaryItem, {
|
||||||
maxWidth: osdPoster.clientWidth * 2,
|
maxWidth: osdPoster.clientWidth,
|
||||||
type: 'Thumb'
|
type: 'Thumb'
|
||||||
}) || imageUrl(secondaryItem, {
|
}) || imageUrl(secondaryItem, {
|
||||||
maxWidth: osdPoster.clientWidth * 2,
|
maxWidth: osdPoster.clientWidth,
|
||||||
type: 'Primary'
|
type: 'Primary'
|
||||||
})), imgUrl) {
|
})), imgUrl) {
|
||||||
return void (osdPoster.innerHTML = '<img src="' + imgUrl + '" />');
|
return void (osdPoster.innerHTML = '<img src="' + imgUrl + '" />');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue