diff options
-rw-r--r-- | src/data/things/artist.js | 11 | ||||
-rw-r--r-- | src/data/things/group.js | 14 | ||||
-rw-r--r-- | src/data/yaml.js | 2 |
3 files changed, 25 insertions, 2 deletions
diff --git a/src/data/things/artist.js b/src/data/things/artist.js index 6d5e33c0..8ac370c2 100644 --- a/src/data/things/artist.js +++ b/src/data/things/artist.js @@ -34,7 +34,7 @@ export class Artist extends Thing { static [Thing.referenceType] = 'artist'; static [Thing.wikiDataArray] = 'artistData'; - static [Thing.getPropertyDescriptors] = ({Album, Flash, Track}) => ({ + static [Thing.getPropertyDescriptors] = ({Album, Flash, Group, Track}) => ({ // Update & expose name: name('Unnamed Artist'), @@ -74,6 +74,10 @@ export class Artist extends Thing { class: input.value(Flash), }), + groupData: wikiData({ + class: input.value(Group), + }), + trackData: wikiData({ class: input.value(Track), }), @@ -135,6 +139,11 @@ export class Artist extends Thing { list: input.value('commentatorArtists'), }), + closelyLinkedGroups: reverseReferenceList({ + data: 'groupData', + list: input.value('closelyLinkedArtists'), + }), + totalDuration: artistTotalDuration(), }); diff --git a/src/data/things/group.js b/src/data/things/group.js index e000e407..06791ccc 100644 --- a/src/data/things/group.js +++ b/src/data/things/group.js @@ -19,7 +19,7 @@ import { export class Group extends Thing { static [Thing.referenceType] = 'group'; - static [Thing.getPropertyDescriptors] = ({Album}) => ({ + static [Thing.getPropertyDescriptors] = ({Album, Artist}) => ({ // Update & expose name: name('Unnamed Group'), @@ -29,6 +29,12 @@ export class Group extends Thing { urls: urls(), + closelyLinkedArtists: referenceList({ + class: input.value(Artist), + find: input.value(find.artist), + data: 'artistData', + }), + featuredAlbums: referenceList({ class: input.value(Album), find: input.value(find.album), @@ -45,6 +51,10 @@ export class Group extends Thing { class: input.value(Album), }), + artistData: wikiData({ + class: input.value(Artist), + }), + groupCategoryData: wikiData({ class: input.value(GroupCategory), }), @@ -110,6 +120,8 @@ export class Group extends Thing { 'Description': {property: 'description'}, 'URLs': {property: 'urls'}, + 'Closely Linked Artists': {property: 'closelyLinkedArtists'}, + 'Featured Albums': {property: 'featuredAlbums'}, 'Series': { diff --git a/src/data/yaml.js b/src/data/yaml.js index b2143625..1218a8a0 100644 --- a/src/data/yaml.js +++ b/src/data/yaml.js @@ -1224,6 +1224,7 @@ export function linkWikiDataArrays(wikiData) { 'albumData', 'artistData', 'flashData', + 'groupData', 'trackData', ]], @@ -1245,6 +1246,7 @@ export function linkWikiDataArrays(wikiData) { [wikiData.groupData, [ 'albumData', + 'artistData', 'groupCategoryData', ]], |