« get me outta code hell

data: {Album, Track}.referencedByArtworks - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things/album.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-11-19 09:03:20 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-11-19 09:22:22 -0400
commitd2bc9d725c83ab8d6131598b7763c7e711f9697a (patch)
tree052674ab1f6499d5dbc1af8b972118ad2ef90baa /src/data/things/album.js
parent3baf0c1c8cf9989d4b6e50baa90fc24f1b99b8b5 (diff)
data: {Album, Track}.referencedByArtworks
Diffstat (limited to 'src/data/things/album.js')
-rw-r--r--src/data/things/album.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/data/things/album.js b/src/data/things/album.js
index af7f0239..35cf1f3e 100644
--- a/src/data/things/album.js
+++ b/src/data/things/album.js
@@ -49,6 +49,7 @@ import {
   name,
   referencedArtworkList,
   referenceList,
+  reverseReferencedArtworkList,
   simpleDate,
   simpleString,
   singleReference,
@@ -280,6 +281,15 @@ export class Album extends Thing {
       withTracks(),
       exposeDependency({dependency: '#tracks'}),
     ],
+
+    referencedByArtworks: [
+      exitWithoutContribs({
+        contribs: 'coverArtistContribs',
+        value: input.value([]),
+      }),
+
+      reverseReferencedArtworkList(),
+    ],
   });
 
   static [Thing.getSerializeDescriptors] = ({