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.is(response.linktype, 'artist');
|
||||
t.true(response.tracks.length > 3500);
|
||||
t.true(response.tracks.length > 450);
|
||||
});
|
||||
|
||||
test('PARSE SPOTIFY ARTIST', async (t) => {
|
||||
|
|
|
@ -103,8 +103,10 @@ export const parseInfo = async (url: string) => {
|
|||
await queue.addAll(
|
||||
artistAlbums.data.map((album) => {
|
||||
return async () => {
|
||||
const albumTracks = await getAlbumTracks(album.ALB_ID);
|
||||
tracks = [...tracks, ...albumTracks.data];
|
||||
if (album.ARTISTS.find((a) => a.ART_ID === info.id)) {
|
||||
const albumTracks = await getAlbumTracks(album.ALB_ID);
|
||||
tracks = [...tracks, ...albumTracks.data.filter((t) => t.ART_ID === info.id)];
|
||||
}
|
||||
};
|
||||
}),
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue