Looking for Beets syntax help

What’s going on all? So I’ve recently started configuring my beets installation and have everything almost spot on except a few details and was wondering if anyone would be able to help me pin down how to get this sorted. Mods, If this is not the appropriate location for this post please let me know or feel free to delete.

My config:

directory: /run/media/mxw/MEDIA/Music/+MOVE/
library: ~/.config/beets/musiclibrary.db

plugins: chroma web inline extrafiles fetchart zero the

ui:
    color: yes

import:
    move: yes
    timid: yes
    detail: yes
    bell: yes
    log: beetslog.txt
   
ignore: .AppleDouble ._* *~ .DS_Store    
    
replace:
    '/': ∕
    '"': ''
    ':': ꞉
    
original_date: yes
per_disc_numbering: yes

paths:
    default: %the{$albumartist}/$album [$year, $albumtype]/$disc_folder/$artist - $album - $disc_and_track - $title
    comp: Compilations/$album%aunique{}/$track $title
   

extrafiles:
    patterns:
        all: '*.*'
        artworkdir:
          - '[sS]cans/'
          - '[aA]rtwork/'
          - '[aA]rt/'
    paths:
        artworkdir: $albumpath/Artwork
        ext:log: $albumpath/$disc_folder/Data/
        ext:cue: $albumpath/$disc_folder/Data/
        ext:jpg: $albumpath/$disc_folder/
        ext:jpg: $albumpath/
        
fetchart:
        minwidth: 800
        maxwidth: 800
        enforce_ratio: yes
        sources: filesystem coverart itunes amazon albumart fanarttv
        fanarttv_key: 
        
zero:
        fields: images comments rg_album_gain rg_album_peak
        comments: [Track, 'ripped by']
        update_database: true

item_fields:
    initial: albumartist[0].upper() + u'.'
    disc_and_track: u'Disc %02i - %02i' % (disc, track) if
                    disctotal > 1 else u'%02i' % (track)
    disc_folder: u'Disc %2i' % (disc) if
                    disctotal > 1 else None
                    
the:
    a: no

Issue 1

Currently I have my default path as the follows:

%the{$albumartist}/$album [$year, $albumtype]/$disc_folder/$artist - $album - $disc_and_track - $title

What I would like to do is leave the hierarchy as is but have the naming convention of the file(s) to begin with the track artist and if any featured artist (designated by “feat.”) is listed on a track, for the featured artist to be moved to the end of the track title and housed within a set of brackets à la “Alchemist, The/The Cutting Room Floor 2 (Limited Edition) [2008, compilation]/The Alchemist - The Cutting Room Floor 2 - 11 - Die Another Day [feat. Prodigy].flac

How would I go about doing this? I have a feeling that using the if condition would be the right way to go but I’m not sure about how to format that to result in what I’m looking for.

Issue 2

I would like to have data (log, cue, etc.) and artwork files sorted into their perspective folders. How would I go about having said files in multi disc releases moved to the appropriate disc directory? E.G. move “Whitehorse - Whitehorse (disc 1).log” to “Whitehorse/Whitehorse [2007, compilation]/Disc 1/Data/” ?

Issue 3

As you can see by my config I have multi disc releases set up to create folders for each disc of the release. What would be a method for saving artwork to each disc folder (including the overarching album folder)?

Also, if you notice any glaring inconsistencies or better ways of going about formatting my configuration, please let me know. Thanks!

Yo! Welcome! Would you mind using a code block, instead of a blockquote, to paste your config (and pieces of it)? It makes it far more readable.

  1. Have you checked out the ftintitle plugin?
  2. You might be interested in beets-copyartifacts or one of the similar alternatives that’s floating around.
  3. That’s not currently possible; sorry!

Adrian,
Thanks for the response and welcome! Sorry about the message formatting; went ahead and fixed it.

haha, It’s funny that you bring up FtInTitle because I looked into that when I began editing my config but forgot to bring it up in the post. What I’m looking to do is pretty… eccentric and while the plugin in theory does what I’m looking for as far as I can tell it only does it on the tag level whereas I’d like to only have the featured artist following the track title in the file name but stay within the artist(s) tag. Should have mentioned this in the original post.

I will look into copyartifacts again but if I remember correctly when I did last time it wasn’t compatible with python3 and seemed to be abandoned by the developer.

E: Forgot to mention that I am currently using an alternative to copyartifacts called extrafiles but am not aware of how to (probably an easy solution) have it move the appropriate data/art files to their respective disc folder.

Got it! If you want to do that with your filenames only, I’d look into using the inline plugin. It won’t exactly be easy—you’ll need to split on the “feat.” string and try to get that as a separate field you can plug into the filename part of your path format. But it should be possible to get something close to what you want, with a little Python hacking!

I’m not too familiar with extrafiles, but maybe it would be worth filing an issue to ask the developer?