mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-19 18:04:22 +02:00
Add albumartists to related album
This commit is contained in:
@@ -156,12 +156,19 @@ const imageUrl = (
|
|||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
const relatedAlbum = (item: Album) => {
|
const relatedAlbum = (
|
||||||
|
item: Album & {
|
||||||
|
albumArtists: AlbumArtist[];
|
||||||
|
}
|
||||||
|
) => {
|
||||||
return {
|
return {
|
||||||
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
||||||
id: item.id,
|
id: item.id,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
remoteId: item.remoteId,
|
remoteId: item.remoteId,
|
||||||
|
albumArtists: item.albumArtists
|
||||||
|
? relatedAlbumArtists(item.albumArtists)
|
||||||
|
: [],
|
||||||
deleted: item.deleted,
|
deleted: item.deleted,
|
||||||
/* eslint-enable sort-keys-fix/sort-keys-fix */
|
/* eslint-enable sort-keys-fix/sort-keys-fix */
|
||||||
};
|
};
|
||||||
@@ -325,7 +332,7 @@ const buildImageUrl = (options: {
|
|||||||
type DbSong = Song & DbSongInclude;
|
type DbSong = Song & DbSongInclude;
|
||||||
|
|
||||||
type DbSongInclude = {
|
type DbSongInclude = {
|
||||||
album: Album & { images: Image[] };
|
album: Album & { albumArtists: AlbumArtist[]; images: Image[] };
|
||||||
artists: Artist[];
|
artists: Artist[];
|
||||||
externals: External[];
|
externals: External[];
|
||||||
genres: Genre[];
|
genres: Genre[];
|
||||||
@@ -650,6 +657,7 @@ const tasks = (options: { items: DbTask[] | any[] }) => {
|
|||||||
|
|
||||||
export const toApiModel = {
|
export const toApiModel = {
|
||||||
albums,
|
albums,
|
||||||
|
genres,
|
||||||
servers,
|
servers,
|
||||||
songs,
|
songs,
|
||||||
tasks,
|
tasks,
|
||||||
|
|||||||
Reference in New Issue
Block a user