beetbox / beetbox/beets

fetchart hangs forever if server doesn't respond

Open
#5,454 10 comments 0 reactions 0 assignees View on GitHub
bug fetchart
Dominant language
Python
Stars
15.7k
Forks
2.1k
Avg merge
4d 21h
Merged PRs (30d)
31

Description

### Problem

Running this command in verbose (`-vv`) mode:

```sh
$ beet -vvv fetchart album:"TRON: Legacy R3C0NF1GUR3D"
```

Led to this problem:

```text
user configuration: /home/jack/.config/beets/config.yaml
data directory: /home/jack/.config/beets
plugin paths:
fetchart: google: Disabling art source due to missing key
fetchart: lastfm: Disabling art source due to missing key
Sending event: pluginload
library database: /mnt/tank/media/Music/.beets/library.db
library directory: /mnt/tank/media/Music
Sending event: library_opened
Parsed query: AndQuery([SubstringQuery('album', 'TRON: Legacy R3C0NF1GUR3D', fast=True)])
Parsed sort: NullSort()
fetchart: trying source filesystem for album Daft Punk - TRON: Legacy R3C0NF1GUR3D
fetchart: trying source itunes for album Daft Punk - TRON: Legacy R3C0NF1GUR3D
fetchart: getting URL: https://itunes.apple.com/search?term=Daft+Punk+TRON%3A+Legacy+R3C0NF1GUR3D&entity=album&media=music&limit=200
fetchart: iTunes search for 'Daft Punk TRON: Legacy R3C0NF1GUR3D' got no results
fetchart: trying source coverart for album Daft Punk - TRON: Legacy R3C0NF1GUR3D
fetchart: getting URL: https://coverartarchive.org/release/d0ddc2ca-5300-38ba-bb7d-83053369319c

```

https://coverartarchive.org/release/d0ddc2ca-5300-38ba-bb7d-83053369319c redirects to https://archive.org/download/mbid-d0ddc2ca-5300-38ba-bb7d-83053369319c/index.json but archive.org is currently down.

### Setup

* OS: NixOS 24.11 (Vicuna)
* Python version: 3.12.5
* beets version: 2.0.0 (although `beet version` reports 1.6.1 because https://github.com/beetbox/beets/commit/33ab22db8c69ffad8209f3258c7e22acb04eb668 didn't make it into 2.0.0)
* Turning off plugins made problem go away (yes/no): plugin issue

My configuration is:

```yaml
fetchart:
sources:
- filesystem
- itunes
- coverart
- amazon
- albumart
```

Contributor guide

Open the contributing guide

Research direction

Start by tracing the fetchart coverart source from the logged request to coverartarchive.org and reproduce the hang with an unresponsive redirect target. Identify the request path and its existing error-handling behavior; done means the beet fetchart command returns or skips the unavailable source instead of waiting indefinitely, with regression coverage where the surrounding tests support it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.