Filter out duplicate known links (#10).
This commit is contained in:
parent
fe76a410a3
commit
b0a3b960cc
|
@ -50,8 +50,9 @@ export default class Release {
|
||||||
? `https://coverartarchive.org/release/${mbid}/front-500`
|
? `https://coverartarchive.org/release/${mbid}/front-500`
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
const links = data.relations
|
const relations = new Set(data.relations.map(({url}) => url.resource));
|
||||||
.map(({url}) => new RelationLink(url.resource))
|
const links = Array.from(relations)
|
||||||
|
.map((url) => new RelationLink(url))
|
||||||
.sort((a, b) => a.text.localeCompare(b.text));
|
.sort((a, b) => a.text.localeCompare(b.text));
|
||||||
|
|
||||||
return new Release({
|
return new Release({
|
||||||
|
|
Loading…
Reference in New Issue