desbma / sacad

Smart Automatic Cover Art Downloader
Mozilla Public License 2.0
319 stars 17 forks source link

Unable to read metadata for album directory #56

Closed Serranya closed 3 years ago

Serranya commented 3 years ago

I am running sacad_r -v -p Alice\ Glass/ 1200 cover.jpg on arch linux. I tried the latest release and the current git version.

Output:

2021-05-08 09:23:11,401 DEBUG [root] Max open files count set from 1024 to 524288
2021-05-08 09:23:11,423 ERROR [sacad_r] Unable to read metadata for album directory 'Alice Glass/2017 - Alice Glass'
Analyzing library: 2dir [00:00, 101.88dir/s, files=7, albums=0, missing covers=0, errors=1]
Searching covers: 0cover [00:00, ?cover/s, errors=0, no result found=0, ok=0]

When I run mutagen-inspect Alice\ Glass/2017\ -\ Alice\ Glass/01.\ Without\ Love.wv

Output:

-- Alice Glass/2017 - Alice Glass/01. Without Love.wv
- WavPack, 235.77 seconds, 44100 Hz (audio/x-wavpack)
Album=Alice Glass
Album artist=Alice Glass
Albumartistsort=Glass, Alice
Artist=Alice Glass
Artists=Alice Glass
Artistsort=Glass, Alice
Barcode=888072039704
Catalognumber=LVR00245
Disc=1/1
Genre=Electronic
Isrc=USC4R1702185
Label=Loma Vista Recordings
Media=CD
Musicbrainz_albumartistid=4b2d0bc6-7c8a-4815-8269-49cff0c5ff60
Musicbrainz_albumid=bf1f182f-c857-454a-a9c7-d44feeba01cc
Musicbrainz_artistid=4b2d0bc6-7c8a-4815-8269-49cff0c5ff60
Musicbrainz_releasegroupid=31026efa-843b-4c9f-bc1c-9768fe1d28dd
Musicbrainz_releasetrackid=1a37ff8d-2dd9-498c-8209-768ae2a23d6b
Musicbrainz_trackid=ea59246d-5d56-4945-9564-7e52298d55d7
Originaldate=2017-08-18
Originalyear=2017
Releasecountry=US
Releasestatus=official
Releasetype=ep
Script=Latn
Title=Without Love
Track=1/6
Year=2017-08-18
replaygain_album_gain=-9.99 dB
replaygain_album_peak=0.988525
replaygain_track_gain=-8.75 dB
replaygain_track_peak=0.988434

This is not the only album that fails. Pretty much every single album I have does not scan.

Serranya commented 3 years ago

I did some troubleshooting. The problem seems to lie here: https://github.com/desbma/sacad/blob/master/sacad/recurse.py#L127-L134

type(mf.tags) is mutagen.apev2.APEv2 which is not understood by the if else statements.

desbma commented 3 years ago

https://github.com/desbma/sacad/commit/4508847d7a2fd860f6e5c05d63c0d573369ed85e