diff options
| author | (quasar) nebula <qznebula@protonmail.com> | 2026-05-19 16:12:00 -0300 |
|---|---|---|
| committer | (quasar) nebula <qznebula@protonmail.com> | 2026-05-19 16:12:00 -0300 |
| commit | fa489724532926c83bf066a10c746334d4b1024f (patch) | |
| tree | e448628e92d95b8cfd2483a654cfedd0ca2f1a85 /src/data/things | |
| parent | 49b113e79ef2baf96d746730311143f9b242bf62 (diff) | |
data: TrackSection: cleanup
Diffstat (limited to 'src/data/things')
| -rw-r--r-- | src/data/things/album/TrackSection.js | 42 |
1 files changed, 10 insertions, 32 deletions
diff --git a/src/data/things/album/TrackSection.js b/src/data/things/album/TrackSection.js index 4bc43a3c..a7763184 100644 --- a/src/data/things/album/TrackSection.js +++ b/src/data/things/album/TrackSection.js @@ -46,12 +46,8 @@ export class TrackSection extends Thing { validate: input.value(isDirectory), }), - withPropertyFromObject({ - object: 'album', - property: input.value('directorySuffix'), - }), - - exposeDependency({dependency: '#album.directorySuffix'}), + withPropertyFromObject('album', V('directorySuffix')), + exposeDependency('#album.directorySuffix'), ], suffixTrackDirectories: [ @@ -59,12 +55,8 @@ export class TrackSection extends Thing { validate: input.value(isBoolean), }), - withPropertyFromObject({ - object: 'album', - property: input.value('suffixTrackDirectories'), - }), - - exposeDependency({dependency: '#album.suffixTrackDirectories'}), + withPropertyFromObject('album', V('suffixTrackDirectories')), + exposeDependency('#album.suffixTrackDirectories'), ], color: [ @@ -72,12 +64,8 @@ export class TrackSection extends Thing { validate: input.value(isColor), }), - withPropertyFromObject({ - object: 'album', - property: input.value('color'), - }), - - exposeDependency({dependency: '#album.color'}), + withPropertyFromObject('album', V('color')), + exposeDependency('#album.color'), ], hasTrackNumbers: [ @@ -120,12 +108,8 @@ export class TrackSection extends Thing { validate: input.value(isBoolean), }), - withPropertyFromObject({ - object: 'album', - property: input.value('countTracksInArtistTotals'), - }), - - exposeDependency({dependency: '#album.countTracksInArtistTotals'}), + withPropertyFromObject('album', V('countTracksInArtistTotals')), + exposeDependency('#album.countTracksInArtistTotals'), ], isDefaultTrackSection: flag(V(false)), @@ -147,14 +131,8 @@ export class TrackSection extends Thing { ], directory: [ - exitWithoutDependency({ - dependency: 'album', - }), - - withPropertyFromObject({ - object: 'album', - property: input.value('directory'), - }), + exitWithoutDependency('album'), + withPropertyFromObject('album', V('directory')), { dependencies: ['#album.directory', 'unqualifiedDirectory'], |