fetch image by release group instead of release

This commit is contained in:
jeffvli
2026-02-07 13:12:19 -08:00
parent 56e2611992
commit a5992943d0
3 changed files with 10 additions and 11 deletions
+5 -3
View File
@@ -30,13 +30,15 @@ export function collectWorksFromRelease(release: IRelease): IWork[] {
export function getImageUrl(releaseId: string): string {
return `https://coverartarchive.org/release/${releaseId}/front-250.jpg`;
}
export function getImageUrlByReleaseGroupId(releaseGroupId: string): string {
return `https://coverartarchive.org/release-group/${releaseGroupId}/front-250.jpg`;
}
export function getMbzReleaseIdFromAlbumId(albumId: string): null | string {
if (!albumId.startsWith(MUSICBRAINZ_ID_PREFIX)) return null;
return albumId.slice(MUSICBRAINZ_ID_PREFIX.length);
}
// function getImageUrlByReleaseGroupId(releaseGroupId: string): string {
// return `https://coverartarchive.org/release-group/${releaseGroupId}/front-250.jpg`;
// }
// const MBZ_COUNTRY_CODES = {
// AD: 'Andorra',