diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-02-12 15:27:14 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-02-12 15:27:14 -0400 |
commit | cfa02cb03a363c46408db7f0ec54bd3a7e4ad018 (patch) | |
tree | 9dbd2f26cc200838717404163037953924f3e194 /src/thing/track.js | |
parent | f028105cbb268af2c3039215557ed6f531c688d4 (diff) |
brb gonna make these into one file now
Diffstat (limited to 'src/thing/track.js')
-rw-r--r-- | src/thing/track.js | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/thing/track.js b/src/thing/track.js index d0e88acf..3edabc92 100644 --- a/src/thing/track.js +++ b/src/thing/track.js @@ -17,6 +17,7 @@ import { } from './validators.js'; import Album from './album.js'; +import Artist from './artist.js'; import ArtTag from './art-tag.js'; import find from '../util/find.js'; @@ -100,6 +101,7 @@ export default class Track extends Thing { update: {validate: validateReferenceList('tag')} }, + // Previously known as: (track).aka originalReleaseTrackByRef: { flags: {update: true, expose: true}, update: {validate: validateReference('track')} @@ -117,15 +119,9 @@ export default class Track extends Thing { // Update only - albumData: { - flags: {update: true}, - update: {validate: validateArrayItems(x => x instanceof Album)} - }, - - artTagData: { - flags: {update: true}, - update: {validate: validateArrayItems(x => x instanceof ArtTag)} - }, + albumData: Thing.genWikiDataProperty(Album), + artistData: Thing.genWikiDataProperty(Artist), + artTagData: Thing.genWikiDataProperty(ArtTag), // Expose only @@ -152,6 +148,12 @@ export default class Track extends Thing { } }, + // Previously known as: (track).artists + artistContribs: { + flags: {expose: true}, + expose: Thing.genContribsExpose('artistContribsByRef') + }, + artTags: { flags: {expose: true}, |