« get me outta code hell

content: generateListRandomPageLinksGroupSection: exclude one-track albums - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-08-13 23:49:25 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-08-13 23:49:25 -0300
commita080fff517a78cf272030e0d3bffd777391518c2 (patch)
treee1f040e73c424399aa8fe3272f6bb5f540d77201
parent1aec864eb848510ac85e94bc5a989ace95104f4f (diff)
content: generateListRandomPageLinksGroupSection: exclude one-track albums
-rw-r--r--src/content/dependencies/generateListRandomPageLinksGroupSection.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/content/dependencies/generateListRandomPageLinksGroupSection.js b/src/content/dependencies/generateListRandomPageLinksGroupSection.js
index 006ebdf..e2b57fe 100644
--- a/src/content/dependencies/generateListRandomPageLinksGroupSection.js
+++ b/src/content/dependencies/generateListRandomPageLinksGroupSection.js
@@ -10,7 +10,8 @@ export default {
   query: (sprawl, group) => ({
     albums:
       sortChronologically(sprawl.albumData.slice())
-        .filter(album => album.groups.includes(group)),
+        .filter(album => album.groups.includes(group))
+        .filter(album => album.tracks.length > 1),
   }),
 
   relations: (relation, query, sprawl, group) => ({