soulsync/webui/static
Broque Thomas cf5da04439 Roll LB Weekly / Top series into single rolling mirrors (Phase 1c.2.1)
ListenBrainz publishes "Weekly Jams for X" / "Weekly Exploration
for X" with a fresh MBID every week, and "Top Discoveries of YYYY
for X" / "Top Missed Recordings of YYYY for X" with a fresh MBID
every year. Auto-mirroring those per-period yielded one mirrored-
playlist row per week/year — useless for Auto-Sync schedules
because the underlying LB playlist never updates, only a brand new
playlist replaces it. The user accumulates 100+ dead Weekly Jams
rows per year if they discover regularly.

This commit collapses each family into a single ROLLING mirror
keyed by a synthetic ``source_playlist_id`` (e.g.
``lb_weekly_jams_Nezreka``). Each new period UPSERTs into the same
row, so the user gets one stable Auto-Sync schedule per series
that automatically picks up the latest period's tracks on every
refresh. Non-series LB playlists (user-created, collaborative,
Last.fm radios for a specific seed) continue to mirror under
their per-playlist MBID as before. Per-period LB playlists are
still visible + usable on the LB Sync tab — only the mirror layer
collapses.

- ``core/playlists/lb_series.py`` (new) — series-detect helper
  with regex patterns + canonical-name + LIKE-pattern template
  for each known LB family. Exposes
  ``detect_series(title)``, ``is_series_synthetic_id(id)``, and
  ``list_series_synthetic_ids()`` so both the JS auto-mirror hook
  and the LB adapter can speak the same language.
- ``GET /api/listenbrainz/series-detect?title=...`` — thin HTTP
  shim around ``detect_series`` so the auto-mirror JS doesn't
  duplicate the regex.
- ``ListenBrainzPlaylistSource.get_playlist`` now recognizes
  synthetic series ids — it queries the LB cache for the newest
  cache row whose title matches the series' LIKE pattern and
  resolves to that row's MBID before fetching tracks. The mirror's
  meta keeps the synthetic id so refreshes always re-resolve to
  the latest period.
- ``_mirrorListenBrainzAfterDiscovery`` (sync-services.js) calls
  the new detect endpoint when discovery completes — if a match
  comes back it swaps the per-period MBID for the synthetic id +
  the canonical name. Existing Last.fm radio routing logic stays
  intact (Last.fm radios aren't a series).
- ``ListenBrainzManager._cleanup_per_period_series_mirrors`` —
  one-shot consolidation sweeper runs in ``_cleanup_old_playlists``
  + deletes any legacy per-period mirror rows so the consolidated
  rolling mirror is the only one left. Idempotent — only matches
  per-period titles ("Weekly Jams for ..., week of ...") and never
  the canonical rolling-mirror titles ("ListenBrainz Weekly
  Jams").
- 11 new tests pin the detector + synthetic-id helpers; 236 total
  across adapter + automation + lb-series suites green.
2026-05-26 15:49:49 -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: add LB / Last.fm / SoulSync Discovery / iTunes labels 2026-05-26 15:33:51 -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 Add Last.fm Radio tab to Sync page (Phase 1c.2) 2026-05-26 15:24:23 -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 Restore lost redownloadLibraryAlbum function (#699) 2026-05-25 23:22:47 -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 Add Last.fm Radio tab to Sync page (Phase 1c.2) 2026-05-26 15:24:23 -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 Roll LB Weekly / Top series into single rolling mirrors (Phase 1c.2.1) 2026-05-26 15:49:49 -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