1
0

feat: discogs client with barcode/text search and release fetch

This commit is contained in:
2026-08-29 16:13:43 +02:00
parent b79a72a81b
commit 3715bb7447
3 changed files with 302 additions and 0 deletions

45
server/test/fixtures.ts Normal file
View File

@@ -0,0 +1,45 @@
export const discogsSearchFixture = {
results: [
{
id: 1001,
type: 'release',
title: 'The Cinematic Orchestra - Motion',
year: '1999',
format: ['CD', 'Album'],
label: ['Ninja Tune'],
country: 'UK',
catno: 'ZENCD012',
cover_image: 'https://img.discogs.com/big1.jpg',
thumb: 'https://img.discogs.com/small1.jpg',
},
{
id: 1002,
type: 'release',
title: 'The Cinematic Orchestra - Motion',
year: '1999',
format: ['Vinyl', '2xLP'],
label: ['Ninja Tune'],
country: 'UK',
catno: 'ZEN012',
cover_image: 'https://img.discogs.com/big2.jpg',
thumb: 'https://img.discogs.com/small2.jpg',
},
],
}
export const discogsReleaseFixture = {
id: 1001,
title: 'Motion',
artists: [{ name: 'The Cinematic Orchestra' }],
year: 1999,
formats: [{ name: 'CD', qty: '1' }],
labels: [{ name: 'Ninja Tune', catno: 'ZENCD012' }],
genres: ['Electronic', 'Jazz'],
country: 'UK',
images: [{ uri: 'https://img.discogs.com/full1.jpg' }],
tracklist: [
{ position: '1', title: 'Overture' },
{ position: '2', title: 'Theme de Yoyo' },
],
identifiers: [{ type: 'Barcode', value: '5021592210629' }],
}