mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
Use song type instead of server
This commit is contained in:
@@ -6,7 +6,7 @@ import { generatePath, Link } from 'react-router-dom';
|
|||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { Button, Text } from '@/renderer/components';
|
import { Button, Text } from '@/renderer/components';
|
||||||
import { AppRoute } from '@/renderer/router/routes';
|
import { AppRoute } from '@/renderer/router/routes';
|
||||||
import { useAppStore, useAuthStore, usePlayerStore } from '@/renderer/store';
|
import { useAppStore, usePlayerStore } from '@/renderer/store';
|
||||||
import { fadeIn } from '@/renderer/styles';
|
import { fadeIn } from '@/renderer/styles';
|
||||||
import { ServerType } from '@/renderer/types';
|
import { ServerType } from '@/renderer/types';
|
||||||
|
|
||||||
@@ -53,9 +53,7 @@ const Image = styled(motion(Link))`
|
|||||||
const PlayerbarImage = styled.img`
|
const PlayerbarImage = styled.img`
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-repeat: no-repeat;
|
object-fit: cover;
|
||||||
background-position: 50%;
|
|
||||||
background-size: cover;
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const LineItem = styled.div<{ $secondary?: boolean }>`
|
const LineItem = styled.div<{ $secondary?: boolean }>`
|
||||||
@@ -75,13 +73,12 @@ const LineItem = styled.div<{ $secondary?: boolean }>`
|
|||||||
export const LeftControls = () => {
|
export const LeftControls = () => {
|
||||||
const hideImage = useAppStore((state) => state.sidebar.image);
|
const hideImage = useAppStore((state) => state.sidebar.image);
|
||||||
const setSidebar = useAppStore((state) => state.setSidebar);
|
const setSidebar = useAppStore((state) => state.setSidebar);
|
||||||
const serverType = useAuthStore((state) => state.currentServer?.type);
|
|
||||||
const song = usePlayerStore((state) => state.current.song);
|
const song = usePlayerStore((state) => state.current.song);
|
||||||
|
|
||||||
const title = song?.name;
|
const title = song?.name;
|
||||||
|
|
||||||
const artists =
|
const artists =
|
||||||
serverType === ServerType.JELLYFIN
|
song?.type === ServerType.JELLYFIN
|
||||||
? song?.artists
|
? song?.artists
|
||||||
: song?.album?.albumArtists;
|
: song?.album?.albumArtists;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user