Month: November 2016

  • My beets Configuration (Nov. 2016 Edition)

    This is mostly for my own convenience. I recently rebuilt a host for managing my beets library, and these are the packages (both deb and pip) that I needed to install for my particular beets config to work. And since that’s not really very helpful to anyone else without my beets config, I’ve included that as well.

    This should work for both ubuntu trusty and xenial.

    Requirements for beets:

    $ sudo apt-get install python-dev python-pip python-gi libchromaprint-tools imagemagick mp3val flac lame flac gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0 plugins-ugly gir1.2-gstreamer-1.0 libxml2-dev libxslt1-dev zlib1g-dev
    $ sudo pip install beets pyacoustid discogs-client pylast requests bs4 isodate lxml

    I use two plugins not included by default:
    bandcamp
    rymgenre

    Beets config:

    ############################################################################
    ## Beets Configuration file.
    ## ~./config/beets/config.yaml
    #############################################################################
    
    ### Global Options
    library: ~/.config/beets/library.blb
    directory: /mnt/music/
    pluginpath: ~/.config/beets/plugins
    ignore: .AppleDouble ._* *~ .DS_Store
    per_disc_numbering: true
    threaded: yes
    
    # Plugins
    plugins: [
    # autotagger extentions
    chroma,
    discogs,
    # metadata plugins
    acousticbrainz,
    embedart,
    fetchart,
    ftintitle,
    lastgenre,
    mbsync,
    replaygain,
    scrub,
    # path format plugins
    bucket,
    inline,
    the,
    # interoperability plugins
    badfiles,
    # misc plugins
    missing,
    info,
    # other plugins
    bandcamp
    ]
    
    # Import Options
    import:
    copy: true
    move: false
    write: true
    delete: false
    resume: ask
    incremental: false
    quiet_fallback: skip
    none_rec_fallback: skip
    timid: false
    languages: en
    log: ~/beets-import.log
    
    # Path options
    paths:
    # Albums/A/ASCI Artist Name, The/[YEAR] ASCI Album Name, The [EP]/01 - Track Name.mp3
    default: 'Albums/%bucket{%upper{%left{%the{%asciify{$albumartist}},1}}}/%the{%asciify{$albumartist}}/[%if{$year,$year,0000}] %asciify{$album} %aunique{albumartist album year, albumtype label catalognum albumdisambig}/%if{$multidisc,$disc-}$track - %asciify{$title}'
    # Singles/ASCII Artist Name, The - Track Name.mp3
    singleton: 'Singles/%%the{%asciify{$artist}} - %asciify{$title}'
    # Compilations/[YEAR] ASCI Compilation Name, The/01-01 - Track Name.mp3
    comp: 'Compilations/[%if{$year,$year,0000}] %the{%asciify{$album}%if{%aunique, %aunique{albumartist album year, albumtype label catalognum albumdisambig}}}/%if{$multidisc,$disc-}$track - %asciify{$title}'
    # Sountracks/[YEAR] ASCI Soundtrack Name, The/01 - Track Name.mp3
    albumtype:soundtrack: 'Soundtracks/[%if{$year,$year,0000}] %the{%asciify{$album}%if{%aunique, %aunique{albumartist album year, albumtype label catalognum albumdisambig}}}/%if{$multidisc,$disk-}$track - %asciify{$title}'
    
    ### Plugin Options
    
    # Inline plugin multidisc template
    item_fields:
    multidisc: 1 if disctotal > 1 else 0
    
    # Collects all special characters into single bucket
    bucket:
    bucket_alpha:
    - _
    - A
    - B
    - C
    - D
    - E
    - F
    - G
    - H
    - I
    - J
    - K
    - L
    - M
    - N
    - O
    - P
    - Q
    - R
    - S
    - T
    - U
    - V
    - W
    - X
    - Y
    - Z
    bucket_alpha_regex:
    '_': ^[^A-Z]
    
    # Per album genres selected from a custom list
    # My genre-tree.yaml is ever so slightly custom as well
    # I found per-album genres in last.fm could be very misleading.
    lastgenre:
    canonical: ~/.config/beets/genres-tree.yaml
    whitelist: ~/.config/beets/genres.txt
    min_weight: 20
    source: artist
    fallback: 'Unknown'
    
    # rymgenre doesn't run on import, so I use it as a backup
    # for when lastgenre is giving me garbage results.
    rymgenre:
    classes: primary
    depth: node
    
    # Fetch fresh album art for new imports
    fetchart:
    sources: coverart itunes amazon albumart
    store_source: yes
    
    # I want the option to scrub, but don't feel the need to scrub automatically
    scrub:
    auto: no
    
    # Gstreamer is a pain, but still the correct backend
    replaygain:
    backend: gstreamer
    overwrite: yes
    
    acoustid:
    apikey: <API_KEY>
    
    echonest:
    apikey: <API_KEY>
    auto: yes