Genre with id and name, rather than just name

This commit is contained in:
simojenki
2021-03-19 20:31:39 +11:00
parent 852cc34a43
commit 0e3fd9d781
8 changed files with 168 additions and 112 deletions

View File

@@ -49,18 +49,23 @@ export type AlbumSummary = {
id: string;
name: string;
year: string | undefined;
genre: string | undefined;
genre: Genre | undefined;
};
export type Album = AlbumSummary & {};
export type Genre = {
name: string;
id: string;
}
export type Track = {
id: string;
name: string;
mimeType: string;
duration: number;
number: number | undefined;
genre: string | undefined;
genre: Genre | undefined;
album: AlbumSummary;
artist: ArtistSummary;
};
@@ -137,7 +142,7 @@ export interface MusicLibrary {
album(id: string): Promise<Album>;
tracks(albumId: string): Promise<Track[]>;
track(trackId: string): Promise<Track>;
genres(): Promise<string[]>;
genres(): Promise<Genre[]>;
stream({
trackId,
range,