From cfa02cb03a363c46408db7f0ec54bd3a7e4ad018 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 12 Feb 2022 15:27:14 -0400 Subject: brb gonna make these into one file now --- src/thing/album.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/thing/album.js') diff --git a/src/thing/album.js b/src/thing/album.js index 426796b..ba75352 100644 --- a/src/thing/album.js +++ b/src/thing/album.js @@ -20,6 +20,8 @@ import { validateReferenceList, } from './validators.js'; +import Artist from './artist.js'; +import ArtTag from './art-tag.js'; import Track from './track.js'; import find from '../util/find.js'; @@ -75,7 +77,7 @@ export class TrackGroup extends CacheableObject { : []) ) } - } + }, }; } @@ -238,13 +240,17 @@ export default class Album extends Thing { // Update only - trackData: { - flags: {update: true}, - update: {validate: validateArrayItems(x => x instanceof Track)} - }, + artistData: Thing.genWikiDataProperty(Artist), + trackData: Thing.genWikiDataProperty(Track), // Expose only + // Previously known as: (album).artists + artistContribs: { + flags: {expose: true}, + expose: Thing.genContribsExpose('artistContribsByRef') + }, + tracks: { flags: {expose: true}, -- cgit 1.3.0-6-gf8a5