LRCLIB commonly returns LRC timestamps with 3 decimal places ([mm:ss.xxx]).
LINE_PARTS_PAT and LRC_TIMESTAMP_PAT strictly expected two digits (\.\d\d),
causing verify_synced_lyrics to fail when the final line of a song has
millisecond precision (e.g. Final Light - Final Light ending with [06:07.301])
and fall back to plain text.
Additionally, interior 3-decimal lines had timestamps dropped from ID3 SYLT
frames and leaked raw bracketed tags into plain text extraction.
- Update regexes to accept \.\d{2,3}
- Parse both 2-digit (cs) and 3-digit (ms) fractions in Lyrics.sylt
- Add unit tests and changelog entry
Try to match the exact title and artist/album first (case-insensitive via StringQuery),
only then fall back to the previous substring matching.
This helps in cases where multiple variants of a song with distinct listen counts exist, like "Song" and "Song (inst.)" or "Song (Japanese ver.)".
This commit stops "Song" from also updating those separate variants if an exact match of "Song" exists.
Nonetheless, if the library only has an item named "Song (feat. Artist)", "Song" will still update its play count through the substring match.
Previously, all matchers were simply OR'd together, so the preference for MBID matches stated in the comments wasn't really applied.
Instead, listens with an MBID match could also update tracks with a different MBID, just because they had a substring match on their title.
For example, a listen for "Song" would also update play counts for "Song (inst.)", even though the library already contained "Song" with the listen's exact MBID and the instrumental has a different one.
When beets can't confidently match an album, the interactive import
prompt now offers a "Rescan directory" option alongside Skip/Use
as-is/etc. It re-reads the task's directories from disk and re-runs
the match, so files can be cleaned up (duplicates, junk) mid-import
without restarting the whole beet import run.
- New Action.RESCAN enum member (actions.py) and set_choice wiring
(tasks.py).
- New "r" PromptChoice, shown for album tasks with a toppath, added
to both the "no candidates" and "pick a candidate" prompt variants
since they share the same choice list (session.py).
- New rescan_tasks() generator and a RESCAN branch in the user_query
pipeline stage that re-extends the pipeline with freshly-discovered
tasks, mirroring the existing TRACKS/ALBUMS branches (stages.py).
Discovery is delegated to ImportTaskFactory.paths(), the same logic
the initial scan uses; rescan_tasks only scopes the walk and keeps
the original toppath on the emitted tasks (for move pruning and
resume bookkeeping).
- Handles nested multi-disc albums, flattened sibling discs, the
"Group albums" choice (withheld -- no directory scope to rescan),
and a plugin forcing Action.RESCAN onto a task with no valid rescan
scope (singleton, toppath-less, or grouped).
- Tests, auto-tagger guide entry, changelog entry.
Comments and docstrings are kept deliberately brief per review
feedback; see the PR description for the fuller design rationale and
the known limitations (sibling-disc/loose-parent edge cases).
Fixes#166
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019mndYhbgqCtkRY3wppFoQb
TrackInfo expects the converted ISO 8601 duration in its length
field. The plugin passed it as duration instead, which TrackInfo
silently stores as a flexible attribute while length stays None, so
Tidal candidates were matched without any track-length distance.
Pass the duration as length and update the parsing tests to assert
info.length instead of the incorrect info.duration flex field.
When `beet import -W` (--nowrite) is run with the scrub plugin
enabled (auto=True), the plugin was scrubbing (removing) tags even
though --nowrite means "don't write to files". This caused tags
to be lost.
The fix adds a guard at the start of import_task_files to skip
the entire scrub operation when should_write() returns False,
making the scrub plugin respect the --nowrite flag like other
plugins do.
Fixes#6958
Now we are able to type Results simply as a Sequence. This way, we can
also now use a more generic representation `Sequence[LibModel]` to refer
to *any* of the two models.
- Track active notification tasks by connection so repeated dispatches do not
send duplicate idle responses while a previous send is still draining.
- Add regression coverage for serialized notification delivery and idle command
disconnect handling.