3862 Commits
Author SHA1 Message Date
Šarūnas Nejus c74541a3fa Merge branch 'master' into fix-4889-empty-leading-path-field 2026-09-13 13:55:15 +01:00
Maksymilian Babarowski 3f138e2ac3 discogs: read the release month and day from released 2026-09-12 16:12:39 +02:00
Šarūnas Nejus c6906dc139 Merge branch 'master' into fix-testimport7z-optional-py7zr 2026-09-12 08:57:16 +01:00
Michael Landry 6411f82ea0 lyrics: support 3-decimal millisecond timestamps in LRC parsing
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
2026-09-11 02:35:02 +00:00
Sebastian Cao aab50dfb73 fix(library): don't let an empty leading path field escape the base directory 2026-09-10 15:01:19 +08:00
Shurong Cao bd5e09d528 importer: inline optional dependency skip checks in test_importer 2026-09-09 22:58:11 +08:00
Shurong Cao 436f3a579f importer: skip TestImport7z and TestImportRar when optional dependencies are missing
Skip TestImport7z when py7zr cannot be imported, and skip TestImportRar when rarfile or unrar is unavailable.

Fixes #7002
2026-09-09 22:34:07 +08:00
Šarūnas Nejus 7bc4ec4264 Enable db sorting of related fields 2026-09-07 20:34:34 +01:00
Šarūnas Nejus f09a6f9e29 list: support sorting by flexible attributes with limit 2026-09-07 20:34:34 +01:00
Šarūnas Nejus 02b5186998 list: add -l flag, support LIMIT clause 2026-09-07 20:34:34 +01:00
Maxr1998 fce53eafdf playcount: prefer exact title/artist/album matches over substring matches
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.
2026-09-07 08:20:07 +01:00
Maxr1998 c1abc55188 playcount: prefer an exact MBID match over title queries
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.
2026-09-07 08:20:07 +01:00
Sebastian Cao 59e67d52f7 tests: drop annotations except on the two helpers 2026-09-06 14:04:15 +08:00
Sebastian Cao ebff401f35 merge upstream master into deezer-compilation-detection-4057 2026-09-06 14:04:15 +08:00
Barrett Clark 7860e6b854 Merge branch 'master' into import-rescan-directory 2026-09-05 08:56:09 -05:00
Sebastian Cao 59736ebfac fix(deezer): detect compilations credited to a single main artist 2026-09-05 16:49:19 +08:00
Šarūnas Nejus 71f616c0c7 Merge branch 'master' into tarfile-bugfix 2026-09-05 02:03:04 +01:00
Šarūnas Nejus 5002bb8624 Merge branch 'master' into fix/tidal-search-api 2026-09-05 00:15:32 +01:00
Šarūnas Nejus b9fbc51b62 Merge branch 'master' into fix-scrub-nowrite 2026-09-05 00:05:38 +01:00
Trey Turner 31b0a226f8 fix(tidal): adapt to current search API
Fixes #6989
2026-09-04 19:53:59 +00:00
Barrett ClarkandClaude Sonnet 5 8f86ec1f1c Add "Rescan directory" import prompt choice
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
2026-09-03 18:33:43 -05:00
Sebastian Mohr 8a2e4bb461 Add tests for the session and API layers
Cover the plex.tv PIN authentication flow, token persistence, and
the library refresh requests with mocked HTTP responses.
2026-09-03 16:37:00 +02:00
Sebastian Mohr deedd5c608 Pass track duration as length for matching
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.
2026-09-02 21:57:24 +02:00
shuwen.wu 15637ed148 fix(scrub): skip scrubbing when --nowrite is passed
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
2026-09-03 02:46:03 +08:00
Alok Saboo df8236e354 edit: allow item-only fields to remain in per-track documents during interactive import 2026-09-02 10:57:44 -04:00
Šarūnas Nejus 4e9677dfa3 play: test play on import 2026-08-31 11:27:12 +01:00
Šarūnas Nejus 0b5a5b0350 typing: fix missing types in plugins 2026-08-31 11:27:12 +01:00
Šarūnas Nejus 9611a23a87 typing: fix annotations in thumbnails 2026-08-31 10:55:33 +01:00
Šarūnas Nejus b64c693252 typing: fix annotations in mpdstats 2026-08-31 10:55:33 +01:00
Šarūnas Nejus 4e1fdf0bf3 typing: fix annotations in metadata source plugins 2026-08-31 10:48:16 +01:00
Šarūnas Nejus 21ffeff202 aura: fix filtering and sorting 2026-08-29 21:15:38 +01:00
Šarūnas Nejus 743eb3b36b bpd: fix search when any field is used 2026-08-29 17:49:13 +01:00
Šarūnas Nejus 03877cc20b move: fix moving albums in timid mode 2026-08-27 06:47:40 +01:00
Šarūnas Nejus e5846915d4 modify: fix selecting objects 2026-08-27 06:47:39 +01:00
Šarūnas Nejus efc7e4f206 remove: fix ui formatting and test it 2026-08-27 06:47:39 +01:00
Šarūnas Nejus 2971393618 Replace do_query with model-specific logic
This allows to define a proper return type for input_select_objects.
2026-08-27 06:47:39 +01:00
Šarūnas Nejus dd841f6b99 Test commands by CLI invocation 2026-08-27 01:31:43 +01:00
Šarūnas Nejus 01375c7392 typing: fix core annotations 2026-08-22 17:49:49 +01:00
Šarūnas Nejus d9e2b65758 Merge branch 'master' into fix/lrclib-null-lyrics 2026-08-22 17:41:55 +01:00
Šarūnas Nejus 467cf7a8b7 Fix lyrics integration tests 2026-08-21 20:56:39 +01:00
Šarūnas Nejus 914441da16 typing: fix command handlers types 2026-08-21 20:56:38 +01:00
Šarūnas Nejus a3bb963ea0 ipfs: fix play command 2026-08-20 00:51:44 +01:00
Šarūnas Nejus 27900f58fb Prefer imports from modules that provide import aliases 2026-08-18 23:20:39 +01:00
Šarūnas Nejus 4aa5aa62ac typing: fix types in beetsplug._utils.art 2026-08-18 23:20:38 +01:00
Šarūnas Nejus 9adcb601f8 typing: make dbcore.db.Results a Sequence
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.
2026-08-18 23:20:38 +01:00
Šarūnas Nejus 1969622874 typing: fix types in event handlers 2026-08-18 10:46:33 +01:00
J0J0 Todos 5b0e9e94cd lastgenre: Test new fetch_va_genres helper 2026-08-18 07:01:09 +02:00
Šarūnas Nejus cf385e7614 Merge branch 'master' into fix/skip-empty-metadata-search 2026-08-17 09:35:05 +01:00
Šarūnas Nejus d53af83386 Serialize BPD notifications per connection
- 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.
2026-08-17 05:05:21 +01:00
Šarūnas Nejus 9b16f67af1 Remove bluelet in favor of using asyncio in bpd plugin 2026-08-17 05:05:21 +01:00