mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-15 13:00:25 +02:00
feat: show record label copyright at bottom of track listing (#1421)
* show record label copyright at bottom of track listing * add recordLabels support for Jellyfin --------- Co-authored-by: jeffvli <jeffvictorli@gmail.com>
This commit is contained in:
@@ -360,7 +360,7 @@ export const JellyfinController: InternalControllerEndpoint = {
|
|||||||
},
|
},
|
||||||
query: {
|
query: {
|
||||||
...artistQuery,
|
...artistQuery,
|
||||||
Fields: 'People, Tags',
|
Fields: 'People, Tags, Studios',
|
||||||
GenreIds: query.genreIds ? query.genreIds.join(',') : undefined,
|
GenreIds: query.genreIds ? query.genreIds.join(',') : undefined,
|
||||||
IncludeItemTypes: 'MusicAlbum',
|
IncludeItemTypes: 'MusicAlbum',
|
||||||
IsFavorite: query.favorite,
|
IsFavorite: query.favorite,
|
||||||
|
|||||||
@@ -362,6 +362,9 @@ export const AlbumDetailContent = () => {
|
|||||||
|
|
||||||
const comment = detailQuery?.data?.comment;
|
const comment = detailQuery?.data?.comment;
|
||||||
|
|
||||||
|
const releaseYear = detailQuery?.data?.releaseYear;
|
||||||
|
const labels = detailQuery?.data?.recordLabels;
|
||||||
|
|
||||||
const mbzId = detailQuery?.data?.mbzId;
|
const mbzId = detailQuery?.data?.mbzId;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -396,7 +399,15 @@ export const AlbumDetailContent = () => {
|
|||||||
</Stack>
|
</Stack>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{labels && (
|
||||||
|
<Stack gap="xs">
|
||||||
|
{labels.map((label) => (
|
||||||
|
<Text isMuted key={`label-${label}`} size="sm">
|
||||||
|
℗{releaseYear ? ` ${releaseYear}` : ''} {label}
|
||||||
|
</Text>
|
||||||
|
))}
|
||||||
|
</Stack>
|
||||||
|
)}
|
||||||
<Stack gap="lg" mt="3rem">
|
<Stack gap="lg" mt="3rem">
|
||||||
{cq.height || cq.width ? (
|
{cq.height || cq.width ? (
|
||||||
<Suspense fallback={<Spinner container />}>
|
<Suspense fallback={<Spinner container />}>
|
||||||
|
|||||||
@@ -323,7 +323,7 @@ const normalizeAlbum = (
|
|||||||
originalDate: null,
|
originalDate: null,
|
||||||
participants: getPeople(item),
|
participants: getPeople(item),
|
||||||
playCount: item.UserData?.PlayCount || 0,
|
playCount: item.UserData?.PlayCount || 0,
|
||||||
recordLabels: [],
|
recordLabels: item.Studios?.map((entry) => entry.Name) || [],
|
||||||
releaseDate: item.PremiereDate || null,
|
releaseDate: item.PremiereDate || null,
|
||||||
releaseTypes: [],
|
releaseTypes: [],
|
||||||
releaseYear: item.ProductionYear || null,
|
releaseYear: item.ProductionYear || null,
|
||||||
|
|||||||
@@ -525,6 +525,11 @@ const albumArtist = z.object({
|
|||||||
UserData: userData.optional(),
|
UserData: userData.optional(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const studio = z.object({
|
||||||
|
Id: z.string(),
|
||||||
|
Name: z.string(),
|
||||||
|
});
|
||||||
|
|
||||||
const albumDetailParameters = baseParameters;
|
const albumDetailParameters = baseParameters;
|
||||||
|
|
||||||
const album = z.object({
|
const album = z.object({
|
||||||
@@ -555,6 +560,7 @@ const album = z.object({
|
|||||||
RunTimeTicks: z.number(),
|
RunTimeTicks: z.number(),
|
||||||
ServerId: z.string(),
|
ServerId: z.string(),
|
||||||
Songs: z.array(song).optional(), // This is not a native Jellyfin property -- this is used for combined album detail
|
Songs: z.array(song).optional(), // This is not a native Jellyfin property -- this is used for combined album detail
|
||||||
|
Studios: z.array(studio),
|
||||||
Tags: z.string().array().optional(),
|
Tags: z.string().array().optional(),
|
||||||
Type: z.string(),
|
Type: z.string(),
|
||||||
UserData: userData.optional(),
|
UserData: userData.optional(),
|
||||||
|
|||||||
Reference in New Issue
Block a user