Commit Graph

3302 Commits

Author SHA1 Message Date
Sebastian Mohr
7df2789cfd Fixed metadatasource tests. 2026-04-11 11:42:30 +02:00
Sebastian Mohr
8637f138df Fixed some typing issues with rebase 2026-04-11 11:20:31 +02:00
Sebastian Mohr
c029f1f363 test_logging:LoggingLevelTest now uses pytest PluginMixin 2026-04-11 11:05:03 +02:00
Sebastian Mohr
3f9ec711e1 Set the class module during plugin registration to not trigger the plugin
load dedup.
2026-04-11 11:05:03 +02:00
Sebastian Mohr
25255816fa Fixed issue with mpdstats test and removed unregister_all function
as it introduces issues.
2026-04-11 11:05:03 +02:00
Sebastian Mohr
d62bd277fc Renamed PluginTestCasePytest to PluginTest 2026-04-11 11:04:49 +02:00
Sebastian Mohr
04b2266ad7 Refactored most plugin tests to use pytest instead of unitest.
Also simplified test wherever possible.
2026-04-11 11:04:38 +02:00
J0J0 Todos
e0b757ceb3 Remove unused import in lastgenre tests 2026-04-11 02:39:50 +02:00
Šarūnas Nejus
19353999ae Simplify fetch_genre 2026-04-11 02:25:02 +02:00
Šarūnas Nejus
f66cc3fb57 lastgenre: use a single fetch method
Delegate the responsibility of getting relevant model fields to the
client by declaring the genre fetching spec on the class.
2026-04-11 02:25:02 +02:00
Šarūnas Nejus
2ff7887725 Apply all matching rules to a field 2026-04-10 14:54:57 +01:00
Šarūnas Nejus
c9064012a1 Show that only the first pattern applied currently 2026-04-10 11:52:15 +01:00
Šarūnas Nejus
c81cfebc7b Handle list fields in rewrite 2026-04-10 10:43:25 +01:00
Šarūnas Nejus
bfd20b2abc Add a failing test for list fields 2026-04-10 10:37:36 +01:00
Šarūnas Nejus
9b6b7d3cd6 Add tests for rewrite plugin 2026-04-10 09:34:55 +01:00
J0J0 Todos
43e13dcfd3 lastgenre: Tests for genre ignorelist feature 2026-04-09 21:50:29 +02:00
Maxr1998
ee1a1632a0 Fix tests 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
cb8d3abe8d listenbrainz: add --max option and drop per-listen MB lookups
- Add `beet lbimport --max=N` to cap the number of listens fetched.
- Remove the MusicBrainz API lookup from get_tracks_from_listens.
  Previously, every listen without a recording_mbid in the API mapping
  triggered a live MB search, causing the import to hang for hours on
  large listen histories. Matching falls back to artist/title/album
  which is already handled by update_play_counts.
2026-04-08 08:34:48 -04:00
ShimmerGlass
3194666610 feat(fetchart): add support for webp files 2026-04-08 12:39:58 +02:00
Alok Saboo
af8d716b82 address reviewer comments 2026-04-07 20:37:15 -04:00
Alok Saboo
0fe518245e lint 2026-04-07 20:36:36 -04:00
Alok Saboo
9e02536bee ListenBrainz: aggregate play counts and improve pagination logic 2026-04-07 20:31:14 -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
02be9b277d Handle legacy fields in modify and queries 2026-04-07 10:42:56 +01:00
Šarūnas Nejus
597d5c162a discogs: swap style and genre 2026-04-06 16:40:33 +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.
23f3556371/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
Š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
eddba584f1 Handle single lyricist in TrackInfo 2026-04-05 09:15:23 +01:00
Šarūnas Nejus
f06cc4246e Add migration for lyricists list field 2026-04-05 09:15:23 +01:00
Šarūnas Nejus
c8360e5b11 Use __setattr__ to handle setting legacy string fields 2026-04-05 09:15:23 +01:00
Šarūnas Nejus
46a6a4a146 Test both genre/s and remixer/s handling in TrackInfo/AlbumInfo 2026-04-05 09:15:23 +01:00
Šarūnas Nejus
db4298d14d Generalise getting list value from list value in Info 2026-04-05 09:15:23 +01:00
Šarūnas Nejus
ad5c77f5cd Migrate remixer to remixers 2026-04-05 09:15:23 +01:00
ShimmerGlass
1242f42b37 feat(chroma): add chromasearch command
This command lets user search the database by chromaprint fingerprint
similarity.
Database item fingerprints are computed on the fly if needed.
This is useful for example to check if an unknown / untagged audio file
already exists in the database.
2026-04-04 15:03:42 +02:00
J0J0 Todos
b32f220523 smartplaylist: Test new shell quoting behavior 2026-04-04 13:35:22 +01:00
Šarūnas Nejus
2002e838de Merge branch 'master' into master 2026-04-03 22:53:47 +01:00
jazib-ahmad
0171718b5a Fixed formatting 2026-04-03 17:40:54 -04:00
jazib-ahmad
67aed53b37 Shortened test variable names to fix line length 2026-04-03 17:32:35 -04:00
jazib-ahmad
a8510620cf Fixed lowercase comparison in join detection, updated ApplyTest with multiple artist sort data 2026-04-03 17:21:12 -04:00
J0J0 Todos
63b23e4a5c autobpm: Test force, quiet, overwrite fallback 2026-04-03 11:28:37 +02:00
jazib-ahmad
61a87fcdbf Added comments to ensure_first_value, stored lowercase value in variable, improved join detection with all() and len check, simplified test case, restored changelog sections 2026-04-02 23:28:56 -04:00
jazib-ahmad
acd209ba67 Merge branch 'master' into master 2026-04-02 17:49:33 -04:00
jazib-ahmad
9c13fee79e Fix albumartists_sort prepending joined artist credit (#6470) 2026-04-02 17:20:13 -04:00
gaotue
f9874d57be Merge branch 'master' into master 2026-04-02 17:28:47 +02:00
Šarūnas Nejus
db7c753ebe Update listenbrainz accordingly 2026-03-31 01:36:08 +01:00
Šarūnas Nejus
d7c9e268f9 Refactor process_tracks and add tests 2026-03-31 01:36:08 +01:00
laogao216
652733a768 format 2026-03-29 17:43:41 +02:00
laogao216
2285671223 refactoring and other improvements 2026-03-29 17:41:28 +02:00