1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update details

This commit is contained in:
Luke Pulverenti 2016-12-03 02:58:48 -05:00
parent 65ccdb73c7
commit 11e4966819
10 changed files with 131 additions and 88 deletions

View file

@ -14,12 +14,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.4.366",
"_release": "1.4.366",
"version": "1.4.368",
"_release": "1.4.368",
"_resolution": {
"type": "version",
"tag": "1.4.366",
"commit": "0f80ba74da6484e52961e2199505d30a86fe5666"
"tag": "1.4.368",
"commit": "6d80986170e396308e4e9c1865b97375c1769708"
},
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.1",

View file

@ -176,7 +176,24 @@
currentLoadingBackdrop = instance;
}
function getItemImageUrls(item) {
var standardWidths = [480, 720, 1280, 1440, 1920];
function getBackdropMaxWidth() {
var width = dom.getWindowSize().innerWidth;
if (standardWidths.indexOf(width) !== -1) {
return width;
}
var roundScreenTo = 100;
width = Math.floor(width / roundScreenTo) * roundScreenTo;
return Math.min(width, 1920);
}
function getItemImageUrls(item, imageOptions) {
imageOptions = imageOptions || {};
var apiClient = connectionManager.getApiClient(item.ServerId);
@ -184,12 +201,12 @@
return item.BackdropImageTags.map(function (imgTag, index) {
return apiClient.getScaledImageUrl(item.Id, {
return apiClient.getScaledImageUrl(item.Id, Object.assign(imageOptions, {
type: "Backdrop",
tag: imgTag,
maxWidth: Math.min(dom.getWindowSize().innerWidth, 1920),
maxWidth: getBackdropMaxWidth(),
index: index
});
}));
});
}
@ -197,19 +214,19 @@
return item.ParentBackdropImageTags.map(function (imgTag, index) {
return apiClient.getScaledImageUrl(item.ParentBackdropItemId, {
return apiClient.getScaledImageUrl(item.ParentBackdropItemId, Object.assign(imageOptions, {
type: "Backdrop",
tag: imgTag,
maxWidth: Math.min(dom.getWindowSize().innerWidth, 1920),
maxWidth: getBackdropMaxWidth(),
index: index
});
}));
});
}
return [];
}
function getImageUrls(items) {
function getImageUrls(items, imageOptions) {
var list = [];
@ -219,7 +236,7 @@
for (var i = 0, length = items.length; i < length; i++) {
var itemImages = getItemImageUrls(items[i]);
var itemImages = getItemImageUrls(items[i], imageOptions);
itemImages.forEach(onImg);
}
@ -252,9 +269,9 @@
var rotationInterval;
var currentRotatingImages = [];
var currentRotationIndex = -1;
function setBackdrops(items, enableImageRotation) {
function setBackdrops(items, imageOptions, enableImageRotation) {
var images = getImageUrls(items);
var images = getImageUrls(items, imageOptions);
if (images.length) {
@ -307,11 +324,11 @@
currentRotationIndex = -1;
}
function setBackdrop(url) {
function setBackdrop(url, imageOptions) {
if (url) {
if (typeof url !== 'string') {
url = getImageUrls([url])[0];
url = getImageUrls([url], imageOptions)[0];
}
}

View file

@ -300,7 +300,7 @@ define(['browser'], function (browser) {
hlsVideoAudioCodecs.push('mp3');
}
if (browser.tizen) {
if (browser.tizen || options.supportsDts) {
videoAudioCodecs.push('dca');
videoAudioCodecs.push('dts');
}

View file

@ -15,7 +15,7 @@
user-select: none;
cursor: pointer;
z-index: 0;
padding: 0.85em 0.57em;
padding: 0.95em 0.64em;
font-weight: normal;
vertical-align: middle;
border: 0;
@ -50,13 +50,13 @@
.fab {
display: inline-flex;
border-radius: 50%;
background-color: rgb(170,170, 170);
background-color: rgba(170,170,190, .4);
padding: .6em;
box-sizing: border-box;
align-items: center;
justify-content: center;
text-align: center;
color: #222;
color: #fff;
margin: 0;
}