soulsync/webui/static
Broque Thomas 1d6ced286b Discogs: strip artist disambiguation suffixes at every name surface (#634)
Discogs uses two disambiguation conventions for duplicate artist names:
- legacy `(N)` numeric suffix: "Bullet (2)", "Madonna (3)"
- newer `*` asterisk suffix: "John Smith*", "Foo*"

Both were leaking through to the UI on artist search and album search,
and worse — through the import path into folder names on disk
(reported: importing yielded folders literally named `Foo*`).

The pre-existing cleanup only handled `(N)` and only at ONE site —
`get_user_collection` (line 469) and one path inside
`extract_track_from_release` (line 448 — `re.sub(r'\s*\(\d+\)$', '',
artist_name)`). Every other surface (artist search, album search,
album-track lookups, get_artist_albums feature matching) returned the
raw Discogs string.

Centralized into `_clean_discogs_artist_name(name)` at module top,
with regex covering both suffixes including repeated forms (`Baz**`,
`Foo (3)*`). Applied at six sites:

- `Artist.from_discogs_artist` (artist search)
- `Album.from_discogs_release` (album search — three fallbacks: array,
  string, title-split)
- `Track.from_discogs_track` (track lookup — track-level + release-level
  fallback)
- `extract_track_from_release` (replaces the inline `(N)`-only re.sub)
- `get_user_collection` (existing site, now also strips `*`)
- `get_artist_albums` (artist_name used for primary-vs-feature matching;
  cleaning prevents `Beyoncé*` from failing equality vs `Beyoncé`)
- `get_album` (artists_list + per-track artists in the tracklist projection)

Tests:
- New `test_clean_discogs_artist_name` parametrized over 14 cases
  covering `(N)`, `*`, repeated `**`, combined `(N) *`, whitespace
  handling, empty/None defensive returns.
- New `test_get_user_collection_strips_discogs_asterisk_disambiguation`
  pinning the asterisk path end-to-end through the collection import
  flow (sibling to the existing `(N)` test).
- Existing 37 discogs tests still pass.

Out of scope (separate issue): the same #634 report flagged track-count
and year fields rendering as 0 / empty in Discogs album search. Both
are inherent to Discogs `/database/search` response shape — search
results don't carry `tracklist` (only release detail does) and `year`
is often `0` in search payloads. Fixing requires lazy-fetching release
detail per row, which hits the 25 req/min unauth limit hard. Not
bundled here.
2026-05-27 09:05:47 -07:00
..
docs update docs page 2026-03-13 08:35:28 -07:00
vendor Add WebSocket real-time updates with automatic HTTP polling fallback 2026-03-03 18:26:29 -08:00
amazon.svg Wire Amazon Music enrichment worker into dashboard UI 2026-05-16 17:43:38 -07:00
api-monitor.js Persist completed downloads in downloads view 2026-05-24 10:02:00 -07:00
artists.png add static images 2026-03-09 17:35:46 -07:00
auto-sync.js Auto-Sync manager: exclude Last.fm Radio mirrors from the schedule board 2026-05-26 15:56:24 -07:00
automation.png add static images 2026-03-09 17:35:46 -07:00
beatport-ui.js Add "All Libraries (combined)" mode to PlexClient 2026-05-06 15:39:19 -07:00
core.js Persist completed downloads in downloads view 2026-05-24 10:02:00 -07:00
dashboard.png add static images 2026-03-09 17:35:46 -07:00
discover-section-controller.js Discover controller — Cin pre-review polish 2026-05-07 20:35:10 -07:00
discover.js Fix missing album placeholder asset path 2026-05-22 08:34:42 -07:00
discover.png add static images 2026-03-09 17:35:46 -07:00
docs-images-needed.md Service Badges, Page Headers, Docs Page, and Bug Fixe 2026-03-10 14:47:11 -07:00
docs.js Clean up stale Artists-page references in helper.js + docs.js 2026-04-22 20:29:32 -07:00
downloads.js Add Qobuz playlist sync to Sync page (#677) 2026-05-23 23:27:36 -07:00
enrichment.js Wire Amazon Music enrichment worker into dashboard UI 2026-05-16 17:43:38 -07:00
explorer.png Create explorer.png 2026-03-30 17:23:31 -07:00
favicon.png enlarge favicon 2026-02-13 16:11:32 -08:00
help.png Add media server setup, processing settings, text import, automation history, and streaming details 2026-03-10 15:35:18 -07:00
helper.js Discogs: strip artist disambiguation suffixes at every name surface (#634) 2026-05-27 09:05:47 -07:00
hydrabase.png Add Hydrabase dev UI and WebSocket support 2026-02-21 00:32:04 -08:00
import.png add static images 2026-03-09 17:35:46 -07:00
init.js chore(webui): remove legacy import feature js / css code 2026-05-24 21:17:19 +03:00
library.js Branch cleanup: lift manual-match helpers, fix length-pref ordering, profile-scope view toggle 2026-05-27 07:43:21 -07:00
library.png add static images 2026-03-09 17:35:46 -07:00
manifest.json Service worker for cover art + PWA manifest 2026-04-26 22:17:52 -07:00
media-player.js Improve radio mode UI and behavior 2026-05-24 11:02:19 -07:00
mobile.css style(import): add separate styles for mobile 2026-05-24 21:17:21 +03:00
pages-extra.js Persist completed downloads in downloads view 2026-05-24 10:02:00 -07:00
particles.js Add particle background toggle & optimize accent color caching 2026-03-13 16:05:22 -07:00
placeholder-album.png Add missing placeholder-album.png to stop 404 spam in console 2026-03-23 18:05:11 -07:00
pwa-icon-192.png Service worker for cover art + PWA manifest 2026-04-26 22:17:52 -07:00
pwa-icon-512.png Service worker for cover art + PWA manifest 2026-04-26 22:17:52 -07:00
search.js fix(webui): preserve import tab refresh URLs 2026-05-24 21:17:20 +03:00
search.png add static images 2026-03-09 17:35:46 -07:00
settings.js Clarify hybrid source album behavior 2026-05-23 15:15:28 -07:00
settings.png add static images 2026-03-09 17:35:46 -07:00
setup-wizard.css Add informative help text and tips to every setup wizard step 2026-04-11 23:26:01 -07:00
setup-wizard.js Rebrand folder terminology: Download→Input, Transfer→Output, Staging→Import 2026-04-18 17:35:20 -07:00
shared-helpers.js refactor(webui): finish stats standalone handling in react 2026-05-23 23:01:56 +03:00
shell-bridge.js refactor(webui): finish stats standalone handling in react 2026-05-23 23:01:56 +03:00
stats-automations.js Merge pull request #594 from Skowll/telegram_thread_id 2026-05-26 11:47:08 -07:00
style.css Auto-Sync sidebar: improve playlist card readability 2026-05-26 20:12:15 -07:00
sw.js Service worker for cover art + PWA manifest 2026-04-26 22:17:52 -07:00
sync-lastfm.js Add Last.fm Radio tab to Sync page (Phase 1c.2) 2026-05-26 15:24:23 -07:00
sync-listenbrainz.js Add Last.fm Radio tab to Sync page (Phase 1c.2) 2026-05-26 15:24:23 -07:00
sync-services.js Add SoulSync Discovery tab to Sync page (Phase 1c.3) 2026-05-26 19:46:03 -07:00
sync-soulsync-discovery.js SoulSync Discovery tab: open mirror detail modal after refresh 2026-05-26 20:02:50 -07:00
sync-spotify.js feat(media-player): playable tracks across modals + lyrics + cleanups 2026-05-22 21:19:50 -07:00
sync.png add static images 2026-03-09 17:35:46 -07:00
trans.png Add SoulID worker with API-based debut year disambiguation 2026-03-21 10:21:06 -07:00
trans2.png Create trans2.png 2026-03-21 10:23:36 -07:00
whisoul.png Add library repair worker and UI 2026-02-21 15:00:23 -08:00
wishlist-tools.js Merge pull request #594 from Skowll/telegram_thread_id 2026-05-26 11:47:08 -07:00
worker-orbs.js Wire Amazon Music enrichment worker into dashboard UI 2026-05-16 17:43:38 -07:00