beetbox / beetbox/beets

Importer: Print a more useful message when an album consists of zero bytes (no files)

Open
#3,750 1 comment 0 reactions 0 assignees View on GitHub
feature
Dominant language
Python
Stars
15.7k
Forks
2.1k
Avg merge
4d 21h
Merged PRs (30d)
31

Description

Continued discussion from #2486 (which started as a different bug report years ago). The bottom few messages get at my new goal.

https://github.com/beetbox/beets/issues/2486#issuecomment-690771318

I can't guarantee I manage my library through beets 100% of the time. (Especially if I'm a novice and don't understand beets)

Beets behaves oddly when it encounters files that have been deleted. A filesystem error should suggest the user (1) look into the problem and (2) `update` when they are satisfied they addressed it? File errors could come up with USB, SD (`alternatives`/`convert` plugin?), or network drives, on top of normal user deletes and moves.

Steps to reproduce:

1. Download the ogg of [Directionless EP](https://brokeforfree.bandcamp.com/album/directionless-ep)

2. `beet import "C:\Users\rollingstar\Downloads\Broke For Free - Directionless EP.zip"` (Windows x64 cmder if it matters)

Sidenote: An example normal import which triggers the dupe detection.

```
Correcting tags from:
Broke For Free - Directionless EP
To:
Broke For Free - Directionless
URL:
https://musicbrainz.org/release/e81e934b-1c7e-44b0-849c-de3c5311fb19
(Similarity: 95.9%) (country, media) (Digital Media, 2011, XW)
This album is already in the library!
Old: 6 items, OGG, 192kbps, 21:25, 24.8 MiB
New: 6 items, OGG, 192kbps, 21:25, 24.7 MiB
[S]kip new, Keep both, Remove old, Merge all?
```
3. Move the Directionless folder out of the beets library folder.

4. Run the import on the same file. (Again, this could be a new master that the user might actually want)

```
Correcting tags from:
Broke For Free - Directionless EP
To:
Broke For Free - Directionless
URL:
https://musicbrainz.org/release/e81e934b-1c7e-44b0-849c-de3c5311fb19
(Similarity: 95.9%) (country, media) (Digital Media, 2011, XW)
This album is already in the library!
could not get filesize: [WinError 3] The system cannot find the path specified: '\\\\?\\e:\\Music\\Broke For Free - 2011 - Directionless\\01. Night Owl.ogg'
could not get filesize: [WinError 3] The system cannot find the path specified: '\\\\?\\e:\\Music\\Broke For Free - 2011 - Directionless\\02. My Always Mood.ogg'
could not get filesize: [WinError 3] The system cannot find the path specified: '\\\\?\\e:\\Music\\Broke For Free - 2011 - Directionless\\03. Day Bird.ogg'
could not get filesize: [WinError 3] The system cannot find the path specified: '\\\\?\\e:\\Music\\Broke For Free - 2011 - Directionless\\04. My Luck.ogg'
could not get filesize: [WinError 3] The system cannot find the path specified: "\\\\?\\e:\\Music\\Broke For Free - 2011 - Directionless\\05. Mell's Parade.ogg"
could not get filesize: [WinError 3] The system cannot find the path specified: '\\\\?\\e:\\Music\\Broke For Free - 2011 - Directionless\\06. Only Instrumental.ogg'
Old: 6 items, OGG, 192kbps, 21:25, 0.0 B
New: 6 items, OGG, 192kbps, 21:25, 24.7 MiB
[S]kip new, Keep both, Remove old, Merge all?
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the documented `beet import` command after moving the album directory, then inspect the importer path that reports missing files and displays album sizes. Review the linked discussion in #2486 for the intended guidance. Done means a zero-byte album caused by missing files produces a useful message directing the user to investigate and run `update` after fixing the problem.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.