Fine tuning import settings

I’d like to fine tune some settings in my import procedure. I think I’ve found the relevant sections in the docs regarding each setting but I don’t get the result I wish:

Disable spotify search

Although I’ve enabled the spotify plugin, I don’t want any song in my library to be linked to it. I want only musicbrainz as a source. I’ve read here that these can be done with:

spotify:
    source_weight: 0

Is this written OK? Should it be 0.0? There’s a certain directory I can test with and I always get suggested the spotify source of import:

Tagging:
    Buddy Tate - Tate A Tete
URL:
    https://open.spotify.com/album/1HbkzT3Pi5SGkhoDtazMYu
(Similarity: 95.7%) (year) (Spotify, 1994, Storyville)
[A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, Print tracks, eDit, edit Candidates?

Automatically apply best candidate if above 90% match

If I try to import a directory with a match of 90% or more, I’d like it this match to be automatically applied. I read here I need to set this:

match:
    strong_rec_thresh: 0.10

But I still get this:

[A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, Print tracks, eDit, edit Candidates?

When encountering a 90+% match. Am I reading the documentation correct?

Here’s an example output:

/var/lib/transmission/downloads/2007. Harry 'Sweets' Edison Quintet - Patented By Edison (24 items)
Correcting tags from:
    The Harry 'Sweets' Edison Quintet - Harry 'Sweets' Edison Quintet - Patented By Edison
To:
    Harry “Sweets” Edison - Patented by Edison
URL:
    https://musicbrainz.org/release/b6937e3a-aa1a-4b0c-940c-a6e1c2fd8272
(Similarity: 95.0%) (album, artist, tracks) (CD, 2007, XE, Jazz Collectors, JC 424)
 * I'm Confessin' That I Love You    -> I'm Confessin' that I Love You
 * Canded Sweets                     -> Candied Sweets (title)
 * They Can't Take That Away From Me -> They Can't Take That Away from Me
 * Tea For Two                       -> Tea for Two
 * There Is No Greater Love          -> There is No Greater Love
 * Twenty-Forty                      -> Twenty-forty
 * It's Easy To Remember             -> It's Easy to Remember
 * Jive At Five                      -> Jive at Five
 * It Happened In Monterey           -> It Happened in Monterey
[A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, Print tracks, eDit, edit Candidates?
  • Try 1.0 or larger. It’s a penalty, so 0.0 will remove the penalty (not what you want).
  • Hmm; that looks right to me? I don’t exactly see why that wouldn’t work… maybe seeing the rest of your config would help?

I think that works. When the docs said: “set to 0.0 to disable”, I thought it meant to the other way around :).

Sure, here it is:

beet config
lyrics:
    bing_lang_from: []
    sources: google musixmatch
    auto: yes
    bing_client_secret: REDACTED
    bing_lang_to:
    google_API_key: REDACTED
    google_engine_ID: REDACTED
    genius_api_key: REDACTED
    fallback:
    force: no
    local: no
directory: /var/lib/mpd/music-new
library: /var/lib/mpd/music-new/beets.db

musicbrainz:
    pass: REDACTED
    host: musicbrainz.org
    ratelimit: 1
    ratelimit_interval: 1.0
    searchlimit: 10
    user: doronbehar

import:
    write: yes
    copy: yes
    move: no
    link: no
    delete: no
    resume: ask
    incremental: no
    quiet_fallback: skip
    none_rec_action: ask
    timid: no
    autotag: yes
    quiet: no
    singletons: no
    default_action: apply
    languages: []
    detail: no
    flat: no
    group_albums: no
    pretend: no
    search_ids: []
    duplicate_action: ask

clutter: [Thumbs.DB, .DS_Store]
ignore:
- .*
- '*~'
- System Volume Information
- lost+found
ignore_hidden: yes

replace:
    '[\\/]': '-'
    ^\.: _
    '[\x00-\x1f]': _
    '[<>"\?\*\|]': _
    ':': ' -'
    \s+$: ''
    ^\s+: ''
path_sep_replace: _
asciify_paths: no
art_filename: cover
max_filename_length: 0

plugins:
- absubmit
- mbsubmit
- acousticbrainz
- inline
- mbcollection
- chroma
- fromfilename
- info
- duplicates
- edit
- fetchart
- ipfs
- lastgenre
- missing
- mbsync
- mpdstats
- mpdupdate
- lyrics
- playlist
- smartplaylist
- replaygain
- spotify
- import_history
pluginpath: [/var/src/beets-import_history/beetsplug]
threaded: yes
timeout: 5.0
per_disc_numbering: yes
verbose: 0
terminal_encoding:
original_date: no
id3v23: no
va_name: Various Artists

ui:
    terminal_width: 80
    length_diff_thresh: 10.0
    color: yes
    colors:
        text_success: green
        text_warning: yellow
        text_error: red
        text_highlight: red
        text_highlight_minor: lightgray
        action_default: turquoise
        action: blue

match:
    strong_rec_thresh: 0.04
    medium_rec_thresh: 0.25
    rec_gap_thresh: 0.25
    max_rec:
        missing_tracks: medium
        unmatched_tracks: medium
    distance_weights:
        source: 2.0
        artist: 3.0
        album: 3.0
        media: 1.0
        mediums: 1.0
        year: 1.0
        country: 0.5
        label: 0.5
        catalognum: 0.5
        albumdisambig: 0.5
        album_id: 5.0
        tracks: 2.0
        missing_tracks: 0.9
        unmatched_tracks: 0.6
        track_title: 3.0
        track_artist: 2.0
        track_index: 1.0
        track_length: 2.0
        track_id: 5.0
    preferred:
        countries: []
        media: []
        original_year: no
    ignored: []
    required: []
    track_length_grace: 10
    track_length_max: 30

format_item: ${format} % ${albumartist} - ${album} | CD-${disc} | ${track} ${title}
format_album: $album
time_format: '%Y-%m-%d %H:%M:%S'
format_raw_length: no

sort_album: albumartist+ album+
sort_item: artist+ album+ disc+ track+
sort_case_insensitive: yes
item_fields:
    isMultiDisc: "u'yes' if\n    (int(disctotal) > 1) and (disctotal != '')\nelse\n    u''\n"

paths:
    default: $album%aunique{album, albumartist}/%if{$isMultiDisc,CD-$disc/}$track $title
    singleton: $artist - Singles/$title
    comp: $album%aunique{album, albumartist}/%if{$isMultiDisc,CD-$disc/}$track $title
chrome:
    auto: no
ipfs:
    auto: no
    nocopy: no
lastgenre:
    force: no
    source: track
    count: 10
    whitelist: yes
    min_weight: 10
    fallback:
    canonical: no
    auto: yes
    separator: ', '
    prefer_specific: no
absubmit:
    auto: no
    extractor: ''
replaygain:
    backend: gstreamer
    overwrite: no
    auto: yes
    targetlevel: 89
    r128: [Opus]
spotify:
    source_weight: 1.0
    mode: list
    tiebreak: popularity
    show_failures: no
    artist_field: albumartist
    album_field: album
    track_field: title
    region_filter:
    regex: []
    client_id: 4e414367a1d14c75a5c5129a627fcab8
    client_secret: REDACTED
    tokenfile: spotify_token.json
include: [private.yaml]
import_history:
    auto: yes
pathfields: {}
album_fields: {}
mbcollection:
    auto: no
    collection: ''
    remove: no
playlist:
    auto: no
    playlist_dir: .
    relative_to: library
smartplaylist:
    relative_to:
    playlist_dir: .
    auto: yes
    playlists: []
mpd:
    host: a9kVkaZtWC8SievthFNTv7XqP@localhost
    port: 6600
    password: REDACTED
    music_directory: /var/lib/mpd/music-new
    rating: yes
    rating_mix: 0.75
fetchart:
    auto: yes
    minwidth: 0
    maxwidth: 0
    enforce_ratio: no
    cautious: no
    cover_names:
    - cover
    - front
    - art
    - album
    - folder
    sources:
    - filesystem
    - coverart
    - itunes
    - amazon
    - albumart
    google_key: REDACTED
    google_engine: 001442825323518660753:hrh5ch1gjzm
    fanarttv_key: REDACTED
    store_source: no
chroma:
    auto: yes
duplicates:
    album: no
    checksum: ''
    copy: ''
    count: no
    delete: no
    format: ''
    full: no
    keys: []
    merge: no
    move: ''
    path: no
    tiebreak: {}
    strict: no
    tag: ''
edit:
    albumfields: album albumartist
    itemfields: track title artist album
    ignore_fields: id path
missing:
    count: no
    total: no
    album: no
mbsubmit:
    format: $track. $title - $artist ($length)
    threshold: medium
acousticbrainz:
    auto: yes
    force: no
    tags: []

Hmm; but your config says this:

match:
    strong_rec_thresh: 0.04

…which is the default.

Wow thanks for catching that! I’ve had that part of the config down at the bottom and I forgot about it. I’ve tested this with a 90-95 % match import and it seems to be acting fine now.

1 Like