mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-23 20:37:42 +02:00
Initial work: support showing studios for jellyfin, allow pill to be clickable (#1566)
This commit is contained in:
@@ -49,6 +49,7 @@ import {
|
||||
AlbumListSort,
|
||||
ExplicitStatus,
|
||||
LibraryItem,
|
||||
ServerType,
|
||||
Song,
|
||||
SongListSort,
|
||||
SortOrder,
|
||||
@@ -152,8 +153,15 @@ const AlbumMetadataTags = ({ album }: AlbumMetadataTagsProps) => {
|
||||
if (!album?.recordLabels || album.recordLabels.length === 0) return [];
|
||||
|
||||
return album.recordLabels.map((label) => {
|
||||
if (album._serverType === ServerType.SUBSONIC) {
|
||||
return { id: label, label: label, url: null };
|
||||
}
|
||||
|
||||
const searchParams = new URLSearchParams();
|
||||
const customFilters = { recordlabel: [label] };
|
||||
const customFilters =
|
||||
album._serverType === ServerType.JELLYFIN
|
||||
? { Studios: [label] }
|
||||
: { recordlabel: [label] };
|
||||
const paramsWithCustom = setJsonSearchParam(
|
||||
searchParams,
|
||||
FILTER_KEYS.ALBUM._CUSTOM,
|
||||
@@ -183,15 +191,21 @@ const AlbumMetadataTags = ({ album }: AlbumMetadataTagsProps) => {
|
||||
</Text>
|
||||
<div className={styles['pill-group-wrapper']}>
|
||||
<Pill.Group>
|
||||
{recordLabels.map((recordLabel) => (
|
||||
<PillLink
|
||||
key={`recordlabel-${recordLabel.id}`}
|
||||
size="md"
|
||||
to={recordLabel.url}
|
||||
>
|
||||
{recordLabel.label}
|
||||
</PillLink>
|
||||
))}
|
||||
{recordLabels.map((recordLabel) =>
|
||||
recordLabel.url ? (
|
||||
<PillLink
|
||||
key={`recordlabel-${recordLabel.id}`}
|
||||
size="md"
|
||||
to={recordLabel.url}
|
||||
>
|
||||
{recordLabel.label}
|
||||
</PillLink>
|
||||
) : (
|
||||
<Pill key={`recordlabel-${recordLabel.id}`} size="md">
|
||||
{recordLabel.label}
|
||||
</Pill>
|
||||
),
|
||||
)}
|
||||
</Pill.Group>
|
||||
</div>
|
||||
</Stack>
|
||||
|
||||
Reference in New Issue
Block a user