From 638e8851c1a973000ca2862018184edb479eaec7 Mon Sep 17 00:00:00 2001 From: Fredrik Burmester Date: Sun, 25 Aug 2024 11:15:50 +0200 Subject: [PATCH] fix: add metadata --- components/CurrentlyPlayingBar.tsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/components/CurrentlyPlayingBar.tsx b/components/CurrentlyPlayingBar.tsx index 2e84aec1..67527113 100644 --- a/components/CurrentlyPlayingBar.tsx +++ b/components/CurrentlyPlayingBar.tsx @@ -166,6 +166,21 @@ export const CurrentlyPlayingBar: React.FC = () => { isNetwork: true, startPosition, headers: getAuthHeaders(api), + metadata: { + artist: currentlyPlaying.item?.AlbumArtist + ? currentlyPlaying.item?.AlbumArtist + : "Unknown", + title: currentlyPlaying.item?.Name + ? currentlyPlaying.item?.Name + : "Unknown", + description: currentlyPlaying.item?.Overview + ? currentlyPlaying.item?.Overview + : "Unknown", + imageUri: backdropUrl ? backdropUrl : undefined, + subtitle: currentlyPlaying.item?.Album + ? currentlyPlaying.item?.Album + : "Unknown", + }, }} onBuffer={(e) => e.isBuffering ? console.log("Buffering...") : null