Help with config file

Hi all, apologise in advance for the long post. Setting up Beets again for first time in a while, but this time I am using the linuxserver/beets docker image running on a Synology NAS. It is quite handy being able to use terminal window within Synology’s Docker App without needing to SSH in.

I have inherited a fair sized config file from the docker image and have made changes, additions and retractions, but I am having the following issues:

RESOLVED 1.) Artist folders and album folders are recreated and renamed in my library directory fine, but track filenames do not take properly. I am literally getting “%track - %title.1.flac”, “%track - %title.2.flac” and so on (this happened before I tried implementing no.2 below).

RESOLVED 2.) Tried to facilitate multi-disc releases following the instructions in the FAQ https://beets.readthedocs.io/en/stable/faq.html#create-disc-n-directories-for-multi-disc-albums but now I am getting an additional folder between the album folder and tracks called “%if{$multidisc,Disc $disc” and the last “}” carries over to the track title.

3.) Is it possible for the directories in the import folder to be deleted after the newly tagged files have been moved? After import I am left with empty folders (everything is backed up before the import).

4.) How do I keep uppercase for first letters of all words? “The” is changed to "the ect.

5.) On lines 63-67 you can see that I have tried to make Discogs the preferred source for tags over MusicBrainz. I have been prompted for a Discogs token but after entering that I am still getting all matches with MusicBrainz instead, anything I need to adjust there?

6.) This one may not be possible, but wondering if the original import album folder has a cue/log or both, can we tell Beets to prefer to match to CD release? I seem to be getting a lot of Web matches when around 90% of my collection is CD.

Here is my config file:

plugins: [fetchart, embedart, convert, scrub, replaygain, lastgenre, chroma, web, extrafiles, discogs, inline]
directory: /music
library: /config/musiclibrary.blb
art_filename: albumart
threaded: yes
original_date: no
per_disc_numbering: no

#convert:
#    auto: no
#    ffmpeg: /usr/bin/ffmpeg
#    opts: -ab 320k -ac 2 -ar 48000
#    max_bitrate: 320
#    threads: 1
    
paths:
    default: $albumartist/$albumartist - $original_year - $album%aunique{} [$media] [$format $samplerate $bitdepth-bit] {$catalognum}/%if{$multidisc,Disc $disc/}$track - $title
    singleton: $artist/$title [$media] [$format $samplerate $bitdepth]
    comp: VA/$original_year - $albumartist - $album%aunique{} [$media] [$format $samplerate $bitdepth-bit] {$catalognum}/%if{$multidisc,Disc $disc/}$track - $title
    albumtype_soundtrack: Soundtracks/$original_year - $album%unique{} [$media] [$format $samplerate $bitdepth-bit] {$catalognum}/%if{$multidisc,Disc $disc/}$track - $title

item_fields:
    multidisc: 1 if disctotal > 1 else 0
        
import:
    write: yes
#    copy: no
    move: yes
    resume: yes
    incrlslemental: yes
    quiet_fallback: skip
    timid: no
    log: /config/beet.log

lastgenre:
    auto: yes
    source: album

embedart:
    auto: yes

fetchart:
    auto: yes
    
replaygain:
    auto: no

scrub:
    auto: yes

replace:
    '^\.': _
    '[\x00-\x1f]': _
    '[<>:"\?\*\|]': _
    '[\xE8-\xEB]': e
    '[\xEC-\xEF]': i
    '[\xE2-\xE6]': a
    '[\xF2-\xF6]': o
    '[\xF8]': o
    '\.$': _
    '\s+$': ''

discogs:
    source_weight: 0.0

musicbrainz:
    source_weight: 0.5

extrafiles:
    patterns:
        all: ['*.log', '*.cue', '*.m3u', '*.LOG', '*.CUE', '*.M3U']

web:
    host: 0.0.0.0
    port: 8337

beets version 1.6.0                                                                                   
Python version 3.11.6                                                                                 
plugins: chroma, convert, discogs, embedart, extrafiles, fetchart, inline, lastgenre, replaygain, scru
b, web

Solved issue 1 - changed the catalognum tag so it is in brackets instead of using {}:

paths:
    default: $albumartist/$albumartist - $original_year - $album%aunique{} [$media] [$format $samplerate $bitdepth-bit] ($catalognum)/%if{$multidisc,Disc $disc/}$track - $title

Solved issue 2 - I think the above fixed this

Workaround issue 6 - added:

match:
    preferred:
        media: cd

Still trying to solve the following if anyone can kindly assist:

3.) Is it possible for the directories in the import folder to be deleted after the newly tagged files have been moved? After import I am left with empty folders (everything is backed up before the import).

4.) How do I keep uppercase for first letters of all words? “The” is changed to "the ect.

5.) On lines 63-67 you can see that I have tried to make Discogs the preferred source for tags over MusicBrainz. I have been prompted for a Discogs token but after entering that I am still getting all matches with MusicBrainz instead, anything I need to adjust there?

6.) This one may not be possible, but wondering if the original import album folder has a cue/log or both, can we tell Beets to prefer to match to CD release? I seem to be getting a lot of Web matches when around 90% of my collection is CD.

Also since I have multiple disc directories working now, I realise that extrafiles does not copy over .cue and .log files over to these directories or the parent directory using:

extrafiles:
    patterns:
        all: ['*.log', '*.cue', '*.m3u', '*.LOG', '*.CUE', '*.M3U']
  1. It should do that, if the directory is empty. It seems like it doesn’t always work though, but for me it does most of the time.
    Configuration — beets 1.6.0 documentation

  2. Can you use %title{text}?
    Path Formats — beets 1.6.0 documentation