Fix all artist names stored as lowercase in database

A @staticmethod _normalize_artist_name (for liked artists dedup)
shadowed the instance method of the same name (for artist import).
The static version lowercased everything, so every artist name was
stored lowercase during database scans. Renamed the static method
to _normalize_artist_name_for_dedup. Existing lowercase names will
be corrected automatically on the next database scan.
This commit is contained in:
Broque Thomas 2026-04-08 12:49:38 -07:00
parent ec87cb6d0e
commit 195484441e

View file

@ -8797,7 +8797,7 @@ class MusicDatabase:
# ==================== Liked Artists Pool Methods ====================
@staticmethod
def _normalize_artist_name(name: str) -> str:
def _normalize_artist_name_for_dedup(name: str) -> str:
"""Normalize artist name for deduplication. Lowercases, strips diacritics,
removes 'the ' prefix, collapses whitespace."""
import unicodedata
@ -8836,7 +8836,7 @@ class MusicDatabase:
# Reject known placeholder images
if self._is_placeholder_image(image_url):
image_url = None
normalized = self._normalize_artist_name(artist_name)
normalized = self._normalize_artist_name_for_dedup(artist_name)
if not normalized:
return False