Similar songs (#18)

* Support for getting similarSongs from navidrome

* Ability to load topSongs from navidrome

* Load artists not in library from navidrome
This commit is contained in:
Simon J
2021-08-14 09:13:29 +10:00
committed by GitHub
parent 66b6f24e61
commit 43c335ecfc
7 changed files with 576 additions and 100 deletions

View File

@@ -39,10 +39,12 @@ export const NO_IMAGES: Images = {
large: undefined,
};
export type SimilarArtist = ArtistSummary & { inLibrary: boolean };
export type Artist = ArtistSummary & {
image: Images
albums: AlbumSummary[];
similarArtists: ArtistSummary[]
similarArtists: SimilarArtist[]
};
export type AlbumSummary = {
@@ -179,4 +181,6 @@ export interface MusicLibrary {
deletePlaylist(id: string): Promise<boolean>
addToPlaylist(playlistId: string, trackId: string): Promise<boolean>
removeFromPlaylist(playlistId: string, indicies: number[]): Promise<boolean>
similarSongs(id: string): Promise<Track[]>;
topSongs(artistId: string): Promise<Track[]>;
}