diff options
| author | (quasar) nebula <qznebula@protonmail.com> | 2025-11-20 15:51:14 -0400 |
|---|---|---|
| committer | (quasar) nebula <qznebula@protonmail.com> | 2025-11-25 07:06:49 -0400 |
| commit | f44b69b6079c80da98aafe9022cb68923e52a03c (patch) | |
| tree | f5899a51a4dba595a031b7a40c3e0ebd1a468380 /src/data/things/track.js | |
| parent | 03142771e556f9e115709832a98d81942528f10a (diff) | |
data, yaml: save() -> connect(), Thing.wikiData & friends
HOLY GUACAMOLE
Diffstat (limited to 'src/data/things/track.js')
| -rw-r--r-- | src/data/things/track.js | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/src/data/things/track.js b/src/data/things/track.js index 0d565086..4a24a9e0 100644 --- a/src/data/things/track.js +++ b/src/data/things/track.js @@ -76,7 +76,6 @@ import { inheritContributionListFromMainRelease, inheritFromMainRelease, withAllReleases, - withContainingTrackSection, withCoverArtistContribs, withDate, withDirectorySuffix, @@ -92,6 +91,16 @@ import { export class Track extends Thing { static [Thing.referenceType] = 'track'; + static [Thing.wikiData] = 'trackData'; + + static [Thing.constitutibleProperties] = [ + // Contributions currently aren't being observed for constitution. + // 'artistContribs', // from main release or album + // 'contributorContribs', // from main release + // 'coverArtistContribs', // from main release + + 'trackArtworks', // from inline fields + ]; static [Thing.getPropertyDescriptors] = ({ AdditionalFile, @@ -103,6 +112,7 @@ export class Track extends Thing { CreditingSourcesEntry, LyricsEntry, ReferencingSourcesEntry, + TrackSection, WikiInfo, }) => ({ // > Update & expose - Internal relationships @@ -111,6 +121,10 @@ export class Track extends Thing { class: input.value(Album), }), + trackSection: thing({ + class: input.value(TrackSection), + }), + // > Update & expose - Identifying metadata name: name('Unnamed Track'), @@ -263,10 +277,8 @@ export class Track extends Thing { validate: input.value(isBoolean), }), - withContainingTrackSection(), - withPropertyFromObject({ - object: '#trackSection', + object: 'trackSection', property: input.value('countTracksInArtistTotals'), }), @@ -285,10 +297,8 @@ export class Track extends Thing { validate: input.value(isColor), }), - withContainingTrackSection(), - withPropertyFromObject({ - object: '#trackSection', + object: 'trackSection', property: input.value('color'), }), @@ -510,6 +520,11 @@ export class Track extends Thing { commentatorArtists: commentatorArtists(), + directorySuffix: [ + withDirectorySuffix(), + exposeDependency({dependency: '#directorySuffix'}), + ], + date: [ withDate(), exposeDependency({dependency: '#date'}), |