diff options
Diffstat (limited to 'src/data/things')
-rw-r--r-- | src/data/things/artist.js | 11 | ||||
-rw-r--r-- | src/data/things/group.js | 14 |
2 files changed, 23 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': { |