diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-10-01 17:58:56 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-10-01 17:58:56 -0300 |
commit | a60c8906ed7580a21527c9f96cd0e6e277978263 (patch) | |
tree | 71c862e8c366294697afc6b980a8af5591c8e39c /src/data/composite | |
parent | d2174a01dda63ba233cbcdf48bb70ed50127d54d (diff) |
data, test: expose track section names
Diffstat (limited to 'src/data/composite')
-rw-r--r-- | src/data/composite/things/album/withTrackSections.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/data/composite/things/album/withTrackSections.js b/src/data/composite/things/album/withTrackSections.js index c99b94d2..baa3cb4a 100644 --- a/src/data/composite/things/album/withTrackSections.js +++ b/src/data/composite/things/album/withTrackSections.js @@ -41,6 +41,7 @@ export default templateCompositeFrom({ 'tracks', 'dateOriginallyReleased', 'isDefaultTrackSection', + 'name', 'color', ]), }), @@ -56,6 +57,11 @@ export default templateCompositeFrom({ }), fillMissingListItems({ + list: '#sections.name', + fill: input.value('Unnamed Track Section'), + }), + + fillMissingListItems({ list: '#sections.color', fill: input.dependency('color'), }), @@ -86,6 +92,7 @@ export default templateCompositeFrom({ { dependencies: [ '#sections.tracks', + '#sections.name', '#sections.color', '#sections.dateOriginallyReleased', '#sections.isDefaultTrackSection', @@ -94,19 +101,21 @@ export default templateCompositeFrom({ compute: (continuation, { '#sections.tracks': tracks, + '#sections.name': name, '#sections.color': color, '#sections.dateOriginallyReleased': dateOriginallyReleased, '#sections.isDefaultTrackSection': isDefaultTrackSection, '#sections.startIndex': startIndex, }) => { filterMultipleArrays( - tracks, color, dateOriginallyReleased, isDefaultTrackSection, startIndex, + tracks, name, color, dateOriginallyReleased, isDefaultTrackSection, startIndex, tracks => !empty(tracks)); return continuation({ ['#trackSections']: stitchArrays({ tracks, + name, color, dateOriginallyReleased, isDefaultTrackSection, |