beetbox / beetbox/beets

Add --fail mode to importer that bails out on first non-automatic match

Open
#3,444 2 comments 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

Current behaviour for beets in --quiet mode is to skip an import item if it cannot be recognized successfully and will even return a success in such case.
This makes automation hard because one needs to parse the beets output which is not formatted nicely for machine parsing.
What I propose is a simple --fail/--error/--pedantic ( the name is not critical ) extra flag which makes beets immediately quit as soon as any problem ( including skipped items ) is found, skipped items event should get its own return code in such condition, in particular 0 should be returned if and only if an import was fully successful.
All plugin failures should be ideally handled as critical in such mode as well if possible.
There might be more conditions that'd warrant non-zero return codes in such mode which aren't handled by the current return code mechanism, but I cannot think of any right now, in principle they could get added as seen fit.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the importer’s --quiet-mode handling and its current return-code paths. Define how a new failure mode should treat skipped items and plugin failures, then verify that successful imports alone return 0; the issue names no files or tests, so the relevant entry points must be located first.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.