feat: enhance discovery, vibe sessions, and library enrichment
This commit is contained in:
@@ -24,13 +24,9 @@ function deduplicateArtists(artists: TrackArtist[]): TrackArtist[] {
|
||||
map.set(a.id, a);
|
||||
}
|
||||
}
|
||||
// Preserve original order, skipping duplicates.
|
||||
const seen = new Set<string>();
|
||||
return artists.filter((a) => {
|
||||
if (seen.has(a.id)) return false;
|
||||
seen.add(a.id);
|
||||
return true;
|
||||
});
|
||||
// Keep the position of the selected credit and omit every duplicate. This
|
||||
// makes the documented main-over-featured preference real.
|
||||
return artists.filter((a) => map.get(a.id) === a);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user