Fixes a bug where existing tags were set to None, if they weren't whitelisted, but an whitelisted canonicalized parent existed up the tree.
In all other cases, the original genres are canonicalized and considered for the final genre, except in the keep_existing logic branch.
This PR fixes the issue and results in the expected behavior for this combination of options.
For the bug to trigger several conditions had to be met:
- Canonicalization is enabled and a whitelist is specified.
- `force` and `keep_existing` are set. Meaning, that Lastfm is queried for a genre, but the existing genres are still left around when none are found online.
- A release with a non-whitelisted genre exists, but that genre has a whitelisted genre parent up the tree.
- That very release has no genre on lastfm.
This is rather convoluted, but stay with me :D
What would happen is the following:
- `keep_genres` is set to the existing genres, as `force` and `keep_existing` is set.
- Genres for `track`/`album`/`artist` aren't found for this release, as they don't exist in lastfm.
- Then the `keep_existing` logic is entered.
- The old logic only checks if the existing genres have an **exact** match for the whitelist. In contrast to all other code branches, we don't do the `_try_resolve_stage` in case there's no direct match, resulting in no match.
- We continue to the fallback logic, which returns the fallback (`None` in my case)
This patch results in one last try to resolve the existing genres when `keep_existing` is set, which includes canonicalization (if enabled).
mp3rgain is a modern Rust rewrite of mp3gain that provides:
- CLI-compatible drop-in replacement for mp3gain
- Support for both MP3 and AAC/M4A formats (like aacgain)
- Fixes for CVE-2021-34085 (Critical, CVSS 9.8) and CVE-2019-18359 (Medium)
- Memory-safe implementation in Rust
- Works on modern systems (Windows 11, macOS Apple Silicon)
Changes:
- Add mp3rgain to the command search list (prioritized first)
- Update format_supported() with more robust command name detection
using os.path.basename() and startswith() instead of substring matching
- Update documentation with installation instructions
See: https://github.com/M-Igashi/mp3rgain
Looks like our hard-coded API credentials expired. This PR removes
expired credentials and makes it clear to the user that they must
provide their credentials.
Fixes#6270
* master: (37 commits)
importsource: Test skip, Test reimport-skip
Fix initial importsource plugin #4748 changelog
importsource: fix potential prevent_suggest_removal crash
Ensure that inc are joined with a plus
Add retries for connection errors
Add Usage block to RequestHandler
Refactor HTTP request handling with RequestHandler base class
Make musicbrainzngs dependency optional and requests required
musicbrainz: remove error handling
musicbrainz: access the custom server directly, if configured
musicbrainz: browse directly
musicbrainz: search directly
musicbrainz: lookup recordings directly
musicbrainz: lookup release directly
Move pseudo release lookup under the plugin
Add missing blame ignore revs from musicbrainz plugin
Define MusicBrainzAPI class with rate limiting
Move TimeoutSession under beetsplug._utils
expand tests to include check for track artists
remove changes for lastgenre as there was an existing PR for that work
...