« get me outta code hell

data: Bandcamp album/track IDs - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-03-18 12:29:49 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-03-18 12:29:49 -0300
commitccccc611c02eb33d0ec171ec862456b8ab1b59b1 (patch)
treed39560f87b289b7c10e90c2bf33418f803db5573 /src/data/things
parent2b232324435e175626e382eaad02fbccc5f45e9b (diff)
data: Bandcamp album/track IDs
Diffstat (limited to 'src/data/things')
-rw-r--r--src/data/things/album.js13
-rw-r--r--src/data/things/track.js14
2 files changed, 27 insertions, 0 deletions
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,