Commit Graph
4193 Commits
Author SHA1 Message Date
Alok Saboo bd6c7378a9 Merge branch 'master' into spotify_batch 2026-04-18 18:32:50 -04:00
Finn e7351987ef docs(library): add changelog entry for clutter 2026-04-17 21:55:11 +01:00
Šarūnas Nejus 348eb9555f Update docs 2026-04-17 09:19:15 +01:00
Šarūnas Nejus 5528a2b7f5 Update docs 2026-04-16 09:02:28 +01:00
Christopher Larson 5bc11ea736 inline: make the album/item available directly
There have been multiple requests, in the past, for the ability to use
plugin fields in inline fields. This has not previously been available.
From what I can tell, it was intentionally left unavailable due to
performance concerns.

The way the item fields are made available to the inline python code
means that all fields are looked up, whether they're actually used by
the code or not. Doing that for all computed fields would be a
performance concern.

I don't believe there's a good way to postpone the field computation, as
python eval and compile requires that globals be a dictionary, not a
mapping. Instead, we can make available the album or item model object
to the code directly, and let the code access the fields it needs via
that object, resulting in postponing the computation of the fields until
they're actually accessed.

This is a simple approach that makes the computed and plugin fields
available to inline python, which allows for more code reuse, as well as
more options for shifting logic out of templates and into python code.
The object is available as `db_obj`.

Examples:

    item_fields:
      test_file_size: db_obj.filesize

    album_fields:
      test_album_path: db_obj.path
      # If the missing plugin is enabled
      test_album_missing: db_obj.missing

Signed-off-by: Christopher Larson <kergoth@gmail.com>
2026-04-15 11:59:19 -07:00
Andrew Yang 85d7a428fb changelog: note mbpseudo compatibility side-effect and reference #6441
The registry lookup fix for #6212 also resolves #6441, where chroma
bypassed mbpseudo's plugin swap by holding a second MusicBrainzPlugin
instance outside the plugin registry.
2026-04-14 19:07:53 -04:00
Andrew Yang e446554211 chroma: address review feedback
- Use @cached_property named `mb` (per snejus/semohr) instead of a
  helper method, reducing the diff relative to the original code
- Move changelog entry to the Unreleased section (per snejus)
- Refactor tests to use PluginMixin from beets.test.helper (per
  semohr) instead of manually managing beets.plugins._instances
2026-04-15 00:03:23 +01:00
Andrew Yang 692ef4a923 chroma: gate candidates on the musicbrainz plugin being enabled
The chroma plugin uses Acoustid fingerprinting, which returns MusicBrainz
release and recording IDs. It then unconditionally resolved those IDs
through a privately instantiated MusicBrainzPlugin, so MusicBrainz-sourced
candidates appeared during tagging even when the user had not enabled the
musicbrainz plugin.

Replace the direct MusicBrainzPlugin() instantiation with a lookup through
the metadata-source registry via get_metadata_source("musicbrainz"). When
that returns None, short-circuit both candidates() and item_candidates()
to return empty. This also fixes an incidental issue where the private
instance bypassed any plugin that swaps the musicbrainz plugin at runtime
(e.g. mbpseudo).

Acoustid fingerprinting itself is unaffected — acoustid_id and
acoustid_fingerprint item fields are still populated as before.

Fixes #6212
2026-04-15 00:03:23 +01:00
Šarūnas Nejus 148e0ac81b Merge branch 'master' into fix-mpeglayer3-wav-import 2026-04-14 23:45:47 +01:00
Elaine Chen e7247b54aa Moved remux function to util.extension, fixed exception handling, added docs 2026-04-14 15:53:43 -04:00
Elaine Chen 4478ece59c Fix docs formatting 2026-04-14 15:01:46 -04:00
Sebastian Mohr 396f29262e Add a link to the aisauce plugin. 2026-04-14 20:20:45 +02:00
Elaine Chen 480e67c7bf Replaced ffmpeg with Python extraction, add docs, and second test 2026-04-14 12:39:08 -04:00
Alok Saboo cd06e620ce Resolve merge conflict in changelog.rst 2026-04-13 20:35:16 -04:00
Alok Saboo 72d76f60a1 Merge upstream/master into spotify_batch branch 2026-04-13 20:25:32 -04:00
Šarūnas Nejus aab4dffb48 Add a note to the changelog 2026-04-12 16:21:30 +01:00
Elaine Chen 8ce58922ad Move changelog entry to Unreleased section 2026-04-11 18:13:19 -04:00
Elaine Chen 8557f5daf1 Move changelog entry to top of Bug fixes section 2026-04-11 18:09:30 -04:00
elainec2024 ec26ab806c Merge branch 'master' into fix-mpeglayer3-wav-import 2026-04-11 18:06:05 -04:00
Elaine Chen 8ea269362c Remux WAVE_FORMAT_MPEGLAYER3 WAV files to MP3 during import
WAV files containing an MP3 stream (WAVE_FORMAT_MPEGLAYER3, wFormatTag=0x0055)
were silently imported with incorrect metadata and format reported as WAVE instead of MP3.

When a WAV file fails to open due to FileTypeError, check if it is a
MPEGLAYER3 WAV. If it is, use ffmpeg to remux it to a proper MP3 file,
removing the WAV container. The original WAV file is deleted after successful
remuxing.

