Skip to content

Commit

Permalink
[beets] Update beets path config
Browse files Browse the repository at this point in the history
Utilize album fields for special formatting of doujin releases.
Requires a currently unmerged PR to beets.

beetbox/beets#2988
  • Loading branch information
FichteFoll committed Sep 15, 2018
1 parent 0836c49 commit b38b6b9
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions beets/.config/beets/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ library: /data/audio/music/sorted/musiclibrary.db
per_disc_numbering: true

import:
move: true
copy: true
# move: true
# autotag: false
log: beetslog.txt

Expand All @@ -24,33 +25,43 @@ import:
# For singles in the context of anime releases.
# Can be set to "Opening", "Ending", "Insert", etc.
# - touhou:true
# If it is a Touhou arrangement.
# If it is a Touhou arrangement (disc).
# - doujin:true
# Released by a doujin circle (usually at some event).
# - event:
# Event at which the doujin CD was released,
# e.g. "M3-41", "C-83", "Reitatsei-7".
# Refer to https://vgmdb.net/db/events.php for a reference list.

# https://beets.readthedocs.io/en/stable/reference/pathformat.html
paths:
# $if(%track%,$if($and(%discnumber%,$neql(%totaldiscs%,$num(%discnumber%,1))),$num(%discnumber%,1).,)$num(%track%,2) - ,)$if($and(%albumartist%,$neql(%albumartist%,%artist%)),%artist% - ,)%title%
comp: $albumartist/$year - $album%aunique{}/$disc_and_track - $artist - $title
# special stuff
# TODO anime:true: '#touhou/$album%aunique{}/$disc_and_track - $title'
doujin:true: "#%ifdef{touhou,touhou,doujin}\
/%if{comp and label,$label,$albumartist}\
/$long_date - $album%aunique{}%ifdef{event, [$event]}\
/$disc_and_track - $title"
# normal stuff
albumtype:soundtrack: '#soundtrack/%ifdef{source,$source/}$album%aunique{}/$disc_and_track - $title'
# source:touhou: '#touhou/$album%aunique{}/$disc_and_track - $title'
# anime:true: '#touhou/$album%aunique{}/$disc_and_track - $title'
# doujin:true: '#touhou/$album%aunique{}/$disc_and_track - $title'
comp: $albumartist/$year - $album%aunique{}/$disc_and_track - $artist - $title
singleton: $albumartist/$title
# default: $artist/$title
default: $albumartist/$year - $album%aunique{}/$disc_and_track - $title

album_fields:
long_date: '"-".join(f"{n:02}" for n in [year, month, day] if n)'

item_fields:
disc_and_track: >
f"{disc}.{track:02}"
if disctotal > 1
else f"{track:02}"
# TODO consider 3-digit tracknumber albums?
disc_and_track: f"{disc}.{track:02}" if disctotal > 1 else f"{track:02}"

# https://beets.readthedocs.io/en/latest/plugins/index.html
plugins: fetchart lastgenre missing duplicates inline
# chroma embedart convert ftintitle

lastgenre:
count: 3
separator: "\x00" # multi-field ID3v2.4 text tags are separated by nulls - http://id3.org/id3v2.4.0-frames section 4.2 | doesn't seem to work out that well?
count: 1
# separator: "\x00" # multi-field ID3v2.4 text tags are separated by nulls - http://id3.org/id3v2.4.0-frames section 4.2 | doesn't seem to work out that well?

# disabled, for now
# ftintitle:
Expand Down

0 comments on commit b38b6b9

Please sign in to comment.