diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-11-17 08:44:06 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-11-17 13:40:01 -0400 |
commit | 0d74914e3c3c345ddac3025b561b88ed9a055f95 (patch) | |
tree | 7770ad0c4c81eebc34b3702c09c839efe134b808 /src/data/things | |
parent | 6bcbe4f3489bafff4a78f87e030c08db734af021 (diff) |
data, content: closely linked artist annotations
Basic implementation only here, nothing custom for particular annotations for example.
Diffstat (limited to 'src/data/things')
-rw-r--r-- | src/data/things/artist.js | 3 | ||||
-rw-r--r-- | src/data/things/group.js | 10 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/data/things/artist.js b/src/data/things/artist.js index 8ac370c2..c6ee222a 100644 --- a/src/data/things/artist.js +++ b/src/data/things/artist.js @@ -21,6 +21,7 @@ import { fileExtension, flag, name, + reverseAnnotatedReferenceList, reverseContributionList, reverseReferenceList, singleReference, @@ -139,7 +140,7 @@ export class Artist extends Thing { list: input.value('commentatorArtists'), }), - closelyLinkedGroups: reverseReferenceList({ + closelyLinkedGroups: reverseAnnotatedReferenceList({ data: 'groupData', list: input.value('closelyLinkedArtists'), }), diff --git a/src/data/things/group.js b/src/data/things/group.js index 06791ccc..4a790140 100644 --- a/src/data/things/group.js +++ b/src/data/things/group.js @@ -3,9 +3,10 @@ export const GROUP_DATA_FILE = 'groups.yaml'; import {input} from '#composite'; import find from '#find'; import Thing from '#thing'; -import {parseSerieses} from '#yaml'; +import {parseAnnotatedReferences, parseSerieses} from '#yaml'; import { + annotatedReferenceList, color, contentString, directory, @@ -29,7 +30,7 @@ export class Group extends Thing { urls: urls(), - closelyLinkedArtists: referenceList({ + closelyLinkedArtists: annotatedReferenceList({ class: input.value(Artist), find: input.value(find.artist), data: 'artistData', @@ -120,7 +121,10 @@ export class Group extends Thing { 'Description': {property: 'description'}, 'URLs': {property: 'urls'}, - 'Closely Linked Artists': {property: 'closelyLinkedArtists'}, + 'Closely Linked Artists': { + property: 'closelyLinkedArtists', + transform: parseAnnotatedReferences, + }, 'Featured Albums': {property: 'featuredAlbums'}, |