Plugin: match command (interactive + explicit) #31

Closed
opened 2026-08-19 18:32:55 +00:00 by hermes · 1 comment
Owner

Context

SPEC.md §5 match. The command does not exist; depends on the state store and matching issues.

Task

No arguments (interactive):

  • Uses only plugin SQLite + the local beets library; no gateway access.
  • Processes only Apple tracks with ≥1 current managed-playlist membership, one at a time.
  • Shows Apple metadata and current resolution info; offers a beets query, skip once, or permanent skip.
  • Saves each decision immediately (interrupted runs resume); previously skipped tracks can be explicitly matched later.

Two arguments (beet apple match <apple-library-track-id> <beets-query>):

  • Query must return exactly one item; zero or multiple are errors.
  • The selected item becomes the association even if a previous association exists; no confirmation (explicit corrective workflow).
  • Clears any permanent skip; sets state to matched.
  • Fills the item's isrc only when empty and Apple supplies one.

The user must always have an explicit way to override an automated match.

Acceptance criteria

  • Interactive loop works offline, persists decisions incrementally.
  • Explicit match replaces associations, clears skip, no confirmation.
  • Exactly-one-item enforcement with clear errors otherwise.
  • ISRC fill-only-if-empty rule applied.
  • Tests for both modes incl. resume-after-interrupt semantics.

Ref: SPEC.md §5 match.

## Context SPEC.md §5 `match`. The command does not exist; depends on the state store and matching issues. ## Task **No arguments (interactive):** - Uses only plugin SQLite + the local beets library; no gateway access. - Processes only Apple tracks with ≥1 current managed-playlist membership, one at a time. - Shows Apple metadata and current resolution info; offers a beets query, skip once, or permanent skip. - Saves each decision immediately (interrupted runs resume); previously skipped tracks can be explicitly matched later. **Two arguments (`beet apple match <apple-library-track-id> <beets-query>`):** - Query must return exactly one item; zero or multiple are errors. - The selected item becomes the association **even if a previous association exists**; no confirmation (explicit corrective workflow). - Clears any permanent skip; sets state to `matched`. - Fills the item's `isrc` only when empty and Apple supplies one. The user must always have an explicit way to override an automated match. ## Acceptance criteria - [ ] Interactive loop works offline, persists decisions incrementally. - [ ] Explicit match replaces associations, clears skip, no confirmation. - [ ] Exactly-one-item enforcement with clear errors otherwise. - [ ] ISRC fill-only-if-empty rule applied. - [ ] Tests for both modes incl. resume-after-interrupt semantics. Ref: SPEC.md §5 `match`.
Author
Owner

Delivered in merged PR #36 (cb442af). Issue-specific implementation commits:

  • #22: 4937fad (completed by the SPEC-aligned documentation in 02d5954)
  • #30: 1e245f2
  • #31: 9186be5
  • #32: 0a8ae97
  • #33: 02d5954

Verification: 95 tests passed; focused Ruff checks, compileall, diff checks, isolated-BEETSDIR command smoke testing, and package build all passed. Issue #34 remains open by maintainer request for the deferred real-library acceptance run.

Delivered in merged PR #36 (`cb442af`). Issue-specific implementation commits: - #22: `4937fad` (completed by the SPEC-aligned documentation in `02d5954`) - #30: `1e245f2` - #31: `9186be5` - #32: `0a8ae97` - #33: `02d5954` Verification: 95 tests passed; focused Ruff checks, compileall, diff checks, isolated-`BEETSDIR` command smoke testing, and package build all passed. Issue #34 remains open by maintainer request for the deferred real-library acceptance run.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coop/beets-appleplaylists#31
No description provided.