From d746ff26c3e7517c8aaff7615ae4da06fa2d01c0 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 19 Nov 2024 15:56:14 -0400 Subject: data, checks: find.{album,track}WithArtwork --- src/data/things/album.js | 8 ++++++++ src/data/things/track.js | 13 +++++++++++++ 2 files changed, 21 insertions(+) (limited to 'src/data/things') diff --git a/src/data/things/album.js b/src/data/things/album.js index 35cf1f3e..3f3f195a 100644 --- a/src/data/things/album.js +++ b/src/data/things/album.js @@ -337,6 +337,14 @@ export class Album extends Thing { referenceTypes: ['album', 'album-commentary', 'album-gallery'], bindTo: 'albumData', }, + + albumWithArtwork: { + referenceTypes: ['album'], + bindTo: 'albumData', + + include: album => + album.hasCoverArt, + }, }; static [Thing.yamlDocumentSpec] = { diff --git a/src/data/things/track.js b/src/data/things/track.js index 0ac6aabd..408f18fb 100644 --- a/src/data/things/track.js +++ b/src/data/things/track.js @@ -628,6 +628,19 @@ export class Track extends Thing { ? [] : [track.name]), }, + + trackWithArtwork: { + referenceTypes: ['track'], + bindTo: 'trackData', + + include: track => + track.hasUniqueCoverArt, + + getMatchableNames: track => + (track.alwaysReferenceByDirectory + ? [] + : [track.name]), + }, }; // Track YAML loading is handled in album.js. -- cgit 1.3.0-6-gf8a5