From e8670dd43d70ef91df6dc1164d11397de639e3b8 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 6 Apr 2025 15:44:16 -0300 Subject: data: Track: withHasUniqueCoverArt: process direct links only No soupyFind/soupyReverse. This commit introduces a notion of difference between an artwork which is 'declared to exist' via, say, having cover artists, versus one which... is 'usable', because it has resolved cover artists. No other code addressing this yet, so it's in a tense state where existence is in every case according to declared cover artists, whether or not those cover artist references resolve. --- src/data/composite/things/track/withPropertyFromAlbum.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/data/composite/things/track/withPropertyFromAlbum.js') diff --git a/src/data/composite/things/track/withPropertyFromAlbum.js b/src/data/composite/things/track/withPropertyFromAlbum.js index 311a3448..a203c2e7 100644 --- a/src/data/composite/things/track/withPropertyFromAlbum.js +++ b/src/data/composite/things/track/withPropertyFromAlbum.js @@ -10,6 +10,7 @@ export default templateCompositeFrom({ inputs: { property: input.staticValue({type: 'string'}), + internal: input({type: 'boolean', defaultValue: false}), }, outputs: ({ @@ -17,10 +18,21 @@ export default templateCompositeFrom({ }) => ['#album.' + property], steps: () => [ + // XXX: This is a ridiculous hack considering `defaultValue` above. + // If we were certain what was up, we'd just get around to fixing it LOL + { + dependencies: [input('internal')], + compute: (continuation, { + [input('internal')]: internal, + }) => continuation({ + ['#internal']: internal ?? false, + }), + }, withPropertyFromObject({ object: 'album', property: input('property'), + internal: '#internal', }), { -- cgit 1.3.0-6-gf8a5