Sure.
diff --git a/Beets/config.yaml b/Beets/config.yaml
index ac222fb..8f45cb2 100644
--- a/Beets/config.yaml
+++ b/Beets/config.yaml
@@ -56,6 +56,7 @@ set_fields:
source: 'Unknown'
plugins:
+ - format_fields
- alternatives
- badfiles
- chroma
@@ -173,33 +174,43 @@ item_fields:
else:
return title
+# Aliases for format strings / path formats
+format_fields:
+ item_fields:
+ # cli usage
+ if_singletrack_path: '%if{$single_track,$singletrack_path}'
+
+ # path formats
+ singletrack_path: 'Single Tracks/$artist - $title'
+ alternatives_default_path: '%if{$single_track,$singletrack_path,%if{$missing,Incomplete ,}Albums/$artist_album_track}'
+ nonmusic_path: 'Non-Music/$genre/$artist_album_track'
+ artist_album_track: '$comp_albumartist/$album_track'
+ album_track: '$album%aunique{}%if{$multidisc, Disc $disc}%if{$disctitle,: $disctitle}/$track_pre%if{$comp,$artist - $title,$title}'
+
alternatives:
dap:
directory: ../DAP
paths:
- default: '%if{$single_track,Single Tracks/$artist - $title,%if{$missing,Incomplete ,}Albums/$comp_albumartist/$album%aunique{}%if{$multidisc, Disc $disc}%if{$disctitle,: $disctitle}/$track_pre%if{$comp,$artist - $title,$title}}'
+ default: '$alternatives_default_path'
+ genre:Speech: '$nonmusic_path'
+ genre:Meditation: '$nonmusic_path'
+ genre:Dharma: '$nonmusic_path'
+ genre:Book: '$nonmusic_path'
+ genre:Spoken: '$nonmusic_path'
- genre:Speech: 'Non-Music/$genre/$comp_albumartist/$album%aunique{}%if{$multidisc, Disc $disc}%if{$disctitle,: $disctitle}/$track_pre%if{$comp,$artist - $title,$title}'
- genre:Meditation: 'Non-Music/$genre/$comp_albumartist/$album%aunique{}%if{$multidisc, Disc $disc}%if{$disctitle,: $disctitle}/$track_pre%if{$comp,$artist - $title,$title}'
- genre:Dharma: 'Non-Music/$genre/$comp_albumartist/$album%aunique{}%if{$multidisc, Disc $disc}%if{$disctitle,: $disctitle}/$track_pre%if{$comp,$artist - $title,$title}'
- genre:Book: 'Non-Music/$genre/$comp_albumartist/$album%aunique{}%if{$multidisc, Disc $disc}%if{$disctitle,: $disctitle}/$track_pre%if{$comp,$artist - $title,$title}'
- genre:Spoken: 'Non-Music/$genre/$comp_albumartist/$album%aunique{}%if{$multidisc, Disc $disc}%if{$disctitle,: $disctitle}/$track_pre%if{$comp,$artist - $title,$title}'
query: ''
formats: link
Obviously this exact example isn’t a great one, since those genres can be consolidated with a regex query, but I have a long list of others that aren’t in this snippet. I’m sure other use cases exist, this is just the one I happened to try to do to make my config.yaml a bit more readable.