beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.86k stars 1.82k forks source link

duplicates doesn't catch complicated album #4054

Closed catap closed 3 years ago

catap commented 3 years ago

Problem

Let take some complicated almbum: https://musicbrainz.org/release/c5cebb0c-92aa-4a21-8d2f-b42a662a4519 which contains songs with similar names.

duplicates plugin things that this album has duplications

√ Music % beet duplicates    
Sinéad O’Connor - Theology - Out of the Depths
Sinéad O’Connor - Theology - 33
√ Music % beet info /Volumes/music/Sinead\ O\'Connor/Theology/*33.mp3                     
/Volumes/music/Sinead O'Connor/Theology/07 33.mp3
             album: Theology
       albumartist: Sinéad O’Connor
albumartist_credit: Sinéad O’Connor
  albumartist_sort: O’Connor, Sinéad
      albumartists: 
       albumstatus: Official
         albumtype: album
          arranger: 
               art: True
            artist: Sinéad O’Connor
     artist_credit: Sinéad O’Connor
       artist_sort: O’Connor, Sinéad
           artists: 
              asin: B000PUB5IG
          bitdepth: 0
           bitrate: 320000
               bpm: 0
        catalognum: 0179249MIN
          channels: 2
              comp: False
           country: DE
              date: 2007-06-22
               day: 22
              disc: 1
         disctitle: Dublin Sessions
         disctotal: 2
            format: MP3
             genre: Rock
            genres: Rock
              isrc: IEACJ0600067
             label: Ministry of Sound (Germany)
          language: eng
            length: 153.24
            lyrics: Sing oh U righteous to the lord
It's right that the upright should acclaim him
Sing to Jah with your guitar
Turn up yer bass amp
Whack it up all the way to 'save him'

By the word of Jah heaven was made
By the breath of his mouth all its hosts
He gathers up the oceans like a mound
And stores the deep
Stores the deep in vaults

Sing him a new song
Sing sweet with shouts of joy
For the word of Jah is right
And he sees what is right
And he loves what is right
And the earth is full of his care

Jah spoke and it was
He commanded and it endured
He frustrates the plans of nations
And brings to nothing
  mb_albumartistid: c78a77fa-507c-4c07-947a-0355029453bd
 mb_albumartistids: c78a77fa-507c-4c07-947a-0355029453bd
        mb_albumid: 9d9b7212-59e1-3233-b4ae-eb8fb2684418
       mb_artistid: c78a77fa-507c-4c07-947a-0355029453bd
      mb_artistids: c78a77fa-507c-4c07-947a-0355029453bd
 mb_releasegroupid: aedc07d1-a87f-3ab6-968e-82ce3d6856b5
 mb_releasetrackid: 6261299a-a473-3945-815e-2fe9f17d8c8a
        mb_trackid: 62249fc2-9342-47f8-ba25-4d177381e5cc
             media: CD
             month: 6
     original_date: 2007-06-18
      original_day: 18
    original_month: 6
     original_year: 2007
        samplerate: 44100
            script: Latn
             title: 33
             track: 7
        tracktotal: 22
              year: 2007

/Volumes/music/Sinead O'Connor/Theology/15 33.mp3
             album: Theology
       albumartist: Sinéad O’Connor
albumartist_credit: Sinéad O’Connor
  albumartist_sort: O’Connor, Sinéad
      albumartists: 
       albumstatus: Official
         albumtype: album
          arranger: 
               art: True
            artist: Sinéad O’Connor
     artist_credit: Sinéad O’Connor
       artist_sort: O’Connor, Sinéad
           artists: 
              asin: B000PUB5IG
          bitdepth: 0
           bitrate: 320000
               bpm: 0
        catalognum: 0179249MIN
          channels: 2
              comp: False
           country: DE
              date: 2007-06-22
               day: 22
              disc: 2
         disctitle: London Sessions
         disctotal: 2
            format: MP3
             genre: Rock
            genres: Rock
              isrc: IEACJ0600067
             label: Ministry of Sound (Germany)
          language: eng
            length: 163.36
            lyrics: Sing oh U righteous to the lord
