From ccccc611c02eb33d0ec171ec862456b8ab1b59b1 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 18 Mar 2024 12:29:49 -0300 Subject: data: Bandcamp album/track IDs --- src/data/things/album.js | 13 +++++++++++++ src/data/things/track.js | 14 ++++++++++++++ 2 files changed, 27 insertions(+) (limited to 'src/data') diff --git a/src/data/things/album.js b/src/data/things/album.js index 01a232d0..336d777a 100644 --- a/src/data/things/album.js +++ b/src/data/things/album.js @@ -48,6 +48,9 @@ export class Album extends Thing { directory: directory(), urls: urls(), + bandcampAlbumIdentifier: simpleString(), + bandcampArtworkIdentifier: simpleString(), + date: simpleDate(), trackArtDate: simpleDate(), dateAddedToWiki: simpleDate(), @@ -218,6 +221,16 @@ export class Album extends Thing { 'Album': {property: 'name'}, 'Directory': {property: 'directory'}, + 'Bandcamp Album ID': { + property: 'bandcampAlbumIdentifier', + transform: String, + }, + + 'Bandcamp Artwork ID': { + property: 'bandcampArtworkIdentifier', + transform: String, + }, + 'Date': { property: 'date', transform: parseDate, diff --git a/src/data/things/track.js b/src/data/things/track.js index 93beb5e2..697dad44 100644 --- a/src/data/things/track.js +++ b/src/data/things/track.js @@ -42,6 +42,7 @@ import { reverseReferenceList, simpleDate, singleReference, + simpleString, urls, wikiData, } from '#composite/wiki-properties'; @@ -73,6 +74,9 @@ export class Track extends Thing { sharedAdditionalNames: sharedAdditionalNameList(), inferredAdditionalNames: inferredAdditionalNameList(), + bandcampTrackIdentifier: simpleString(), + bandcampArtworkIdentifier: simpleString(), + duration: duration(), urls: urls(), dateFirstReleased: simpleDate(), @@ -355,6 +359,16 @@ export class Track extends Thing { transform: parseAdditionalNames, }, + 'Bandcamp Track ID': { + property: 'bandcampTrackIdentifier', + transform: String, + }, + + 'Bandcamp Artwork ID': { + property: 'bandcampArtworkIdentifier', + transform: String, + }, + 'Duration': { property: 'duration', transform: parseDuration, -- cgit 1.3.0-6-gf8a5