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

Avoid unnecessary DOM update if concurrent played items lack image metadata.

This commit is contained in:
callum 2022-09-10 20:21:37 +01:00
parent 689a65cc92
commit ebfd28d396

View file

@ -524,7 +524,8 @@ import { appRouter } from '../appRouter';
height: imgHeight height: imgHeight
})) : null; })) : null;
if (url && url !== nowPlayingImageUrl) { if (url !== nowPlayingImageUrl) {
if (url) {
nowPlayingImageUrl = url; nowPlayingImageUrl = url;
imageLoader.lazyImage(nowPlayingImageElement, nowPlayingImageUrl); imageLoader.lazyImage(nowPlayingImageElement, nowPlayingImageUrl);
nowPlayingImageElement.style.display = null; nowPlayingImageElement.style.display = null;
@ -535,6 +536,7 @@ import { appRouter } from '../appRouter';
nowPlayingImageElement.style.display = 'none'; nowPlayingImageElement.style.display = 'none';
nowPlayingTextElement.style.marginLeft = '1em'; nowPlayingTextElement.style.marginLeft = '1em';
} }
}
if (nowPlayingItem.Id) { if (nowPlayingItem.Id) {
const apiClient = ServerConnections.getApiClient(nowPlayingItem.ServerId); const apiClient = ServerConnections.getApiClient(nowPlayingItem.ServerId);