From 1df75ef3542f704c5074cf68b2e38bc7f552e212 Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Sat, 26 Sep 2026 19:37:38 +0000 Subject: [PATCH] docs: Add example of conditional run with art --- .../configuration/transforms/transforms.mdx | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/docsite/docs/configuration/transforms/transforms.mdx b/docsite/docs/configuration/transforms/transforms.mdx index f0955f8f..0a83fc6e 100644 --- a/docsite/docs/configuration/transforms/transforms.mdx +++ b/docsite/docs/configuration/transforms/transforms.mdx @@ -360,6 +360,7 @@ Each [Stage](#stage) may specify whether it should apply the resulting transform "album": true, // will always apply changes to Play album "duration": true, // will always apply changes to Play duration (length of track) "meta": true, // will always apply changes to Play meta (MBIDs, spotify links, etc...) + "art": true // will always apply art to Play (if stage provides art) } ``` @@ -494,9 +495,39 @@ If the `when` test does not pass then the Stage is [**skipped (`onSkip`)**](#flo } ``` + + +To test if your Play/scrobble has *no* `art` associated with the data use an empty string for `art`: + +```json5 +{ + "when": [ + { + "art": "", // run the stage when play has no art (album, track, or artist art) + }, + ] +} +``` + +Otherwise, using a string/regex pattern for `art` will test if *any* art url includes that pattern. + +EX: only run stage if art does *not* come from deezer, use deezer's cdn in a not regex statement: + +```json5 +{ + "when": [ + { + "art": "/^((?!(dzcdn)).)*$/", // run the stage when play has no art (album, track, or artist art) + }, + ] +} +``` + + + More succinctly: -* All parts (`artist` `album` `albumArtist` `duration` `meta` `title`) of a `when` are `AND` conditions +* All parts (`artist` `album` `albumArtist` `duration` `meta` `title` `art`) of a `when` are `AND` conditions * All part-objects in the `when` array are `OR` conditions
-- 2.51.2