From cd126bb1c704af7f1cad126a90b28fc4bc8c02fc Mon Sep 17 00:00:00 2001 From: Fredrik Burmester Date: Fri, 13 Sep 2024 13:09:27 +0300 Subject: [PATCH] wip --- components/CurrentlyPlayingBar.tsx | 57 ++++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 6 deletions(-) diff --git a/components/CurrentlyPlayingBar.tsx b/components/CurrentlyPlayingBar.tsx index 7c141a94..8412645c 100644 --- a/components/CurrentlyPlayingBar.tsx +++ b/components/CurrentlyPlayingBar.tsx @@ -221,12 +221,57 @@ export const CurrentlyPlayingBar: React.FC = () => { style={[animatedBackgroundStyle]} > - - {currentlyPlaying.item.Name} - {currentlyPlaying.item.Name} + + + { + if (currentlyPlaying.item?.Type === "Audio") { + router.push( + // @ts-ignore + `/(auth)/(tabs)/${from}/albums/${currentlyPlaying.item.AlbumId}` + ); + } else { + router.push( + // @ts-ignore + `/(auth)/(tabs)/${from}/items/page?id=${currentlyPlaying.item?.Id}` + ); + } + }} + > + {currentlyPlaying.item?.Name} + + {currentlyPlaying.item?.Type === "Episode" && ( + { + router.push( + // @ts-ignore + `/(auth)/(tabs)/${from}/series/${currentlyPlaying.item.SeriesId}` + ); + }} + className="text-xs opacity-50" + > + {currentlyPlaying.item.SeriesName} + + )} + {currentlyPlaying.item?.Type === "Movie" && ( + + + {currentlyPlaying.item?.ProductionYear} + + + )} + {currentlyPlaying.item?.Type === "Audio" && ( + { + router.push(`/albums/${currentlyPlaying.item?.AlbumId}`); + }} + > + + {currentlyPlaying.item?.Album} + + + )} +