mirror of
https://github.com/d-fi/d-fi-core.git
synced 2025-07-23 21:55:27 +02:00
improve artist match
This commit is contained in:
parent
ca0ec8e436
commit
b9f696ac6f
@ -103,7 +103,7 @@ test('PARSE DEEZER ARTIST', async (t) => {
|
|||||||
|
|
||||||
t.deepEqual(response.info, {id: '13', type: 'artist'});
|
t.deepEqual(response.info, {id: '13', type: 'artist'});
|
||||||
t.is(response.linktype, 'artist');
|
t.is(response.linktype, 'artist');
|
||||||
t.true(response.tracks.length > 3500);
|
t.true(response.tracks.length > 450);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('PARSE SPOTIFY ARTIST', async (t) => {
|
test('PARSE SPOTIFY ARTIST', async (t) => {
|
||||||
|
@ -103,8 +103,10 @@ export const parseInfo = async (url: string) => {
|
|||||||
await queue.addAll(
|
await queue.addAll(
|
||||||
artistAlbums.data.map((album) => {
|
artistAlbums.data.map((album) => {
|
||||||
return async () => {
|
return async () => {
|
||||||
const albumTracks = await getAlbumTracks(album.ALB_ID);
|
if (album.ARTISTS.find((a) => a.ART_ID === info.id)) {
|
||||||
tracks = [...tracks, ...albumTracks.data];
|
const albumTracks = await getAlbumTracks(album.ALB_ID);
|
||||||
|
tracks = [...tracks, ...albumTracks.data.filter((t) => t.ART_ID === info.id)];
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user