mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 10:23:33 +00:00
Add view artist discography
This commit is contained in:
parent
67523f1e7b
commit
5614ad54f2
7 changed files with 338 additions and 155 deletions
|
|
@ -13,7 +13,7 @@ import { Box, Group, Stack } from '@mantine/core';
|
|||
import { RiArrowDownSLine, RiHeartFill, RiHeartLine, RiMoreFill } from 'react-icons/ri';
|
||||
import { generatePath, useParams } from 'react-router';
|
||||
import { useCurrentServer } from '/@/renderer/store';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { createSearchParams, Link } from 'react-router-dom';
|
||||
import styled from 'styled-components';
|
||||
import { AppRoute } from '/@/renderer/router/routes';
|
||||
import { useContainerQuery } from '/@/renderer/hooks';
|
||||
|
|
@ -66,6 +66,13 @@ export const AlbumArtistDetailContent = () => {
|
|||
|
||||
const detailQuery = useAlbumArtistDetail({ id: albumArtistId });
|
||||
|
||||
const artistDiscographyLink = `${generatePath(AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL_DISCOGRAPHY, {
|
||||
albumArtistId,
|
||||
})}?${createSearchParams({
|
||||
artistId: albumArtistId,
|
||||
artistName: detailQuery?.data?.name || '',
|
||||
})}`;
|
||||
|
||||
const recentAlbumsQuery = useAlbumList({
|
||||
jfParams: server?.type === ServerType.JELLYFIN ? { artistIds: albumArtistId } : undefined,
|
||||
limit: itemsPerPage,
|
||||
|
|
@ -146,9 +153,7 @@ export const AlbumArtistDetailContent = () => {
|
|||
compact
|
||||
uppercase
|
||||
component={Link}
|
||||
to={generatePath(AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL_DISCOGRAPHY, {
|
||||
albumArtistId,
|
||||
})}
|
||||
to={artistDiscographyLink}
|
||||
variant="subtle"
|
||||
>
|
||||
View discography
|
||||
|
|
@ -283,9 +288,7 @@ export const AlbumArtistDetailContent = () => {
|
|||
compact
|
||||
uppercase
|
||||
component={Link}
|
||||
to={generatePath(AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL_DISCOGRAPHY, {
|
||||
albumArtistId,
|
||||
})}
|
||||
to={artistDiscographyLink}
|
||||
variant="subtle"
|
||||
>
|
||||
View discography
|
||||
|
|
@ -302,7 +305,6 @@ export const AlbumArtistDetailContent = () => {
|
|||
</Group>
|
||||
</Group>
|
||||
</Box>
|
||||
|
||||
{showGenres && (
|
||||
<Box component="section">
|
||||
<Group>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue