Skip to content

Instantly share code, notes, and snippets.

@pad92
Last active October 23, 2022 09:35
Show Gist options
  • Save pad92/258b1a86ba12d5ef0bef7cd3526ab470 to your computer and use it in GitHub Desktop.
Save pad92/258b1a86ba12d5ef0bef7cd3526ab470 to your computer and use it in GitHub Desktop.
beets and lidarr files/path mapping
directory: /music/Library_clean
library: /music/Library_clean.blb
plugins: fetchart embedart convert replaygain lastgenre chroma web bpm parentwork importadded inline
original_date: yes # Use the original date for the release.
per_disc_numbering: yes # The track numbers are incremented throughout a multi disk release.
threaded: yes # Indicating whether the autotagger should use multiple threads.
# This makes things substantially faster by overlapping work.
parentwork: # This plugin adds five tags:
# - parentwork: The title of the parent work.
# - mb_parentworkid: The musicbrainz id of the parent work.
# - parentwork_disambig: The disambiguation of the parent work title.
# - parent_composer: The composer of the parent work.
# - parent_composer_sort: The sort name of the parent work composer.
# - work_date: The composition date of the work, or the first parent work that has a composition date. Format: yyyy-mm-dd.
force: no # As a default, parentwork only fetches work info for recordings that do not already have a parentwork tag.
# If force is enabled, it fetches it for all recordings. Default: no.
auto: yes # If enabled, automatically fetches works at import.
# It takes quite some time, because beets is restricted to one musicbrainz query per second. Default: no.
asciify_path: yes # Convert all non-ASCII characters in paths to ASCII equivalents.
clutter: # When beets imports all the files in a directory, it tries to remove the directory if it’s empty.
# A directory is considered empty if it only contains files whose names match the glob patterns in clutter,
# which should be a list of strings.
# The importer only removes recursively searched subdirectories—the top-level directory you specify on the command line is never deleted.
[
.DS_Store, # Default.
Thumbs.DB # Default.
]
art_filename: cover # When importing album art, the name of the file (without extension) where the cover art image should be placed.
# This is a template string, so you can use any of the syntax available to Path Formats.
convert:
auto: no
ffmpeg: /usr/bin/ffmpeg
opts: -ab 320k -ac 2 -ar 48000
max_bitrate: 320
threads: 1
paths:
default: $albumartist/$album ($year)/$albumartist - $album ($year) %if{$multidisc,$media $disc} - $track.$title
item_fields:
multidisc: 1 if disctotal > 1 else 0
max_filename_length: 255 # 0 = unlimited.
import: # Beets can move or copy files but it doesn’t make sense to do both).
write: yes # Controlling whether metadata (e.g., ID3) tags are written to files when using beet import.
copy: yes # Keep your current directory structure.
# The option is ignored if move is enabled (i.e., beets can move or copy files but it doesn’t make sense to do both).
move: no # Move the files. Otherwise there will be duplicates.
resume: ask # Controls whether interrupted imports should be resumed.
# “Yes” means that imports are always resumed when possible;
# “no” means resuming is disabled entirely;
# “ask” (the default) means that the user should be prompted when resuming is possible.
incremental: no # Don't record imported directories.
incremental_skip_later: no # Controlling whether imported directories are recorded and whether these recorded directories are skipped.
from_scratch: no # Controlling whether existing metadata is discarded when a match is applied.
quiet_fallback: skip # Either skip (default) or asis, specifying what should happen in quiet mode when there is no strong recommendation.
none_rec_action: ask # Either ask (default), asis or skip.
# Specifies what should happen during an interactive import session when there is no recommendation.
# Useful when you are only interested in processing medium and strong recommendations interactively.
timid: no # Controlling whether the importer runs in timid mode,
# in which it asks for confirmation on every autotagging match, even the ones that seem very close.
log: /config/import.log
default_action: apply # One of apply, skip, asis, or none, indicating which option should be the default when selecting an action for a given match.
# This is the action that will be taken when you type return without an option letter.
languages: en fr # Prefer transliterated English names.
detail: no # Whether the importer UI should show detailed information about each match it finds.
# When enabled, this mode prints out the title of every track, regardless of whether it matches the original metadata.
# The default behavior only shows changes. Default: no.
group_albums: no # By default, the beets importer groups tracks into albums based on the directories they reside in.
# This option instead uses files’ metadata to partition albums.
# Enable this option if you have directories that contain tracks from many albums mixed together.
autotag: yes # If most of your collection consists of obscure music,
# you may be interested in disabling autotagging by setting this option to no.
duplicate_action: ask # Either skip, keep, remove, merge or ask. Controls how duplicates are treated in import task.
# “skip” means that new item (album or track) will be skipped;
# “keep” means keep both old and new items;
# “remove” means remove old item;
# “merge” means merge into one album;
# “ask” means the user should be prompted for the action each time.
bell: yes # Ring the terminal bell to get your attention when the importer needs your input.
importadded:
preserve_mtimes: no # After importing files, re-set their mtimes to their original value. Default: no.
preserve_write_mtimes: no # After writing files, re-set their mtimes to their original value. Default: no.
chroma: # Turning on fingerprinting can increase the accuracy of the autotagger - especially on files with very poor metadata.
# The Acoustid plugin extends the autotagger to use acoustic fingerprinting to find information for arbitrary audio.
# Install that plugin if you’re willing to spend a little more CPU power to get tags for unidentified albums.
# (But be aware that it does slow down the process.)
auto: yes # Fingerprint-based autotagging.
acousticbrainz: # The acousticbrainz plugin gets acoustic-analysis information from the AcousticBrainz project.
auto: yes # Enable AcousticBrainz during beet import. Default: yes.
force: yes # Download AcousticBrainz data even for tracks that already have it. Default: no.
tags: # Which tags from the list above to set on your files. Default: [] (all).
[ # As far as I know, the following tags couldn't be read by Roon.
average_loudness,
bpm, # ToDo: Mostly zero.
chords_changes_rate,
chords_key,
chords_number_rate,
chords_scale,
danceable,
gender,
genre_rosamerica,
initial_key, # This is a built-in beets field, which can also be provided by Key Finder Plugin.
key_strength,
mood_acoustic,
mood_aggressive,
mood_electronic,
mood_happy,
mood_party,
mood_relaxed,
mood_sad,
moods_mirex,
rhythm,
timbre,
tonal,
voice_instrumental
]
lastgenre: # Fetches tags from Last.fm and assigns them as genres to your albums and items.
auto: yes # Fetch genres automatically during import. Default: yes.
source: track # Which entity to look up in Last.fm. Can be either artist, album or track. Default: album.
embedart:
auto: no # Enable automatic album art embedding.
compare_threshold: 50 # A threshold of 0 (the default) disables similarity checking and always embeds new images.
# Recommended between 10 and 100.
# The smaller the threshold number, the more similar the images must be.
ifempty: yes # Avoid embedding album art for files that already have art embedded.
maxwidth: 0 # A maximum width to downscale images before embedding them (the original image file is not altered).
# The resize operation reduces image width to at most maxwidth pixels.
# The height is recomputed so that the aspect ratio is preserved. See also Image Resizing for further caveats about image resizing.
remove_art_file: no # Automatically remove the album art file for the album after it has been embedded.
# This option is best used alongside the FetchArt plugin to download art with the purpose
# of directly embedding it into the file’s metadata without an “intermediate” album art file.
fetchart:
auto: yes # Enable automatic album art fetching during import.
cautious: no # Pick only trusted album art by ignoring filenames that do not contain one of the keywords in "cover_names".
enforce_ratio: yes # Only allow images with 1:1 aspect ratio
minwidth: 1000 # Only images with a width bigger or equal to minwidth are considered as valid album art candidates.
maxwidth: 3000 # A maximum image width to downscale fetched images if they are too big.
# The height is recomputed so that the aspect ratio is preserved.
sources: # An asterisk * expands to all available sources.
- filesystem # No remote art sources are queried if local art is found in the filesystem.
- coverart
- albumart
- bandcamp
store_source: yes # Store the art source (e.g. filesystem) in the beets database as art_source.
replaygain:
auto: yes # Enable ReplayGain analysis during import. Default: yes.
# ReplayGain analysis is not fast, so you may want to disable it during import.
backend: ffmpeg # The analysis backend; either gstreamer, command, or audiotools. Default: command.
overwrite: no # Re-analyze files that already have ReplayGain tags. Default: no.
targetlevel: 89 # A number of decibels for the target loudness level. Default: 89.
per_disc: no # Calculate album ReplayGain on disc level instead of album level. Default: no.
replace:
'^\.': _
'[\x00-\x1f]': _
'[<>:"\?\*\|]': _
'[\xE8-\xEB]': e
'[\xEC-\xEF]': i
'[\xE2-\xE6]': a
'[\xF2-\xF6]': o
'[\xF8]': o
'\.$': _
'\s+$': ''
web:
host: 0.0.0.0
port: 8337
reverse_proxy: true
# UI ##############################################################################################
verbose: no
ui:
color: yes
colors:
text_success: green
text_warning: blue
text_error: red
text_highlight: blue
text_highlight_minor: lightgray
action_default: darkblue
action: purple
hook:
hooks:
#############################################
- event: album_imported
command: echo "\"{album}\""
- event: import
command: echo "imported from {paths}"
#############################################
- event: art_set
command: echo "Coverart saved"
- event: import_begin
command: echo "Roon import started..."
- event: import_task_apply
command: echo "Metadata applied"
- event: item_copi
command: echo "\"{item}\" copied from \"{source}\" to \"{destination}\""
- event: item_moved
command: echo "Moved \"{item}\""
- event: write
command: echo "Writing to {path}"
- event: cli_exit
command: echo "All tasks finished!"

Lidarr

Artist Folder Format

Example: The Artist Name

{Artist CleanName}

Standard Track Format

Single Track: The Album Title (2022)/The Artist Name - The Album Title (2022) - 03 - Track Title (1)

{Album CleanTitle} ({Release Year})/{Artist CleanName} - {Album Title} ({Release Year}) - {track:00}.{Track Title}

Multi Disc Track Format

Multi Disc Track: The Album Title (2022)/CD 01/The Artist Name - The Album Title (2022) - 03 - Track Title (1)

{Album CleanTitle} ({Release Year})/{Artist CleanName} - {Album Title} ({Release Year}) {Medium Format} {medium} - {track:00}.{Track Title}

Beets

paths:
    default: $albumartist/$album ($year)/$albumartist - $album ($year) %if{$multidisc,$media $disc} - $track.$title
item_fields:
    multidisc: 1 if disctotal > 1 else 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment