add favorites list

This commit is contained in:
jeffvli
2025-11-30 01:12:29 -08:00
parent 1c0cbafa3e
commit cb3c0fe0d4
17 changed files with 377 additions and 9 deletions
@@ -210,7 +210,6 @@ const normalizeSong = (
releaseYear: item.year || null,
sampleRate: item.sampleRate || null,
size: item.size,
streamUrl: `${server?.url}/rest/stream.view?id=${id}&v=1.13.0&c=Feishin&${server?.credential}`,
tags: item.tags || null,
trackNumber: item.trackNumber,
updatedAt: item.updatedAt,
@@ -195,7 +195,7 @@ const normalizeSong = (
tags: null,
trackNumber: item.track || 1,
updatedAt: '',
userFavorite: item.starred || false,
userFavorite: Boolean(item.starred) || false,
userRating: item.userRating || null,
};
};
@@ -232,7 +232,7 @@ const normalizeAlbumArtist = (
playCount: null,
similarArtists: [],
songCount: null,
userFavorite: false,
userFavorite: Boolean(item.starred) || false,
userRating: null,
};
};
@@ -290,7 +290,7 @@ const normalizeAlbum = (
) || [],
tags: null,
updatedAt: item.created,
userFavorite: item.starred || false,
userFavorite: Boolean(item.starred) || false,
userRating: item.userRating || null,
version: item.version || null,
};
+2
View File
@@ -661,6 +661,7 @@ export type AlbumArtistListCountArgs = BaseEndpointArgs & {
export interface AlbumArtistListQuery extends BaseQuery<AlbumArtistListSort> {
_custom?: Record<string, any>;
favorite?: boolean;
limit?: number;
musicFolderId?: string | string[];
searchTerm?: string;
@@ -753,6 +754,7 @@ export type ArtistListCountArgs = BaseEndpointArgs & { query: ListCountQuery<Art
export interface ArtistListQuery extends BaseQuery<ArtistListSort> {
_custom?: Record<string, any>;
favorite?: boolean;
limit?: number;
musicFolderId?: string | string[];
role?: string;