Commit Graph
4469 Commits
Author SHA1 Message Date
Šarūnas Nejus 1f490f4611 Remove special handling for pylast.Album.get_top_tags
This issue has been resolved in 2014.
2026-04-11 02:25:02 +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 c81cfebc7b Handle list fields in rewrite 2026-04-10 10:43:25 +01:00
J0J0 Todos 770682b4cf lastgenre: Dedup fallback handling in _get_genre
and fix fallback types
2026-04-09 22:41:39 +02:00
J0J0 Todos 4ac0aa8a6a lastgenre: Genre ignorelist based on artist
- Prevents wrong last.fm genres based on a per artist (or global) list of regex
  patterns that should be ignored.
  - Genre _ignoring_ happens in two places but mainly:
    - Right after fetching from last.fm
    - and in _resolve_genres (via filter_valid or directly).
  - As a fallback literal string matching can be used instead of
    supplying a regex pattern

New methods:
- `artist_for_filter` to find out which (album)artist attribute is the
  right one in a stage -> ignorelist is artist-based!
- `is_ignored` and `drop_ignored_genres`
- `load_ignorelist` uses confuse mechanisms to load patterns for each
  artist and provide them to the plugin as self.ignore_patterns
2026-04-09 21:53:26 +02:00
Maxr1998 4ac2c90aa6 Add remixer ids and merge recording artist relations query 2026-04-09 10:40:59 +02:00
Maxr1998 90b8c2c4cf Import MusicBrainz composer/lyricist/arranger ids
Updates the MusicBrainz plugin to also import MBIDs for composers/lyricists/arrangers, and also adds them as multi-valued fields.
2026-04-09 10:40:58 +02:00
Mathilde Gilles e49398b2f5 Merge branch 'master' into fetchart-webp 2026-04-08 16:38:02 +02:00
Alok Saboo 17ffd18b77 playcount: batch all store() calls in a single transaction
Each song.store() was opening and committing its own SQLite transaction.
With thousands of unique tracks the WAL grows and each successive write
becomes slower. Wrapping the loop in a single transaction makes writes
O(1) per item instead of progressively slower.
2026-04-08 09:59:41 -04:00
Alok Saboo 8c5c89a844 playcount: log progress every 250 tracks during processing 2026-04-08 09:02:51 -04: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 1ae8f90555 listenbrainz: respect X-RateLimit headers during pagination
Sleeps when the rate-limit window is exhausted so bulk fetches
(many pages of listens) don't get throttled by the server.
2026-04-07 20:47:56 -04:00
Alok Saboo 735695e90a lint 2026-04-07 20:37:15 -04: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 9f99540d96 Ensure artist IDs are strings in deezer 2026-04-07 09:41:39 +01:00
Šarūnas Nejus 597d5c162a discogs: swap style and genre 2026-04-06 16:40:33 +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
Š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 6c6c8aa78b Set lyricists in musicbrainz 2026-04-05 09:15:23 +01:00
Šarūnas Nejus 30843058bf Set remixers in musicbrainz 2026-04-05 09:15:23 +01:00
Šarūnas Nejus 2d797d99ff Handle remixer str value in Info 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 f8766c1fb8 smartplaylist: Display available lists cp-ready
When supplying an invalid playlist name, the list of all playlists is
shell quoted (single quotes) and becomes usable for copy/paste-ing to
the user's shell.
2026-04-04 13:35:22 +01:00
J0J0 Todos 9c315c865a smartplaylist: Tiny refactor use items for dict 2026-04-04 13:35:22 +01:00
J0J0 Todos 9b1761ac44 autobpm: Options force,quite and deprecate overwrite
- Refactor docs to use conf directives
- Rename and deprecate overwrite setting in plugin and docs
- Add quiet CLI option and config
- Add force CLI option and config
2026-04-03 11:28:33 +02:00
Šarūnas Nejus 1036851644 Add listenbrainz_play_count type 2026-03-31 01:36:08 +01: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
Šarūnas Nejus 430c9db4e2 Create a function for processing a single track 2026-03-31 01:36:08 +01:00
Šarūnas Nejus cc9d86fdcf Add types 2026-03-31 01:36:08 +01:00
Šarūnas Nejus 985e0d2bdb Import query classes explicitly 2026-03-31 01:36:08 +01:00
Šarūnas Nejus 2041d2e0e7 Move process_tracks to utils 2026-03-31 01:36:08 +01:00
duriantaco 577f3926e0 Remove dead code identified by static analysis 2026-03-30 14:09:44 +08:00
Šarūnas Nejus b8def07121 autotag: use explicit imports 2026-03-28 12:26:27 +00:00
Šarūnas Nejus 5fad834ad2 Ensure we use Distance to initialise Match objects 2026-03-22 19:23:53 +00:00
Šarūnas Nejus df6f5c5826 import: simplify tagging item 2026-03-22 19:23:52 +00:00
kelamg 47148d5100 Fix formatting 2026-03-22 01:46:50 +00:00
kelamg 7556beb33a Revert docstring 2026-03-22 01:46:50 +00:00
kelamgandŠarūnas Nejus 131930144b Update beetsplug/lyrics.py
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2026-03-22 01:46:50 +00:00
kelamg b3bcb78349 Fix indentation 2026-03-22 01:46:50 +00:00
jochem 55b6fbe77d copied more generic implementation from snejus, and updated the tests and docs accordingly 2026-03-22 01:46:50 +00:00
kelamgandCopilot d4dc46591d Update beetsplug/lyrics.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-22 01:46:50 +00:00