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:
parent
689a65cc92
commit
ebfd28d396
1 changed files with 12 additions and 10 deletions
|
@ -524,16 +524,18 @@ import { appRouter } from '../appRouter';
|
||||||
height: imgHeight
|
height: imgHeight
|
||||||
})) : null;
|
})) : null;
|
||||||
|
|
||||||
if (url && url !== nowPlayingImageUrl) {
|
if (url !== nowPlayingImageUrl) {
|
||||||
nowPlayingImageUrl = url;
|
if (url) {
|
||||||
imageLoader.lazyImage(nowPlayingImageElement, nowPlayingImageUrl);
|
nowPlayingImageUrl = url;
|
||||||
nowPlayingImageElement.style.display = null;
|
imageLoader.lazyImage(nowPlayingImageElement, nowPlayingImageUrl);
|
||||||
nowPlayingTextElement.style.marginLeft = null;
|
nowPlayingImageElement.style.display = null;
|
||||||
} else {
|
nowPlayingTextElement.style.marginLeft = null;
|
||||||
nowPlayingImageUrl = null;
|
} else {
|
||||||
nowPlayingImageElement.style.backgroundImage = '';
|
nowPlayingImageUrl = null;
|
||||||
nowPlayingImageElement.style.display = 'none';
|
nowPlayingImageElement.style.backgroundImage = '';
|
||||||
nowPlayingTextElement.style.marginLeft = '1em';
|
nowPlayingImageElement.style.display = 'none';
|
||||||
|
nowPlayingTextElement.style.marginLeft = '1em';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nowPlayingItem.Id) {
|
if (nowPlayingItem.Id) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue