mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fixes #513 - Fix flickering on dashboard now playing page
This commit is contained in:
parent
3431c8544e
commit
44c1876907
1 changed files with 17 additions and 6 deletions
|
@ -137,7 +137,16 @@
|
||||||
|
|
||||||
$('.nowPlayingText', row).html(DashboardPage.getNowPlayingText(session, nowPlayingItem)).trigger('create');
|
$('.nowPlayingText', row).html(DashboardPage.getNowPlayingText(session, nowPlayingItem)).trigger('create');
|
||||||
|
|
||||||
$('.nowPlayingImage', row).html(DashboardPage.getNowPlayingImage(nowPlayingItem));
|
var imageRow = $('.nowPlayingImage', row);
|
||||||
|
|
||||||
|
var image = $('img', imageRow)[0];
|
||||||
|
|
||||||
|
var nowPlayingItemId = nowPlayingItem ? nowPlayingItem.Id : null;
|
||||||
|
var nowPlayingItemImageTag = nowPlayingItem ? nowPlayingItem.PrimaryImageTag : null;
|
||||||
|
|
||||||
|
if (!image || image.getAttribute('data-itemid') != nowPlayingItemId || image.getAttribute('data-tag') != nowPlayingItemImageTag) {
|
||||||
|
imageRow.html(DashboardPage.getNowPlayingImage(nowPlayingItem));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getClientType: function (connection) {
|
getClientType: function (connection) {
|
||||||
|
@ -217,7 +226,9 @@
|
||||||
tag: item.PrimaryImageTag
|
tag: item.PrimaryImageTag
|
||||||
});
|
});
|
||||||
|
|
||||||
return "<img class='clientNowPlayingImage' src='" + url + "' alt='" + item.Name + "' title='" + item.Name + "' />";
|
url += "&xxx=" + new Date().getTime();
|
||||||
|
|
||||||
|
return "<img data-itemid='" + item.Id + "' data-tag='" + item.PrimaryImageTag + "' class='clientNowPlayingImage' src='" + url + "' alt='" + item.Name + "' title='" + item.Name + "' />";
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue