#
# Config file for beets.io that imports files and can handle folders having
# incomplete albums.
#
# Install:
#  * pip install beets[mbcollection,fetchart,lyrics,lastgenre,discogs,lyrics,fetchart,embedart,lastgenre,scrub,mbsync,mpdupdate,missing,duplicates,autosingleton]
#

import:
    # write metadata to music files
    write: yes

    # move imported files from source to the music directory
    move: no
    copy: yes
    delete: no

    group_albums: true
    duplicate_action: merge

    # use auto-tagging where possible
    # do not require confirmation on strong matches
    autotag: yes
    timid: no

    resume: no
    incremental: no
    none_rec_action: skip

    quiet: yes  # enable with command line option
    quiet_fallback: asis # "as is"
    default_action: apply

    singletons: no
    languages: []
    detail: no
    flat: no

asciify_paths: yes

# files matching these patterns are deleted from source after import
clutter: ["Thumbs.DB", ".DS_Store", "*.m3u", ".pls", "*.jpg"]

# files/directories matching one of these patterns are ignored during import
ignore: [".*", "*~", "System Volume Information"]

# Paths ----------------------------------------------------------------------

# Paths and filenames for music files
# relative to music directory
paths:
    default: Artists/$albumartist/$album ($year)%aunique{}/$track - $title
    singleton: Non-Album/$artist ($year)/$title
    comp: Compilations/$album ($year)%aunique{}/$track - $title
    albumtype_soundtrack: Soundtracks/$album/$track $title

# replace special characters in generated filenames
replace:
    '[\\/]': _
    '^\.': _
    '[\x00-\x1f]': _
    '[<>:"\?\*\|]': _
    '\.$': _
    '\s+$': ''

path_sep_replace: _

# General --------------------------------------------------------------------

threaded: no
timeout: 5.0
verbose: yes

# User Interface -------------------------------------------------------------

color: yes
list_format_item: '%upper{$artist} - $album - $track. $title'
list_format_album: '%upper{$albumartist} - $album'
time_format: '%Y-%m-%d %H:%M:%S'
terminal_encoding: utf8

# Auto Tagger ----------------------------------------------------------------

match:
    strong_rec_thresh: 0.3      # match 90% or better for auto import
    max_rec:
        missing_tracks: strong

# Plugins --------------------------------------------------------------------

plugins: [
    duplicates
]

# Plugins Config -------------------------------------------------------------

duplicates:
    checksum: no
    copy: yes
    merge: yes
    keys: mb_trackid album
    album: yes
    count: yes
    delete: yes
    format: "Duplicates/$albumartist - $album - $title"
    full: yes
    move: no
    path: no
    tag: yes
