mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix code smell in mediasession
This commit is contained in:
parent
af7c87b9f6
commit
9cba01963f
1 changed files with 4 additions and 8 deletions
|
@ -117,13 +117,9 @@ import connectionManager from 'connectionManager';
|
|||
artwork: getImageUrls(item)
|
||||
});
|
||||
} else {
|
||||
let imageUrl = [];
|
||||
imageUrl.push(pushImageUrl(item));
|
||||
|
||||
if (imageUrl.length) {
|
||||
imageUrl = imageUrl[0].src;
|
||||
} else {
|
||||
imageUrl = null;
|
||||
let itemImageUrl = seriesImageUrl(item) || imageUrl(item);
|
||||
if (!itemImageUrl) {
|
||||
itemImageUrl = null;
|
||||
}
|
||||
|
||||
window.NativeShell.updateMediaSession({
|
||||
|
@ -135,7 +131,7 @@ import connectionManager from 'connectionManager';
|
|||
album: album,
|
||||
duration: duration,
|
||||
position: currentTime,
|
||||
imageUrl: imageUrl,
|
||||
imageUrl: itemImageUrl,
|
||||
canSeek: canSeek,
|
||||
isPaused: isPaused
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue