mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
Genre with id and name, rather than just name
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user