cover not deleted when removing an album that has been imported twice, while importing
- 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 -vv import mypath
```
with fetchart and embedart activated, led to this problem:
If an album is already imported, beets asks if I want to keep both, or remove one. when I do Remove old, the old album tracks are deleted, but the folder remains with inside only cover.jpg.
In my case, it happens because I have multiple times the same album in different file formats when importing.
The expected behaviour is that the whole folder of the album to remove would be deleted. A workaround for this is to import the music without fetchart nor embedart, and run ```beet fetchart``` afterward.
### Setup
* OS: Ubuntu 22.04
* Python version: Python 3.10.12
* beets version: 2.2.0
* Turning off plugins made problem go away (yes/no): yes, if reactivated afterwards
My configuration (output of `beet config`) is:
```yaml
lyrics:
bing_lang_from: []
auto: yes
bing_client_secret: REDACTED
bing_lang_to:
google_API_key: REDACTED
google_engine_ID: REDACTED
genius_api_key: REDACTED
fallback:
force: no
local: no
synced: no
sources:
- google
- genius
- tekstowo
- lrclib
dist_thresh: 0.1
directory: /home/eve/Music/testBeetsOut/music
# --------------- Main ---------------
library: /home/eve/Music/testBeetsOut/data/musicbeets.db
# --------------- Plugins ---------------
plugins: fetchart embedart web lyrics fromfilename discogs duplicates
discogs:
source_weight: 0.0
user_token: REDACTED
apikey: REDACTED
apisecret: REDACTED
tokenfile: discogs_token.json
separator: ', '
index_tracks: no
append_style_genre: no
duplicates:
album: no
checksum: ''
copy: ''
count: no
delete: no
format: ''
full: no
keys: []
merge: no
move: ''
path: no
tiebreak: {}
strict: no
tag: ''
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
- cover_art_url
store_source: no
high_resolution: no
deinterlace: no
cover_format:
google_key: REDACTED
google_engine: 001442825323518660753:hrh5ch1gjzm
fanarttv_key: REDACTED
lastfm_key: REDACTED
embedart:
maxwidth: 0
auto: yes
compare_threshold: 0
ifempty: no
remove_art_file: no
quality: 0
web:
host: 127.0.0.1
port: 8337
cors: ''
cors_supports_credentials: no
reverse_proxy: no
include_paths: no
readonly: yes
```
Contributor guide
Research direction
Start by reproducing `beet -vv import mypath` with fetchart and embedart enabled, then trace the Remove old path for an album imported twice in different formats. Verify that removing the old album also removes its remaining cover.jpg folder, while preserving the normal behavior when those plugins are disabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100