Adds a regression test and test fixture.

Fixes #6455
2026-04-11 17:36:13 -04:00
Aidan Epstein c6409d2e58 Retry listenbrainz requests for temporary failures 2026-04-11 08:14:27 -07:00
Šarūnas Nejus 8673ea9a4d Update docs 2026-04-11 13:02:42 +01:00
Šarūnas Nejus 31bf020988 Add changelog note 2026-04-11 13:01:41 +01:00
snejus 018dba08cd Increment version to 2.9.0 2026-04-11 11:55:59 +00:00
Sebastian Mohr 2a3bf6064c Added changelog entry. 2026-04-11 11:18:43 +01:00
Šarūnas Nejus 2ff7887725 Apply all matching rules to a field 2026-04-10 14:54:57 +01:00
Šarūnas Nejus e21f56fc60 Update docs 2026-04-10 10:43:25 +01:00
J0J0 Todos 570d1d3bdc Changelog for #6449 genre ignorelist 2026-04-09 22:42:38 +02:00
J0J0 Todos fc367165f9 lastgenre: Docs for genre ignorelist feature 2026-04-09 22:42:38 +02:00
Maxr1998 633703832d Address further review feedback 2026-04-09 16:18:40 +02:00
Maxr1998 08af801c30 Address review feedback 2026-04-09 10:46:40 +02:00
Maxr1998 9bc865f6f3 Add changelog 2026-04-09 10:40:59 +02:00
Mathilde Gilles e49398b2f5 Merge branch 'master' into fetchart-webp 2026-04-08 16:38:02 +02:00
Alok Saboo 193f86185e listenbrainz: update changelog to clarify MB lookup removal 2026-04-08 10:05:02 -04:00
ShimmerGlass 3194666610 feat(fetchart): add support for webp files 2026-04-08 12:39:58 +02:00
Alok Saboo 15401053c1 Merge remote-tracking branch 'upstream/master' into spotify_batch 2026-04-07 21:03:02 -04:00
Alok Saboo 5ac984223d lint 2026-04-07 20:37:14 -04:00
Alok Saboo 6c5519c775 add changelog 2026-04-07 20:36:34 -04:00
ShimmerGlass 142e946588 fix(fetchart): sources definition
The fetchart plugin would silently drop unknown sources defined in
config, leading to hard to debug problems.
The plugin now errors when an unknown source is configured, or when no
sources are configured.
In addition, a single string is now a valid value for `sources` to
either enable all sources with an `*` or a single source.

Fixes: #6336
2026-04-07 18:55:53 +02:00
Šarūnas Nejus 724891fa9d Update docs 2026-04-07 10:43:00 +01:00
Šarūnas Nejus 9f99540d96 Ensure artist IDs are strings in deezer 2026-04-07 09:41:39 +01:00
Šarūnas Nejus 86509a0ec3 Update docs 2026-04-06 20:30:13 +01:00
aaronk6 4492544539 fix(deezer): use artist ID to detect Various Artists releases 2026-04-05 22:16:30 +01:00
ShimmerGlass f1a95bed57 fix(replaygain): clear conflicting tags on write
There are two ways to store replay gain data on music files: RG_ and
R128_ (opus). before this change the beets replaygain plugin simply set
the right tag based on file format and r128 config value.
there are case, however, when for example an opus files comes with RG_
tags already set. After beet write its replaingain tags the files will
contain both RG_ and R128_ tags with possibly conflicting values.
For example, Navidrome currently always prefers RG_ tags over R128_
regardless of format, leading tags set by beets to be ignored.
https://github.com/navidrome/navidrome/blob/23f3556371321faf199866989b906f2ef06a8034/model/metadata/map_mediafile.go#L111

As per RFC 7845: Ogg Encapsulation for the Opus Audio Codec
https://datatracker.ietf.org/doc/html/rfc7845#section-5.2.1
> To avoid confusion with multiple normalization schemes, an Opus
> comment header SHOULD NOT contain any of the REPLAYGAIN_TRACK_GAIN,
> REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, or
> REPLAYGAIN_ALBUM_PEAK tags, unless they are only to be used in some
> context where there is guaranteed to be no such confusion.

Since the replaygain plugin does not support setting both RG_ and R128_
at the same time it doesn't make much sense to keep conflicting tags
when writing. These tags are also easy to recalculate if needed either
with beets itself (with a different configuration), or by running
replaygain commands by hand. no valuable information is lost.

This change makes it so the replagain plugin now deletes conflicting
tags when processing library items:
* RG_ are deleted if we set R128_
* R128_ are deleted if we set RG_
2026-04-05 15:19:39 +02:00
J0J0 Todos 16ad66600b Consistent wording of multi-valued in changelog 2026-04-05 09:15:23 +01:00
Šarūnas Nejus a867b961cc Migrate arranger -> arrangers 2026-04-05 09:15:23 +01:00
Šarūnas Nejus 85eaa447f0 Migrate composer -> composers 2026-04-05 09:15:23 +01:00
Šarūnas Nejus a8f14ced42 Update docs 2026-04-05 09:15:23 +01:00
Šarūnas Nejus f2e282a327 Update docs 2026-04-05 09:15:23 +01:00
Alok Saboo a65ba3859f Merge remote-tracking branch 'upstream/master' into spotify_batch 2026-04-04 18:13:40 -04:00