Skip to content

Commit 966b38b

Browse files
committed
fix(web): Skip offer to seed external links for Various Artists
1 parent b01f656 commit 966b38b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/routes/release/actions.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import type {
2020
import { CombinedReleaseLookup } from '@/lookup.ts';
2121
import { MB } from '@/musicbrainz/api_client.ts';
2222
import { extractMBID } from '@/musicbrainz/extract_mbid.ts';
23+
import { variousArtists } from '@/musicbrainz/special_entities.ts';
2324
import { providers as providerRegistry } from '@/providers/mod.ts';
2425
import { extractReleaseLookupState } from '@/server/state.ts';
2526
import { LookupError, ProviderError } from '@/utils/errors.ts';
@@ -102,10 +103,12 @@ export default defineRoute(async (req, ctx) => {
102103
allRecordings = allTracks.map((track) => ({ name: track.title, ...track.recording }));
103104

104105
// Combine and deduplicate release and track artists.
106+
// Drop special purpose artist Various Artists, which can't be edited on MB (by regular users).
105107
const trackArtists = allTracks
106108
.flatMap((track) => track.artists)
107109
.filter(isDefined);
108-
allArtists = deduplicateEntities(release.artists.concat(trackArtists));
110+
allArtists = deduplicateEntities(release.artists.concat(trackArtists))
111+
.filter((artist) => artist.mbid !== variousArtists.mbid);
109112

110113
// Load URL relationships for related artists, recordings and labels of the release.
111114
// These will be used to skip suggestions to seed external links which already exist.

0 commit comments

Comments
 (0)