mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 21:10:12 +02:00
add native nd radio endpoints, support radio station images
This commit is contained in:
@@ -167,7 +167,7 @@ const SidebarImage = () => {
|
||||
const { setSideBar } = useAppStoreActions();
|
||||
const currentSong = usePlayerSong();
|
||||
const isRadioActive = useIsRadioActive();
|
||||
const { isPlaying: isRadioPlaying } = useRadioPlayer();
|
||||
const { currentStationArt, isPlaying: isRadioPlaying } = useRadioPlayer();
|
||||
const { blurExplicitImages } = useGeneralSettings();
|
||||
|
||||
const imageUrl = useItemImageUrl({
|
||||
@@ -177,6 +177,14 @@ const SidebarImage = () => {
|
||||
type: 'sidebar',
|
||||
});
|
||||
|
||||
const radioImageUrl = useItemImageUrl({
|
||||
id: isRadioActive ? currentStationArt?.imageId || undefined : undefined,
|
||||
imageUrl: isRadioActive ? currentStationArt?.imageUrl || undefined : undefined,
|
||||
itemType: LibraryItem.RADIO_STATION,
|
||||
serverId: isRadioActive ? currentStationArt?.serverId : undefined,
|
||||
type: 'sidebar',
|
||||
});
|
||||
|
||||
const isPlayingRadio = isRadioActive && isRadioPlaying;
|
||||
const isSongDefined = Boolean(currentSong?.id);
|
||||
|
||||
@@ -224,7 +232,9 @@ const SidebarImage = () => {
|
||||
postProcess: 'sentenceCase',
|
||||
})}
|
||||
>
|
||||
{isPlayingRadio ? (
|
||||
{isRadioActive && radioImageUrl ? (
|
||||
<img className={styles.sidebarImage} loading="eager" src={radioImageUrl} />
|
||||
) : isRadioActive ? (
|
||||
<Center
|
||||
className={styles.sidebarImage}
|
||||
style={{
|
||||
|
||||
Reference in New Issue
Block a user