From 52272a8da9a798803abd1176a8294845e8567641 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 10 Jun 2026 09:10:59 -0300 Subject: data: Track: don't intuit directory suffix if custom directory given --- .../composite/things/track/withDirectorySuffixes.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/data/composite/things/track/withDirectorySuffixes.js') diff --git a/src/data/composite/things/track/withDirectorySuffixes.js b/src/data/composite/things/track/withDirectorySuffixes.js index 87a737db..efc66f13 100644 --- a/src/data/composite/things/track/withDirectorySuffixes.js +++ b/src/data/composite/things/track/withDirectorySuffixes.js @@ -120,6 +120,26 @@ export default templateCompositeFrom({ }, }, + { + dependencies: [input('from'), '_directory'], + compute(continuation, { + [input('from')]: suffixDirectory, + ['_directory']: directory, + }) { + // If Suffix Directory is not set and Directory IS set, then + // no following logic should automatically provide a directory suffix + // (which otherwise would be tacked onto the data-given Directory). + if (suffixDirectory === null && directory !== null) { + return continuation.raiseOutput({ + ['#directorySuffix']: null, + ['#directorySuffixWithinAlbum']: null, + }); + } + + return continuation(); + }, + }, + { dependencies: [ '_nameDetail', -- cgit 1.3.0-6-gf8a5