Skip to content

nightly-03b1ab01-ls251

Pre-release
Pre-release

Choose a tag to compare

@LinuxServer-CI LinuxServer-CI released this 20 Mar 19:36
· 22 commits to nightly since this release
74bbc10

CI Report:

https://ci-tests.linuxserver.io/linuxserver/beets/nightly-03b1ab01-ls251/index.html

LinuxServer Changes:

No changes

Remote Changes:

Refactor dist display (#6444)

Refactor: Move display logic into Distance and Match as

properties

Display-related logic previously scattered across display.py and
session.py is consolidated into the data classes themselves.

What changed

Distance gains three properties:

  • penalties — list of cleaned-up penalty key strings
  • color — threshold-based ColorName derived from the distance value
  • string — colorized similarity percentage

Match gains two properties:

  • disambig_string — formatted comma-separated disambiguation string
  • base_disambig_data — override point for subclass-specific field
    pre-processing (e.g. media for AlbumMatch,
    index/track_alt/album for TrackMatch)

display.py / session.py: Standalone functions dist_string,
dist_colorize, penalty_string, disambig_string,
get_album_disambig_fields, get_singleton_disambig_fields are
removed. Call sites now use the properties directly.

A minor fix in show_match_header collects output into a list and uses
textwrap.indent for a single ui.print_ call, replacing the previous
per-line prints.

Impact

  • Display logic lives next to the data it describes — easier to find,
    easier to test
  • display.py and session.py become thinner; no shared utility
    functions to keep in sync