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
|
||||
})) : null;
|
||||
|
||||
if (url && url !== nowPlayingImageUrl) {
|
||||
nowPlayingImageUrl = url;
|
||||
imageLoader.lazyImage(nowPlayingImageElement, nowPlayingImageUrl);
|
||||
nowPlayingImageElement.style.display = null;
|
||||
nowPlayingTextElement.style.marginLeft = null;
|
||||
} else {
|
||||
nowPlayingImageUrl = null;
|
||||
nowPlayingImageElement.style.backgroundImage = '';
|
||||
nowPlayingImageElement.style.display = 'none';
|
||||
nowPlayingTextElement.style.marginLeft = '1em';
|
||||
if (url !== nowPlayingImageUrl) {
|
||||
if (url) {
|
||||
nowPlayingImageUrl = url;
|
||||
imageLoader.lazyImage(nowPlayingImageElement, nowPlayingImageUrl);
|
||||
nowPlayingImageElement.style.display = null;
|
||||
nowPlayingTextElement.style.marginLeft = null;
|
||||
} else {
|
||||
nowPlayingImageUrl = null;
|
||||
nowPlayingImageElement.style.backgroundImage = '';
|
||||
nowPlayingImageElement.style.display = 'none';
|
||||
nowPlayingTextElement.style.marginLeft = '1em';
|
||||
}
|
||||
}
|
||||
|
||||
if (nowPlayingItem.Id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue