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)
|
artwork: getImageUrls(item)
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
let imageUrl = [];
|
let itemImageUrl = seriesImageUrl(item) || imageUrl(item);
|
||||||
imageUrl.push(pushImageUrl(item));
|
if (!itemImageUrl) {
|
||||||
|
itemImageUrl = null;
|
||||||
if (imageUrl.length) {
|
|
||||||
imageUrl = imageUrl[0].src;
|
|
||||||
} else {
|
|
||||||
imageUrl = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window.NativeShell.updateMediaSession({
|
window.NativeShell.updateMediaSession({
|
||||||
|
@ -135,7 +131,7 @@ import connectionManager from 'connectionManager';
|
||||||
album: album,
|
album: album,
|
||||||
duration: duration,
|
duration: duration,
|
||||||
position: currentTime,
|
position: currentTime,
|
||||||
imageUrl: imageUrl,
|
imageUrl: itemImageUrl,
|
||||||
canSeek: canSeek,
|
canSeek: canSeek,
|
||||||
isPaused: isPaused
|
isPaused: isPaused
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue