URN for image info (#78)

* Allow music service to return a URN identifying cover art for an entity

* Fix bug with playlist cover art rending same album multiple times
This commit is contained in:
Simon J
2021-11-15 17:33:51 +11:00
committed by GitHub
parent bb4172acf4
commit 6321cb71a4
18 changed files with 1191 additions and 1322 deletions

View File

@@ -24,6 +24,7 @@ import {
Genre,
Rating,
} from "../src/music_service";
import { BUrn } from "../src/burn";
export class InMemoryMusicService implements MusicService {
users: Record<string, string> = {};
@@ -131,8 +132,8 @@ export class InMemoryMusicService implements MusicService {
),
stream: (_: { trackId: string; range: string | undefined }) =>
Promise.reject("unsupported operation"),
coverArt: (id: string, size?: number) =>
Promise.reject(`Cannot retrieve coverArt for ${id}, size ${size}`),
coverArt: (coverArtURN: BUrn, size?: number) =>
Promise.reject(`Cannot retrieve coverArt for ${coverArtURN}, size ${size}`),
scrobble: async (_: string) => {
return Promise.resolve(true);
},