« get me outta code hell

content: listTracksWithMusicVideos - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-01-17 04:34:48 -0400
committer(quasar) nebula <qznebula@protonmail.com>2026-01-17 04:35:00 -0400
commite2c11819c26e97f6715b4327f564e8601fd04cb3 (patch)
treeae98875eb97e805c79d93b526262f1dc6e9abf4c /src
parent36b99391128458f47a7d93762467d74389478824 (diff)
content: listTracksWithMusicVideos
Diffstat (limited to 'src')
-rw-r--r--src/content/dependencies/listTracksWithMusicVideos.js7
-rw-r--r--src/listing-spec.js9
-rw-r--r--src/strings-default.yaml12
3 files changed, 27 insertions, 1 deletions
diff --git a/src/content/dependencies/listTracksWithMusicVideos.js b/src/content/dependencies/listTracksWithMusicVideos.js
new file mode 100644
index 00000000..b61832e5
--- /dev/null
+++ b/src/content/dependencies/listTracksWithMusicVideos.js
@@ -0,0 +1,7 @@
+export default {
+  relations: (relation, spec) =>
+    ({page: relation('listTracksWithExtra', spec, 'musicVideos', 'array')}),
+
+  generate: (relations) =>
+    relations.page,
+};
diff --git a/src/listing-spec.js b/src/listing-spec.js
index a301845b..019b34ab 100644
--- a/src/listing-spec.js
+++ b/src/listing-spec.js
@@ -178,7 +178,14 @@ listingSpec.push({
   directory: 'tracks/with-lyrics',
   stringsKey: 'listTracks.withLyrics',
   contentFunction: 'listTracksWithLyrics',
-  seeAlso: ['tracks/needing-lyrics'],
+  seeAlso: ['tracks/needing-lyrics', 'tracks/with-music-videos'],
+});
+
+listingSpec.push({
+  directory: 'tracks/with-music-videos',
+  stringsKey: 'listTracks.withMusicVideos',
+  contentFunction: 'listTracksWithMusicVideos',
+  seeAlso: ['tracks/with-lyrics'],
 });
 
 listingSpec.push({
diff --git a/src/strings-default.yaml b/src/strings-default.yaml
index dc6bffdd..6cdb9727 100644
--- a/src/strings-default.yaml
+++ b/src/strings-default.yaml
@@ -2305,6 +2305,18 @@ listingPage:
         title.withDate: "{ALBUM} ({DATE})"
         item: "{TRACK}"
 
+    # listTracks.withMusicVideos:
+    #   The same as withLyrics, but for music videos.
+
+    withMusicVideos:
+      title: "Tracks - with Music Videos"
+      title.short: "...with Music Videos"
+
+      chunk:
+        title: "{ALBUM}"
+        title.withDate: "{ALBUM} ({DATE})"
+        item: "{TRACK}"
+
     # listTracks.withSheetMusicFiles:
     #   List tracks, chunked by album (which are sorted by date,
     #   falling back alphabetically) and in their usual track order,