From 6f9e037670476a0829c133872ab3271a0f29de47 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 12 May 2022 19:04:13 -0300 Subject: make commentary a Thing.common prop --- src/data/things.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/data/things.js b/src/data/things.js index 8535830..0695b0d 100644 --- a/src/data/things.js +++ b/src/data/things.js @@ -201,6 +201,12 @@ Thing.common = { update: {validate: isContributionList} }), + // Artist commentary! Generally present on tracks and albums. + commentary: () => ({ + flags: {update: true, expose: true}, + update: {validate: isCommentary} + }), + // A reference list! Keep in mind this is for general references to wiki // objects of (usually) other Thing subclasses, not specifically leitmotif // references in tracks (although that property uses referenceList too!). @@ -490,10 +496,7 @@ Album.propertyDescriptors = { isMajorRelease: Thing.common.flag(false), isListedOnHomepage: Thing.common.flag(true), - commentary: { - flags: {update: true, expose: true}, - update: {validate: isCommentary} - }, + commentary: Thing.common.commentary(), // Update only @@ -707,11 +710,7 @@ Track.propertyDescriptors = { dataSourceAlbumByRef: Thing.common.singleReference(Album), - commentary: { - flags: {update: true, expose: true}, - update: {validate: isCommentary} - }, - + commentary: Thing.common.commentary(), lyrics: Thing.common.simpleString(), // Update only -- cgit 1.3.0-6-gf8a5