« get me outta code hell

tracks have cover art if cover artists present - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2022-03-12 17:06:54 -0400
committer(quasar) nebula <qznebula@protonmail.com>2022-03-12 17:06:54 -0400
commitf27c98a228847d5f300a2d3c1252294d673b639e (patch)
treef24421760bef7c7a077ad85c8bc79d8b53629a6d /src/data/things.js
parent180bcfd0fce3631d13f46f3d27851e09acc05c63 (diff)
tracks have cover art if cover artists present
Diffstat (limited to 'src/data/things.js')
-rw-r--r--src/data/things.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/data/things.js b/src/data/things.js
index b48642a6..5889b119 100644
--- a/src/data/things.js
+++ b/src/data/things.js
@@ -609,9 +609,12 @@ Track.propertyDescriptors = {
         update: {validate: isBoolean},
 
         expose: {
-            dependencies: ['albumData'],
-            transform: (hasCoverArt, { albumData, [Track.instance]: track }) => (
-                hasCoverArt ?? Track.findAlbum(track, albumData)?.hasTrackArt ?? true)
+            dependencies: ['albumData', 'coverArtistContribsByRef'],
+            transform: (hasCoverArt, { albumData, coverArtistContribsByRef, [Track.instance]: track }) => (
+                hasCoverArt ??
+                (coverArtistContribsByRef?.length > 0 || null) ??
+                Track.findAlbum(track, albumData)?.hasTrackArt ??
+                true)
         }
     },