Skip to content

badfiles: respect import.quiet during import hook#6589

Merged
snejus merged 3 commits into
beetbox:masterfrom
eyupcanakman:fix/badfiles-quiet-mode
May 2, 2026
Merged

badfiles: respect import.quiet during import hook#6589
snejus merged 3 commits into
beetbox:masterfrom
eyupcanakman:fix/badfiles-quiet-mode

Conversation

@eyupcanakman
Copy link
Copy Markdown
Contributor

Description

The badfiles plugin's on_import_task_before_choice hook prompted for input even when quiet mode was active. Non-interactive imports stalled on the corrupt-file dialog. The hook now returns early when import.quiet is set, so the importer falls back to its summary judgment under both the --quiet flag and the import.quiet: yes config key.

Fixes #4736.

To Do

  • Documentation
  • Changelog
  • Tests

Copilot AI review requested due to automatic review settings April 28, 2026 14:00
@eyupcanakman eyupcanakman requested a review from a team as a code owner April 28, 2026 14:00
@github-actions github-actions Bot added the badfiles badfiles plugin label Apr 28, 2026
@eyupcanakman eyupcanakman force-pushed the fix/badfiles-quiet-mode branch 2 times, most recently from 68c8057 to 453b4bc Compare April 28, 2026 14:27
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.07%. Comparing base (250b3fd) to head (10d0f37).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6589      +/-   ##
==========================================
+ Coverage   72.03%   72.07%   +0.04%     
==========================================
  Files         159      159              
  Lines       20631    20633       +2     
  Branches     3272     3273       +1     
==========================================
+ Hits        14861    14871      +10     
+ Misses       5063     5053      -10     
- Partials      707      709       +2     
Files with missing lines Coverage Δ
beetsplug/badfiles.py 28.88% <100.00%> (+7.08%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@eyupcanakman eyupcanakman force-pushed the fix/badfiles-quiet-mode branch from 453b4bc to 01baa75 Compare April 28, 2026 15:29
Comment thread beetsplug/badfiles.py Outdated
Comment thread test/plugins/test_badfiles.py Outdated
Copy link
Copy Markdown
Member

@snejus snejus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks. Just rebase it on top of master and resolve the conflict in the changelog.

The import hook prompted for input even when quiet mode was active, so
non-interactive imports blocked on the corrupt-file dialog. Return early
from `on_import_task_before_choice` when `import.quiet` is set so the
importer falls back to its summary judgment.
@eyupcanakman eyupcanakman force-pushed the fix/badfiles-quiet-mode branch from 2501783 to 382ec79 Compare May 1, 2026 14:02
@snejus snejus merged commit 3d3f5e3 into beetbox:master May 2, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

badfiles badfiles plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

badfiles: Respect "quiet" mode during import hook

2 participants