« get me outta code hell

data: Artist.totalDuration - 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-06 14:28:35 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-06-18 22:56:02 -0300
commit5db0e13f3a70612b453124c0d00a4933c4d24b88 (patch)
tree1afb8a10eb7c0d02d94925a23483fa51f6fcc0ab /src/data/things
parent23b51a7984cce0839c37572c8386aaf0d2195609 (diff)
data: Artist.totalDuration
This is sort of a stub / proof of concept function.
The contained logic may be refactored a bit more still!
Diffstat (limited to 'src/data/things')
-rw-r--r--src/data/things/artist.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/data/things/artist.js b/src/data/things/artist.js
index 841d652f..3e4c8c2c 100644
--- a/src/data/things/artist.js
+++ b/src/data/things/artist.js
@@ -12,6 +12,7 @@ import Thing from '#thing';
 import {isName, validateArrayItems} from '#validators';
 import {getKebabCase} from '#wiki-data';
 
+import {exposeDependency} from '#composite/control-flow';
 import {withReverseContributionList} from '#composite/wiki-data';
 
 import {
@@ -27,6 +28,8 @@ import {
   wikiData,
 } from '#composite/wiki-properties';
 
+import {artistTotalDuration} from '#composite/things/artist';
+
 export class Artist extends Thing {
   static [Thing.referenceType] = 'artist';
   static [Thing.wikiDataArray] = 'artistData';
@@ -225,6 +228,8 @@ export class Artist extends Thing {
       data: 'flashData',
       list: input.value('commentatorArtists'),
     }),
+
+    totalDuration: artistTotalDuration(),
   });
 
   static [Thing.getSerializeDescriptors] = ({