Move artists tests

This commit is contained in:
simon
2025-02-23 03:07:15 +00:00
parent 3a14b62de4
commit 6897397c28
3 changed files with 171 additions and 192 deletions

View File

@@ -124,17 +124,15 @@ export class SubsonicMusicLibrary implements MusicLibrary {
bearerToken = (_: Credentials) =>
TE.right<AuthFailure, string | undefined>(undefined);
// todo: q needs to support greater than the max page size supported by subsonic
// maybe subsonic should error?
artists = (q: ArtistQuery): Promise<Result<ArtistSummary>> =>
this.subsonic
.getArtists(this.credentials)
.then(slice2(q))
.then(([page, total]) => ({
total,
results: page.map((it) => ({
id: it.id,
name: it.name,
image: it.image,
})),
results: page,
}));
artist = async (id: string): Promise<Artist> =>