beetbox / beets

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

fetchart sometimes doesn't import cover from file #2699

Closed abba23 closed 6 years ago

abba23 commented 6 years ago

Problem

When importing with the fetchart plugin enabled and using filesystem as the primary source, sometimes the album cover file isn't moved into the library folder. After the import has finished, the album folder is empty except for the cover file. When I copy that file into the album's folder in the library afterwards and do beet fetchart for it, the cover is imported successfully.

I imported about 10 albums and the problem appeared with 2 of them. All albums had the cover (Cover.jpg) in their folder together with their sound files.

The problem doesn't seem to be album specific. I tried removing an album from the library that previously had that problem and could reimport it with the cover file being carried over.

I didn't run beets in verbose mode at the time, but I will do next time and post the result if the problem occurs again.

Setup

My configuration (output of beet config) is:

lyrics:
    bing_lang_from: []
    force: yes
    fallback: ''
    auto: yes
    bing_client_secret: REDACTED
    bing_lang_to:
    google_API_key: REDACTED
    google_engine_ID: REDACTED
    genius_api_key: REDACTED
    sources: [google, lyricwiki, musixmatch]
directory: ~/Music/Beets
library: ~/Music/Beets/library.blb

format_item: "\e[92m$artist\e[39m - \e[31m$album\e[39m - \e[93m$title\e[39m"
format_album: "\e[92m$albumartist\e[39m - \e[31m$album\e[39m"

import:
    move: yes
    copy: no
    write: yes

match:
    preferred:
        media: [Digital Media, CD]
        country: [US, GB, DE]

paths:
    default: $albumartist/$album%aunique{}/$track - $title
    comp: Various Artists/$album%aunique{}/$track - $artist - $title

plugins: badfiles embedart fetchart fromfilename ftintitle info lastgenre lyrics mbsync missing replaygain scrub zero

fetchart:
    minwidth: 1000
    sources: filesystem coverart itunes amazon albumart
    auto: yes
    maxwidth: 0
    enforce_ratio: no
    cautious: no
    cover_names:
    - cover
    - front
    - art
    - album
    - folder
    google_key: REDACTED
    google_engine: 001442825323518660753:hrh5ch1gjzm
    fanarttv_key: REDACTED
    store_source: no
ftintitle:
    drop: yes
    auto: yes
    format: feat. {0}
lastgenre:
    canonical: yes
    whitelist: ~/.config/beets/genres.txt
    fallback: ''
    min_weight: 10
    count: 1
    source: album
    force: yes
    auto: yes
    separator: ', '
    prefer_specific: no
replaygain:
    backend: gstreamer
    overwrite: no
    auto: yes
    targetlevel: 89
    r128: [Opus]
zero:
    fields: comments
    update_database: yes
    auto: yes
    keep_fields: []
missing:
    count: no
    total: no
    album: no
scrub:
    auto: yes
embedart:
    maxwidth: 0
    auto: yes
    compare_threshold: 0
    ifempty: no
    remove_art_file: no
sampsyo commented 6 years ago

That’s interesting! To do a useful investigation, we’ll need a reproducible setup that causes the problem. Please update this thread if you find a situation where this happens reliably.

abba23 commented 6 years ago

It looks like I was mistaken and the albums where it didn't work had the tracks in subdirectories for each disk. The folder structure then looked something like this:

Albumtitle
├── CD1
│   ├── track-1-1.mp3
│   └── track-1-2.mp3
├── CD2
│   ├── track-2-1.mp3
│   └── track-2-2.mp3
├── CD3
│   ├── track-3-1.mp3
│   └── track-3-2.mp3
└── Cover.jpg

Using this structure fetchart doesn't seem to find the cover image file.

sampsyo commented 6 years ago

Aha! Yes, I don’t think we currently handle this situation. We may already have a ticket for this, but if not, please feel free to open a feature request here.