From e72da989468fafe941c9854a974250db9ea3eb08 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 30 Dec 2022 14:48:11 +0100 Subject: [PATCH] multimedia: Update beets configuration --- multimedia/.config/beets/config.yaml | 123 ++++++++++-------- .../sh/env.d/beets-ensure-library-dir.sh | 4 + 2 files changed, 72 insertions(+), 55 deletions(-) create mode 100644 multimedia/.config/sh/env.d/beets-ensure-library-dir.sh diff --git a/multimedia/.config/beets/config.yaml b/multimedia/.config/beets/config.yaml index 59993f9..b70f81b 100644 --- a/multimedia/.config/beets/config.yaml +++ b/multimedia/.config/beets/config.yaml @@ -2,9 +2,40 @@ # is stolen from https://github.com/montchr/beets-config/ with much gratitude directory: ~/media/audio/music +library: ~/.local/share/beets/library.db + threaded: true art_filename: albumart +# Use the album's original date instead of the release's date +original_date: yes +# Use safer pathnames +asciify_paths: yes +max_filename_length: 255 +# Long format - I don't need all the extra info for each invocation +#format_item: '[$id] [$album_id] [$singleton] $albumartist - $title - $album - $original_year - [$format - $bitrate $length $filesize]' +#format_album: '[$id] $albumartist - $album - $original_year [$catalognum]' + +clutter: +- Thumbs.db +- .DS_Store +- '*.m3u' +- '*.pls' +- '*.db' + +import: + copy: false + move: true + write: true + bell: true + # incremental: true + languages: + - en + log: ~/.cache/beets.log + quiet_fallback: skip + timid: false + +ignore_hidden: yes paths: default: "%the{$albumartist}/$album/$track $title" singleton: "singletons/%the{$artist - $title}" @@ -15,49 +46,12 @@ item_fields: multidisc: 1 if disctotal > 1 else 0 artist_differs: 1 if albumartist != artist else 0 -plugins: - - bpd - - chroma - - edit - - fetchart - - embedart - - mbsync - - importadded - - info - - inline - - the - - ftintitle - - fromfilename - - spotify - - deezer - - bandcamp - - acousticbrainz - - lastgenre - - ydl - -import: - bell: true - # Doesn't allow upgrades. - # incremental: true - languages: - - en - log: ~/.cache/beets.log - copy: false - move: true - quiet_fallback: skip - timid: false - write: true - -# Use the album's original date instead of the release's date -original_date: yes - -# Play it safe with filenames -asciify_paths: yes -max_filename_length: 255 - -edit: - itemfields: track title artist album - albumfields: album albumartist +musicbrainz: + extra_tags: [year, catalognum, country, media, label] + user: martyo + pass: u^a<7YKULz\#CKX\-Fm]K%Up0 + auto: yes + remove: yes match: preferred: @@ -67,19 +61,35 @@ match: medium_red_thresh: 0.25 rec_gap_thresh: 0.25 -musicbrainz: - extra_tags: [year, catalognum, country, media, label] +plugins: + - acousticbrainz + - bandcamp + - chroma + - deezer + - describe + - edit + - embedart + - export + - fetchart + - fromfilename + - ftintitle + - fuzzy + - importadded + - info + - inline + - lastgenre + - lastimport + - mbcollection + - mbsync + - missing + - spotify + - the + - ydl -albumtypes: - types: - - ep: 'EP' - - single: 'Single' - - soundtrack: 'OST' - - live: 'Live' - - compilation: 'Anthology' - - remix: 'Remix' - ignore_va: compilation - bracket: '[]' +edit: + itemfields: track title artist album + albumfields: album albumartist albumtype + ignore_fields: id path fetchart: sources: filesystem coverart discogs amazon albumart @@ -96,5 +106,8 @@ lastgenre: source: album whitelist: ~/.config/beets/lastgenre_whitelist.txt +lastfm: + user: schmitzkater + bandcamp: art: true diff --git a/multimedia/.config/sh/env.d/beets-ensure-library-dir.sh b/multimedia/.config/sh/env.d/beets-ensure-library-dir.sh new file mode 100644 index 0000000..5ac8fa0 --- /dev/null +++ b/multimedia/.config/sh/env.d/beets-ensure-library-dir.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +# Ensure the directory for beets library exists or it errors out on startup + +[ -e "${XDG_DATA_HOME:-$HOME/.local/share}/beets" ] || mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}/beets"