« get me outta code hell

data, content: Album.musicVideos - 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>2026-01-31 23:02:08 -0400
committer(quasar) nebula <qznebula@protonmail.com>2026-01-31 23:03:14 -0400
commit7ef4941fa8cc00b0ea128f51fd859f264800fe05 (patch)
treec006e2e01448a205d532ee129a29c88323fe68dc /src/data/things
parent180d3e169b10db5f1837567eca9bf1b2d5542b96 (diff)
data, content: Album.musicVideos
Diffstat (limited to 'src/data/things')
-rw-r--r--src/data/things/album/Album.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/data/things/album/Album.js b/src/data/things/album/Album.js
index 48d52223..8dcc6854 100644
--- a/src/data/things/album/Album.js
+++ b/src/data/things/album/Album.js
@@ -14,6 +14,7 @@ import {
   parseCreditingSources,
   parseDate,
   parseDimensions,
+  parseMusicVideos,
   parseWallpaperParts,
 } from '#yaml';
 
@@ -76,6 +77,7 @@ export class Album extends Thing {
     CommentaryEntry,
     CreditingSourcesEntry,
     Group,
+    MusicVideo,
     TrackArtistContribution,
     TrackSection,
     WikiInfo,
@@ -350,6 +352,10 @@ export class Album extends Thing {
       find: soupyFind.input('group'),
     }),
 
+    // > Update & expose - Music videos
+
+    musicVideos: thingList(V(MusicVideo)),
+
     // > Update & expose - Content entries
 
     commentary: thingList(V(CommentaryEntry)),
@@ -744,6 +750,13 @@ export class Album extends Thing {
 
       'Groups': {property: 'groups'},
 
+      // Music videos
+
+      'Music Videos': {
+        property: 'musicVideos',
+        transform: parseMusicVideos,
+      },
+
       // Content entries
 
       'Commentary': {
@@ -843,6 +856,18 @@ export class Album extends Thing {
     ];
   }
 
+  getOwnMusicVideoCoverPath(musicVideo) {
+    // Lala, same shenanigan as above, this is media.trackCover
+    // where it shouldn't be.
+
+    return [
+      'media.trackCover',
+      this.directory,
+      musicVideo.unqualifiedDirectory,
+      musicVideo.coverArtFileExtension,
+    ];
+  }
+
   // As of writing, albums don't even have a `duration` property...
   // so this function will never be called... but the message stands...
   countOwnContributionInDurationTotals(_contrib) {