Help with path format

Hi, I’m new to beets and I’m struggling configuring the paths.

In MusicBrainz Picard I’m using the following:

$if2(%albumartistsort%,%albumartist%,%artist%)/
$if(%originalyear%,\(%originalyear%\) ) %album% [%_bits_per_sample%-bit $div(%_sample_rate%,1000)kHz $if(%_source%, %_source%)] $if(%catalognumber%, \(%catalognumber%\))/
$if(%_discfolder%,%_discfolder%/)
$num(%tracknumber%,2) - %artist% - %title%

in beets, I started from the basic path I found in the documentation and start adding variable to see what happens; this is the first attempt adding for example “original_year”:

paths:
    default: $albumartist/(%original_year%) $album%aunique{} /$track $title
    singleton: Non-Album/$artist/$title
    comp: Compilations/$album%aunique{}/$track $title

but it is printing (%original_year) in the folder name instead of the year.
I’m trying to escap ( ewith ( and aldo adding the path between " " or ’ ’ but without the expected result.

I’m also trying with if statement like this:

paths:
    default: $albumartist/$if(%original_year%,\(%original_year%\) ) $album%aunique{} /$track $title
    singleton: Non-Album/$artist/$title
    comp: Compilations/$album%aunique{}/$track $title

but still the same.

This is my full config; it’s not definitive as I’m trying beets before runing on my library.

directory: /mnt/media/beets
library: ~/musiclibrary.db

plugins:
    - web
    - discogs
    - acousticbrainz
    - fromfilename

import:
    move: yes

discogs:
    source_weight: 0.0

acousticbrainz:
    auto: yes

aunique:
    keys: albumartist album
    disambiguators: albumtype year label catalognum albumdisambig releasegroupdisambig
    bracket: "[]"

musicbrainz:
    extra_tags: [year, catalognum, country, media, label]

paths:
    default: $albumartist/(%original_year%) $album%aunique{} /$track $title
    singleton: Non-Album/$artist/$title
    comp: Compilations/$album%aunique{}/$track $title

ui:
    color: yes
    colors:
        text_success: green
        text_warning: yellow
        text_error: red
        text_highlight: red
        text_highlight_minor: lightgray
        action_default: turquoise
        action: blue

Other informations:

  • I’m on windows 10, running beets in WSL Debian (installed with pip3, not apt)

Thanks for any suggestions.

Well, feeling dumb because i found the error only after writing this post:

it’s $original_year and not %original_year% :slight_smile:

I was confusing % and $

2 Likes