Releases: linuxserver/docker-beets
Release list
nightly-e1ffd173-ls330
CI Report:
https://ci-tests.linuxserver.io/linuxserver/beets/nightly-e1ffd173-ls330/index.html
LinuxServer Changes:
Full Changelog: nightly-5406ed74-ls329...nightly-e1ffd173-ls330
Remote Changes:
lastgenre: Refactor _get_genre (#6474)
Description
The monolithic _get_genre method was broken down into several private
instance methods and refactored for readability. The contract is kept
and is already well tested (test_get_genre)
-
Core Helpers - were moved from within
_get_genreto a reusable
instance method and acached_property: -
_try_resolve_stage: Handles the canonicalization and logging of
genres for a specific stage. -
fallback: Provides the configured fallback genre. Is used as a last
resort in_try_resolve_existing_genresand when_get_genrecouldn't
find any genre in any stage at all. -
Lookup Stages - some were complex enough to deserve their own
instance method for readability, some stay inline in_get_genre: -
_try_resolve_existing_genres: Manages the initial check for
pre-existing genres and thecleanup_existinglogic whenforceis
disabled.- track stage: stays inline
-
album stage: indentical to track stage, but not worth moving /
deduplication doesn't buy much (see subsequent PR though) -
_fetch_artist_stage: Fetches and resolves artist-level genres,
including multi-valued album artists and "Various Artists" logic. -
_fetch_va_genres: specifically handles the plurality logic for
"Various Artists" albums. -
Fallbacks:
-
_try_resolve_original_fallback: Handles the "keep_existing" logic
that attempts to use/canonicalize originally present genres if no new
ones are found.
Make sure to also look at subsequent PR's:
To Do
-
Documentation - Changelog. (Not required, refactor only)
-
Tests(_get_genre was already well covered and the signature of
the method was kept)
nightly-293ae110-ls331
CI Report:
https://ci-tests.linuxserver.io/linuxserver/beets/nightly-293ae110-ls331/index.html
LinuxServer Changes:
Full Changelog: nightly-e1ffd173-ls330...nightly-293ae110-ls331
Remote Changes:
typing: type utils and modules that are mostly missing annotations (#6925)
Fixes: beetbox/beets#6923
What changed
- This PR is mostly a typing and module-boundary cleanup.
- Code now prefers public package exports like
beets.libraryand
beets.dbcoreinstead of reaching into deeper internal modules. - Shared model typing was renamed from
AnyLibModeltoAlbumOrItem,
which makes intent clearer where code handles either anAlbumor an
Item. - Several typing fixes were added around
import,embedart,
_utils.art, andbeets.util.functemplate.
Architecture impact
- The main architectural shift is toward using stable, package-level
APIs such asbeets.libraryandbeets.dbcoreas the import boundary. dbcore.Resultsnow behaves like aSequence, which lets callers
depend on a simpler, more general interface instead of a concrete
internal result type.beets.util.functemplategot a deeper type pass and some small
internal cleanup, but its role in the system stays the same.
High-level impact
- Improves type safety and IDE support across importer, library, plugin,
and template code. - Reduces coupling to internal module layout, which should make future
refactors safer. - Makes a few core interfaces easier to understand and reuse, especially
around library model collections and import-session callbacks. - Overall, this looks like low-risk maintenance work with small
correctness improvements and no intended feature change.
nightly-b7993d19-ls329
CI Report:
https://ci-tests.linuxserver.io/linuxserver/beets/nightly-b7993d19-ls329/index.html
LinuxServer Changes:
Full Changelog: nightly-1cb3af87-ls328...nightly-b7993d19-ls329
Remote Changes:
fix(discogs): retry malformed search responses #6912
nightly-575f2d92-ls329
CI Report:
https://ci-tests.linuxserver.io/linuxserver/beets/nightly-575f2d92-ls329/index.html
LinuxServer Changes:
No changes
Remote Changes:
bpd plugin: use asyncio directly and remove bluelet (#6903)
So I was looking to add types to beets.util.bluelet and realised that
it is only used by BPD plugin. Instead of investing any time into it,
I scrapped it and used asyncio directly in BPD. I used GitHub search
to check that it is not used outside of our codebase.
-
Replaces the custom coroutine scheduler in
beets.util.blueletwith
Python's built-inasynciofor thebpdplugin. -
In
beetsplug/bpd/__init__.py, the server architecture shifts from
Bluelet generators and event objects to native async I/O:- connection handling now uses
asyncio.start_server - connection flows are rewritten as
async defmethods withawait - notification delivery is handled with background
asynciotasks
- connection handling now uses
-
socket lifecycle and disconnect handling move to
asynciostream
readers/writers -
This removes an internal async framework from the codebase,
consolidatesbpdon a standard runtime model, and makes the networking
layer simpler to reason about and maintain. -
Tests in
test/plugins/test_bpd.pyare updated to mock
asyncio.start_serverinstead of Bluelet internals, matching the new
server entrypoint and preserving coverage around dynamic port
assignment.
nightly-5406ed74-ls329
CI Report:
https://ci-tests.linuxserver.io/linuxserver/beets/nightly-5406ed74-ls329/index.html
LinuxServer Changes:
No changes
Remote Changes:
fix: skip metadata source search when query and filters are empty (#6873)
Description
Fixes #6862.
Items with no artist/title tags produce a search with an empty query and
no filters. The request was still sent to the metadata source API, and
MusicBrainz answers it with 400 Bad Request, logging a traceback once
per affected file. _search_api now returns no candidates instead of
issuing a request that cannot match anything.
To Do
-
Documentation(bugfix, no user-facing option changed) - Changelog.
- Tests. (
test_search_api_skips_request_without_query_and_filters
fails without the fix, passes with it.)
2.13.1-ls347
CI Report:
https://ci-tests.linuxserver.io/linuxserver/beets/2.13.1-ls347/index.html
LinuxServer Changes:
Full Changelog: 2.13.1-ls346...2.13.1-ls347
Remote Changes:
Updating PIP version of beets to 2.13.1
nightly-746cecf2-ls328
CI Report:
https://ci-tests.linuxserver.io/linuxserver/beets/nightly-746cecf2-ls328/index.html
LinuxServer Changes:
No changes
Remote Changes:
Fix KeyError in Deezer track conversion when artist is missing (#6929)
Fixes #4339.
The album half of this issue is already fixed, album_for_id guards the
contributors key. This covers the remaining call site, _get_track,
which still assumes the key exists:
artist, artist_id = self.get_artist(
track_data.get("contributors", [track_data["artist"]])
)Two problems. The default argument to .get is evaluated eagerly, so
track_data["artist"] runs on every call, even when contributors is
present. A track payload carrying contributors but no artist raises
KeyError, despite the code reading as though the fallback only applies
when contributors is missing. And the fallback itself depends on
artist being there, which is the same assumption sampsyo asked the
plugin to stop making.
I mirrored the shape already merged for the album path: use
contributors when present, fall back to artist when that's the one
we have, and leave the artist fields unset when neither key exists.
str(artist_id) now also only runs when there's an id, so a track with
no artist info gets None instead of the string "None". The album path
still calls str(artist_id) unconditionally and can store "None" the
same way, but I left it alone to keep this to the one call site. Happy
to follow up on it.
_get_track had no test coverage, so I added three tests: contributors
without artist, artist without contributors (the old fallback still
behaves the same), and neither key. The first and third fail on master
with KeyError at the .get line, and all three pass with the change.
ruff check and format are clean on both files.
nightly-1cb3af87-ls328
CI Report:
https://ci-tests.linuxserver.io/linuxserver/beets/nightly-1cb3af87-ls328/index.html
LinuxServer Changes:
Full Changelog: nightly-1cb3af87-ls327...nightly-1cb3af87-ls328
Remote Changes:
Add interactive upgrade option for duplicate_actions (#6910)
Follow-up to #6842, based on @Serene-Arc follow-up
comment
.
This makes the upgrade available when duplicate_action: ask, allowing
users to explicitly select it in the interactive duplicate prompt rather
than relying solely on configuration.
- Documentation. (If you've added a new command-line flag, for
example, find the appropriate page underdocs/to describe it.) - Changelog. (Add an entry to
docs/changelog.rstto the bottom of
one of the lists near the top of the document.) - Tests. (Very much encouraged but not strictly required.)
nightly-1cb3af87-ls327
CI Report:
https://ci-tests.linuxserver.io/linuxserver/beets/nightly-1cb3af87-ls327/index.html
LinuxServer Changes:
Full Changelog: nightly-87128df3-ls326...nightly-1cb3af87-ls327
Remote Changes:
Add interactive upgrade option for duplicate_actions (#6910)
Follow-up to #6842, based on @Serene-Arc follow-up
comment
.
This makes the upgrade available when duplicate_action: ask, allowing
users to explicitly select it in the interactive duplicate prompt rather
than relying solely on configuration.
- Documentation. (If you've added a new command-line flag, for
example, find the appropriate page underdocs/to describe it.) - Changelog. (Add an entry to
docs/changelog.rstto the bottom of
one of the lists near the top of the document.) - Tests. (Very much encouraged but not strictly required.)
nightly-dc1709e1-ls326
CI Report:
https://ci-tests.linuxserver.io/linuxserver/beets/nightly-dc1709e1-ls326/index.html
LinuxServer Changes:
No changes
Remote Changes:
tidal: Normalize copyright text into a concise label name (#6907)
Fixes #6796
_parse_label() used to store Tidal's raw copyright info as the label
name.
Adds _normalize_label(), a single-pass helper that:
- removes leading
©/℗/(C)/(P)marker and year - chops corporate-relationship clauses (
, a Division of X,, a BMG Company) - keeps the second half of
under exclusive license to Xstatements - splits territorial rights statements (
X for the United States and Y for the world outside...), keeping the first label - drops bare trailing legal-entity suffixes (
Inc.,LLC,Ltd.,
Co.)
Tests show all functionality in action, but for the curious, here's the
results of running the helper function on a random selection of albums:
https://gist.github.com/NoDancing/90fae264e46023de176a11cb5c065a58