beetbox / beets

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

Weirdness with albumartist and ls -a #2155

Closed tweitzel closed 8 years ago

tweitzel commented 8 years ago

Problem

Beet import, on at least a couple of albums (https://musicbrainz.org/release/43c08b18-4f38-3953-9605-cde95836ef93 is where I first noticed), is populating albumartist_sort and albumartist_credit, but not albumartist. As a result, that field is not seen by beet ls -a.

Running this command in verbose (-vv) mode:

$ beet -vv info id:23155

Led to this problem:

user configuration: /Users/xarph/.config/beets/config.yaml
data directory: /Users/xarph/.config/beets
plugin paths: /Users/xarph/work/whatlastgenre/plugin/beets/beetsplug
Sending event: pluginload
inline: adding item field disc_and_track
library database: /Users/xarph/Music/beetslibrary.blb
library directory: /Users/xarph/Music/beets
Sending event: library_opened
/Users/xarph/Music/beets/Depeche Mode/The Singles 81_85/16 Photographic (Some Bizzare version).mp3
acoustid_fingerprint: AQADtMkkKUmUJFIkHDAOADAAHzhxADBwAAZOHIB1HDCgG8dJnNiyHDmeC8dNIUWNH6qYrrguMA9cRYlhlbhD4RHhZzH6ENVhlcGVDEWN57gH9_jxhHgNtYKPR8oQnrgqo0f6oN0hhYeH8ET3wD947XgZ4A9SJ1vxCP2FsoLKlbCDSEqzIJfo4Ud9TGmSCTryLSYKX2MGxg4uE_vR7AhfXCf6BU1aHs-Pn3iQUx9RncarHz-KHv_hozyOVzKqUJsjRIvYSUjoagZz_Og3wffQox6auMGJE2eITityZR70LMfDI9cE6ziHsH-wQ73QQwsZHTl2CZV5UBaFG9uPkzkuGumRTNWIl-FxKUh-5Ml-VBWakcGVzEL54DiccDqmT8GfIUtG7oJWXUIkXolwkSweHBV1CUeHXsOPXcctHN12XOnx7LiE5DTyLMWD68J5OJUuMB_6TCuOjcuOy3imwztCK9ugG9WF5zK69EFiKVk23EfRTCLOeRNK-cELO8SHPj3WSgjdRDEkbUkehFNkLVh__J3QSEPZh_iGvnHgn6iM4zvGC49ihDf88MjDw8YzHM-Q7_B36EeOM_B18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zDhNAWGSAcYAEEIYhBCBBgBFBAQGIASFQgAiRCAQzAoEpGJCGIYUUEIJxIBgQBgAFAGMAGKEQsgw5oR0zgEABHJCAgGoBIQYRRAgyAMCiECMISSQwUwAoAQCCABRCFCACWGEAAoo4hyCBggggBLDCMKIEwY4YQgBDBiBBKCEBEaMMEQwoYhAADkLkBBEKAOEIAAyQggTwDAigDJEIGYAAhQQoSBBAABTIENKACSpEMYAQQBQxFgnhDIAEIIsIAQIAhBiSAGDgEAEAESIggAQBQiDghBCADSKCEIdIEIIgxUxABDDjEOOCSKIUgIwJIRwhAAAhTDEAC-QQVYQAAgAAjhHiQEeC4WAAIQRYBAjwjjhBAQQQAscSQQoBxCAAAlgCBZEAKegQsIoLhQwCgGAEGEQAWMgY0pAAoQgCiElHHJCCAEMkwIjQoATiACBADMEUUCUEMgYpoRVCBhBAEIEEUSAMgQR4YQyjCGBjRCICgAQEAQYw5gAwDhFHAOMISAYAsABChRQhjnCCGMWAYGYMEQBAxhSzABECCDMAsasMEYBoYQBQgIiKAFAMGEAEkAoISxDwDjJhCKQKSAgAQIoQIARghgAFJAA
         acoustid_id: 31fbfcd4-7127-48e3-9e04-7b235c6f678f
               album: The Singles 81>85
  albumartist_credit: Depeche Mode
    albumartist_sort: Depeche Mode
         albumstatus: Official
           albumtype: compilation
                 art: True
              artist: Depeche Mode
       artist_credit: Depeche Mode
                asin: B00000HY5N
            bitdepth: 0
             bitrate: 246741
                 bpm: 0
          catalognum: 9 47298-2
            channels: 2
                comp: False
             country: US
                date: 1985-10-15
                 day: 15
                disc: 1
           disctotal: 1
              format: MP3
               genre: Synthpop, Electronic Rock, Electronic
              genres: Synthpop, Electronic Rock, Electronic
         initial_key: Gm
               label: Mute
            language: eng
              length: 193.666666667
              lyrics:
          mb_albumid: 43c08b18-4f38-3953-9605-cde95836ef93
         mb_artistid: 8538e728-ca0b-4321-b7e5-cff6565dd4c0
   mb_releasegroupid: eadcd3aa-84fb-3931-88ba-a8489f4894f1
          mb_trackid: d2fff167-6e48-4966-9091-8bd7b002dbdc
               media: CD
               month: 10
       original_date: 1985-01-01
       original_year: 1985
       rg_album_gain: -9.41
       rg_album_peak: 1.478232
       rg_track_gain: -8.24
       rg_track_peak: 1.167808
          samplerate: 44100
              script: Latn
               title: Photographic (Some Bizzare version)
               track: 16
          tracktotal: 17
                year: 1985
Sending event: cli_exit

Setup

My configuration (output of beet config) is:

plugins: acousticbrainz, badfiles, chroma, duplicates, embedart, fetchart, fromfilename, ftintitle, info, inline, lastgenre, mbsubmit, mbsync, play, random, replaygain, scrub, web
lemon:cd xarph$ beet config
play:
    command: /usr/local/bin/mpv $args --display-tags='Artist,Album,Album_Artist,Genre,Title,Track,disc,date,icy-title,service_name' --vo null --no-audio-display --af=volume=replaygain-album --playlist
    warning_threshold: -2
    use_folders: no
    warning_treshold: 100
    raw: no
    relative_to:
scrub:
    auto: no
pluginpath: ~/work/whatlastgenre/plugin/beets/beetsplug
asciify_paths: yes
fetchart:
    auto: yes
    minwidth: 300
    enforce_ratio: yes
    sources: coverart itunes amazon albumart
    google_engine: 001442825323518660753:hrh5ch1gjzm
    cautious: no
    maxwidth: 0
    store_source: no
    google_key: REDACTED
    fanarttv_key: REDACTED
    cover_names:
    - cover
    - front
    - art
    - album
    - folder
library: /Users/xarph/Music/beetslibrary.blb
original_date: yes

clutter: .DS_Store desktop.ini
importfeeds:
    formats: m3u_multi link
    dir: /Users/xarph/Music/beetsplaylist
    absolute_path: yes
badfiles:
    commands: {}

plugins: lastgenre chroma replaygain ftintitle info duplicates web fromfilename scrub badfiles play random fetchart embedart acousticbrainz mbsync mbsubmit inline

paths:
    default: $albumartist/$album%aunique{}/$disc_and_track $title
    comp: Compilations/$album%aunique{}/$disc_and_track $artist - $title
    singleton: $artist/Unknown Album/$title

format_item: '$id: $artist - $album%aunique{} - $disc_and_track - $title ($year)'
item_fields:
    disc_and_track: u'%02i-%02i' % (disc, track) if disctotal > 1 else u'%02i' % (track)
per_disc_numbering: yes
id3v23: yes
languages: en
lastgenre:
    fallback: Unfiled
    canonical: ''
    whitelist: /Users/xarph/.config/beets/genres.txt
    source: track
    force: no
    count: 3
    min_weight: 10
    auto: yes
    separator: ', '
directory: /Users/xarph/Music/beets

import:
    move: no
    copy: yes
    write: yes
    log: /Users/xarph/Music/beetslog.txt

match:
    preferred:
        countries: [US, GB|UK]
        media: [CD, Digital Media|File]
        original_year: yes
wlg:
    auto: yes
chroma:
    auto: yes
embedart:
    compare_threshold: 0
    auto: yes
    ifempty: no
    remove_art_file: no
    maxwidth: 0
mbsubmit:
    threshold: medium
    format: $track. $title - $artist ($length)
pathfields: {}
album_fields: {}
ftintitle:
    auto: yes
    drop: no
    format: feat. {0}
replaygain:
    targetlevel: 89
    auto: yes
    overwrite: no
    backend: command
    command: ''
    noclip: yes
duplicates:
    count: no
    full: no
    format: ''
    keys: []
    move: ''
    tag: ''
    path: no
    copy: ''
    tiebreak: {}
    album: no
    strict: no
    checksum: ''
    merge: no
    delete: no
web:
    host: 127.0.0.1
    port: 8337
    cors: ''
acousticbrainz:
    auto: yes
sampsyo commented 8 years ago

That's certainly strange. I can't seem to reproduce this—importing an album as that Depeche Mode record led to correct behavior here:

$ beet ls -a
Depeche Mode - The Singles 81>85

If you try removing the album and importing it again, does the same problem happen? Is there any chance a modification somewhere along the line removed the field?

tweitzel commented 8 years ago

Of course it would work when I try it again. Maybe something was wonky with musicbrainz the night I was doing all this ripping + encoding. See attached. wat.txt

tweitzel commented 8 years ago

This snippet is unrelated but worth looking at by the unicode party team fetchart: image size: (504, 500) fetchart: image is not square (504 != 500) fetchart: downloading image: http://coverartarchive.org/release-group/5d8c9a9a-c60b-33a7-a7cf-286ddb51c86c/front fetchart: downloaded art to: /var/folders/8g/7p_5t96552722whrf_bc5nq00000gn/T/tmpPWocBV.jpg fetchart: image size: (504, 500) fetchart: image is not square (504 != 500) fetchart: trying source itunes for album Depeche Mode - The Singles 86>98 Traceback (most recent call last): File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 853, in emit msg = self.format(record) File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 726, in format return fmt.format(record) File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 465, in format record.message = record.getMessage() File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 325, in getMessage msg = str(self.msg) File "/usr/local/lib/python2.7/site-packages/beets/logging.py", line 85, in __str__ return self.msg.format(*args, **kwargs) ValueError: Unknown format code 'r' for object of type 'unicode' Logged from file fetchart.py, line 440

sampsyo commented 8 years ago

OK, glad this is cleared up!

If that warning shows up again on the latest source, would you mind opening a separate issue?