Path configuration for Naming Vinyl tracks according to MB track column labels


#1

I’ve got a few Vinyl rips I am importing with beets, an example is https://musicbrainz.org/release/b3d3f70c-5a87-4a5d-9d74-8aa0fa5a4a4b

Which ends up with the following in my music directory

matt07211@fbi-hq /mnt/3TB-Drive-01/Audio/Music/The Prodigy $ ls -R \(1997\)\ The\ Fat\ Of\ The\ Land\ \[Vinyl\]/
'(1997) The Fat Of The Land [Vinyl]/':
'Disc 01'  'Disc 02'

'(1997) The Fat Of The Land [Vinyl]/Disc 01':
'01. Smack My Bitch Up.flac'  '03. Diesel Power.flac'   cover.jpg
'02. Breathe.flac'            '04. Funky Shit.flac'

'(1997) The Fat Of The Land [Vinyl]/Disc 02':
'01. Serial Thrilla.flac'  '03. Narayan.flac'      '05. Climbatize.flac'
'02. Mindfields.flac'      '04. Firestarter.flac'  '06. Fuel My Fire.flac'

And I want the End result to look like

matt07211@fbi-hq /mnt/3TB-Drive-01/Audio/Music/The Prodigy $ ls -R \(1997\)\ The\ Fat\ Of\ The\ Land\ \[Vinyl\]/
'(1997) The Fat Of The Land [Vinyl]/':
'Vinyl 1'  'Vinyl 2'

'(1997) The Fat Of The Land [Vinyl]/Vinyl 1':
'A1. Smack My Bitch Up.flac'  'B1. Diesel Power.flac'   cover.jpg
'A2. Breathe.flac'            'B2. Funky Shit.flac'

'(1997) The Fat Of The Land [Vinyl]/Vinyl 2':
'C1. Serial Thrilla.flac'  'C3. Narayan.flac'      'D2. Climbatize.flac'
'C2. Mindfields.flac'      'D1. Firestarter.flac'  'D3. Fuel My Fire.flac'

So my questions are;

  • Is beets able to get the exact contents of the # column on the MusicBrainz Website.
  • Is beets able to get the Disc Title Label from the site and use it as the folder name?
  • If the answer is yes to at least one of those questions, how would I go about doing that/making use of that data?

My config

############################################################################
## Beets Configuration file.
## ~./config/beets/config.yaml
#############################################################################

### Global Options
library: /mnt/3TB-Drive-01/Audio/.musiclibrary.db
directory: /mnt/3TB-Drive-01/Audio/
plugins:
    # Autotagger Extensions
    - fromfilename
    # Metadata Plugins
    - edit
    - fetchart
    - embedart
    - ftintitle
    - lastgenre
    # Path Format Plugins
    - inline
    # Interoperability
    - badfiles
    - play
    # Miscellaneous Plugins
    - convert
    - duplicates
    - export
    - fuzzy
    - info
    - missing
    - random
    - web
    # Other/External Plugins
    - copyartifacts
    #- check

per_disc_numbering: true

# General Configuration
ui:
    color: yes

import:
    write: yes
    copy: yes
    move: no
    resume: ask
    incremental: yes
    quiet_fallback: skip
    log: /mnt/3TB-Drive-01/Audio/.beet.log
    bell: yes

# Done in order listed. Default is special and will always go at the end.
# e.g. If I had an album with the albumtype $soundtrack and $compilation
# Then the path that matchs first takes precedence.
paths:
    default: Music/$albumartist/($year) $album%aunique{,media mastering label catalognum albumdisambig}%if{$ep,%upper{ [$albumtype]}}%if{$single,%title{ [$albumtype]}}%if{$live,%title{ [$albumtype]}} %if{$mediav,[Vinyl]}%if{$mediav2,[Vinyl]}/%if{$multidisc,Disc $disc/}$track. $title
    albumtype:soundtrack: Music/Original Sound Tracks (OST)/$album%aunique{,media mastering label catalognum albumdisambig} ($year) %if{$mediav,[Vinyl]}%if{$mediav2,[Vinyl]}/%if{$multidisc,Disc $disc/}$track. %if{$multiartist,$artist -} $title
    christmas:1: Christmas Music Collection/$artist - $title
    singleton: Music/Non-Album/$artist/$title
    comp: Music/Compilations/$album%aunique{,media mastering label catalognum albumdisambig} ($year) %if{$mediav,[Vinyl]}%if{$mediav2,[Vinyl]}/%if{$multidisc,Disc $disc/}$track. $artist - $title
    albumtype:other: Other/$albumartist/$album%aunique{,media mastering label catalognum albumdisambig} %if{$ep,%upper{[$albumtype]}}%if{$single,%title{[$albumtype]}}%if{$live,%title{[$albumtype]}} %if{$mediav,[Vinyl]}%if{$mediav2,[Vinyl]}($year)/%if{$multidisc,Disc $disc/}$track. $title
    albumtype:audiobook: Audiobooks/$artist/$album%aunique{}/%if{$multidisc,Disc $disc/}$track. $title


# Plugin Configurations
fetchart:
    store_source: yes

embedart:
    # I dont want album art auto-embedded
    auto: no

convert:
# auto: yes
    copy_album_art: yes
    album_art_maxwidth: 600
    dest: /mnt/3TB-Drive-01/Audio/Music [Mobile version]/
    embed: yes
    never_convert_lossy_files: yes
    format: opus
    formats:
        opus:
            command: ffmpeg -i $source -y -vn -acodec libopus -ab 128k $dest
            extension: opus.ogg
            # Above is to work around android media scanner, opus is included 
            # in the file extension for making it easier on me in the future
            # when android media scanner picks up opus extensions properly

copyartifacts:
    extensions: .cue .CUE .log .LOG .jpg .jpeg .png .accurip
    print_ignored: yes

lastgenre:
    count: 5

item_fields:
    multidisc: 1 if disctotal > 1 else 0
    mediav: 1 if media == '12" Vinyl' else 0
    mediav2: 1 if media == 'Vinyl' else 0
# multiartist: 1 if albumartist =='Various Artists' else 0
    ep: 1 if albumtype == 'ep' else 0
    single: 1 if albumtype == 'single' else 0
    live: 1 if albumtype == 'live' else 0

play:
    command: /usr/bin/deadbeef

or the question phrased a different way, how fine grained level of control can I achieve with the current beets software?


#2
  • Perhaps you’d be interested in $track_alt, as implemented in #2363?
  • Similarly, we have a $disctitle field. Have you checked whether that contains the information you’re after?

#3

Those both look like a exactly what I was asking about, that’s awesome!

But that kind of information bwas lacking from the documentation, https://beets.readthedocs.io/en/latest/reference/pathformat.html , which makes finding these useful values more difficult.

After modifying my path correctly, would the best course of action ve beet move, or would beets need to pull data from musicbrainz again before the beeg move command for $disctitle


#4

Great! Any chance we can enlist your help in improving the docs? It’s always hard to keep that list of fields up to date…


#5

I can definitely give it a crack some time next week once I get my current pile of work out of the way.


#6

Oh yea for any future users the following inline block works the best

item_fields:
    vinyl: 1 if media in ['12" Vinyl', 'Vinyl'] else 0