It's right that the upright should acclaim him
Sing to Jah with your guitar
Turn up yer bass amp
Whack it up all the way to 'save him'

By the word of Jah heaven was made
By the breath of his mouth all its hosts
He gathers up the oceans like a mound
And stores the deep
Stores the deep in vaults

Sing him a new song
Sing sweet with shouts of joy
For the word of Jah is right
And he sees what is right
And he loves what is right
And the earth is full of his care

Jah spoke and it was
He commanded and it endured
He frustrates the plans of nations
And brings to nothing
  mb_albumartistid: c78a77fa-507c-4c07-947a-0355029453bd
 mb_albumartistids: c78a77fa-507c-4c07-947a-0355029453bd
        mb_albumid: 9d9b7212-59e1-3233-b4ae-eb8fb2684418
       mb_artistid: c78a77fa-507c-4c07-947a-0355029453bd
      mb_artistids: c78a77fa-507c-4c07-947a-0355029453bd
 mb_releasegroupid: aedc07d1-a87f-3ab6-968e-82ce3d6856b5
 mb_releasetrackid: b567cbb6-1b67-3fa3-9c61-fe8a8ea3d35f
        mb_trackid: 62249fc2-9342-47f8-ba25-4d177381e5cc
             media: CD
             month: 6
     original_date: 2007-06-18
      original_day: 18
    original_month: 6
     original_year: 2007
        samplerate: 44100
            script: Latn
             title: 33
             track: 15
        tracktotal: 22
              year: 2007
√ Music % 

How you can see length of both songs are different. The same happened with the second song.

Setup

My configuration (output of beet config) is:

lyrics:
    bing_lang_from: []
    auto: yes
    sources: musixmatch google
    google_API_key: REDACTED
    google_engine_ID: REDACTED
    bing_client_secret: REDACTED
    bing_lang_to:
    genius_api_key: REDACTED
    fallback:
    force: no
    local: no
directory: /Volumes/music
asciify_paths: yes

import:
    move: yes
    write: yes
    copy: yes
    resume: ask
    hardlink: no
    link: no
    timid: no
follow:
    auto: yes
    email: REDACTED
    password: REDACTED
    userid: REDACTED

musicbrainz:
    user: catap
    pass: REDACTED
mbcollection:
    auto: yes
    remove: yes
    collection: 04540b29-ba5e-4e0e-82e8-161035854aa4
smartplaylist:
    auto: yes
    relative_to: /Volumes/music
    prefix: REDACTED
    urlencode: yes
    forward_slash: yes
    playlist_dir: ~/Music/playlists
    playlists: [{name: _Everything.m3u, query: ''}, {name: $albumartist/_Everything.m3u, query: ''}, {name: '$albumartist/$album%aunique{}.m3u', query: ''}]

plugins: duplicates embedart fetchart follow fuzzy info lastgenre lyrics mbcollection mbsubmit mbsync missing smartplaylist
duplicates:
    album: no
    checksum: ''
    copy: ''
    count: no
    delete: no
    format: ''
    full: no
    keys: []
    merge: no
    move: ''
    path: no
    tiebreak: {}
    strict: no
    tag: ''
lastgenre:
    whitelist: yes
    min_weight: 10
    count: 1
    fallback:
    canonical: no
    source: album
    force: yes
    auto: yes
    separator: ', '
    prefer_specific: no
    title_case: yes
missing:
    count: no
    total: no
    album: no
fetchart:
    auto: yes
    minwidth: 0
    maxwidth: 0
    quality: 0
    max_filesize: 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
    lastfm_key: REDACTED
    store_source: no
    high_resolution: no
mbsubmit:
    format: $track. $title - $artist ($length)
    threshold: medium
embedart:
    maxwidth: 0
    auto: yes
    compare_threshold: 0
    ifempty: no
    remove_art_file: no
    quality: 0
fuzzy:
    prefix: '~'
    threshold: 0.7
sampsyo commented 3 years ago

The plugin uses $mb_trackid as the key by default (see the docs), and these tracks have the same ID.

catap commented 3 years ago

@sampsyo interesting, thanks!

catap commented 3 years ago

This isn't a bug.