Commit Graph
17 Commits
Author SHA1 Message Date
bvandeusenandClaude Opus 5.5 cd78529ae8 fix(subsonic): answer what the OpenSubsonic spec and Subsonic apps require
- getOpenSubsonicExtensions answers, without credentials, as the spec
  requires of a server that says openSubsonic=true; it lists
  apiKeyAuthentication. An apiKey sent with u is error 43 and an unknown
  apiKey error 44, the extension's codes; a wrong key still counts toward the
  sign-in throttle.
- search3 with an empty query (or two quote marks) matches everything, paged
  in a stable order, so apps that keep a copy of the library (Symfonium) can
  download it. A page of songs reads its albums and artists in two queries,
  not two per song.
- getAlbumList2 serves type=starred and highest (the listener's liked
  albums) and byYear (oldest first, newest first for a backwards range).
- Internet radio, podcasts, bookmarks, shares, chat and now-playing answer
  with an empty list instead of "Method not implemented", so an app shows an
  empty tab rather than an error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 13:14:31 -05:00
bvandeusenandClaude Opus 5.5 f4336cdc23 fix: an album's tracks are credited to their own artists, not all to the album's
release / go (push) Successful in 1m52s
release / web (push) Successful in 1m6s
release / integration (push) Successful in 4m15s
release / govulncheck (push) Successful in 23s
release / android (push) Successful in 4m9s
release / Build signed APK (push) Successful in 4m39s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 23s
release / Verify release artifacts (tag releases only) (push) Skipped
Albums are now filed under their album artist, so a compilation's tracks
and a featured guest's track have a different artist from their album.
The web album page and Subsonic getAlbum named every track after the
album's artist, so a compilation read Various Artists on every row. Both
now name each track by its own artist, read in one query, and fall back
to the album's artist if that lookup fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 10:05:58 -05:00
bvandeusenandClaude Opus 5.5 1a98a23d1f feat(library): albums are filed under their album artist, and empty rows are tidied after a scan
release / go (push) Failing after 1m13s
release / web (push) Successful in 1m16s
release / govulncheck (push) Successful in 20s
release / integration (push) Successful in 4m4s
release / android (push) Successful in 4m48s
release / Build signed APK (push) Successful in 5m13s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Skipped
release / Verify release artifacts (tag releases only) (push) Skipped
The scanner read only the track artist, so a compilation tagged
Various Artists, or an album with one featured-artist track, became one
album per track artist. It now files the album under the album artist
the file names (ALBUMARTIST / TPE2 / aART, with its MusicBrainz id),
and each track keeps its own artist. Tag-read version 9 re-reads the
library so existing tracks move back onto one album.

A scan now ends by removing album rows no track points to, and artists
left with no albums or tracks, telling clients they are gone. Albums
whose tracks are only missing stay for Needs a file, an artist a Songs
like playlist is seeded from stays, and rows made in the last ten
minutes are left alone so a file being added is never caught half way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 19:08:21 -05:00
bvandeusenandClaude Opus 5.5 3f0980a815 docs(db): UpsertArtist matches on mbid only; the comment said name too
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 13:54:45 -05:00
bvandeusenandClaude Opus 5.5 1d4ef1a23f docs: query comments say what each query selects and why, not how it came to be (#6277)
Rewrites the internal/db/queries comments to rule 32 and regenerates
dbq, whose doc comments and embedded SQL carry them. The bugs behind the
tiered mixes, the md5 order seed, the score bands and the round-robin
arms are restated as the constraint each one enforces; counts from one
library and stale cross-references are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 12:31:13 -04:00
bvandeusen 5c386dc73e fix(server,web/m7-cover-sources): forward-fix CI
Three failures from the prior push:

1. internal/api/library.go and 3 other callers of q.GetArtistByID
   broke because T2 modified the query to use an explicit column
   list, making sqlc generate GetArtistByIDRow instead of returning
   dbq.Artist. dbq.Artist already has every column added by
   migration 0018 (artist_thumb_path / artist_fanart_path /
   artist_art_source / artist_art_sources_version), so the explicit
   column list was unnecessary work. Revert the SELECT to SELECT *,
   regenerate sqlc, GetArtistByIDRow disappears, all callers compile
   again.

2. internal/tracks/service_test.go missed the dataDir parameter
   added to NewService in T9. Add "" as the 4th arg to every test
   call site (tests don't exercise the artist-art cleanup path; the
   empty dataDir is fine).

3. integrations.test.ts:356's mock.calls.filter callback had a
   too-narrow type annotation that svelte-check rejected. Relax to
   any[] to match what mock.calls actually is.
2026-05-06 13:22:36 -04:00
bvandeusen 526a78b302 feat(db/m7-cover-sources): SQL queries for provider settings + recheck
- Extends GetAlbumCoverageRollup's with_art FILTER to include
  'theaudiodb' so F's coverage gauge surfaces TheAudioDB-found rows
  as with_art rather than silently undercounting.
- Modifies ListAlbumsMissingCover to take the current sources_version
  as a parameter; eligibility now includes stale-'none' rows.
- Adds SetAlbumCoverWithVersion (atomic write of path + source +
  version stamp) and the parallel SetArtistArtWithVersion +
  ClearArtistArtNone + ListArtistsMissingArt for the artist-art
  enricher.
- New coverart_settings.sql with ListProviderSettings,
  UpsertProviderSettings (boot reconciliation, preserves operator
  values on conflict), UpdateProviderSettings (admin PATCH; tri-
  state api_key handling), GetCurrentSourcesVersion,
  BumpSourcesVersion (RETURNING the new value).
2026-05-06 12:28:18 -04:00
bvandeusen 6c6c4bc1e4 feat(server/m7-379): heal existing artist+album mbid on rescan 2026-05-04 19:03:12 -04:00
bvandeusen 30b0edf97b feat(db): cascade-cleanup queries for M7 #372 track removal
DeleteTrack returns album_id + artist_id so the calling service can
chain the album-empty / artist-empty cascade. DeleteAlbumIfEmpty and
DeleteArtistIfEmpty are no-ops when other rows still reference the
parent — the service treats pgx.ErrNoRows as "not orphaned, skip".
2026-05-02 21:53:33 -04:00
bvandeusenandClaude Sonnet 4.6 b31723c5e2 feat(db): add M6a library-list + artist-tracks queries
Appends ListArtistsAlphaWithCovers, ListAlbumsAlphaWithArtist,
CountAlbums, and ListArtistTracksForUser queries; regenerates sqlc.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 09:03:10 -04:00
bvandeusenandClaude Opus 4.7 277898a49a feat(recommendation): SuggestArtists service for M5c
Add per-user artist-suggestion service ranking out-of-library MBIDs by
signal x similarity. Single-CTE SQL collects user likes (5x weight) and
recency-decayed plays, joins against artist_similarity_unmatched, and
filters in-library candidates plus non-terminal lidarr_requests. The
service resolves top-3 attribution seeds to artist names in a batched
GetArtistsByIDs call so the UI can render "because you liked X" reasons.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 06:20:02 -04:00
bvandeusenandClaude Sonnet 4.6 9ceac5c639 feat(db): add lidarr_config + lidarr_requests schema (migration 0010)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-29 15:10:01 -04:00
bvandeusen cb46b3830f feat(db): add similarity lookup queries (ListActiveContextualLikesForUser, GetCurrentSessionVectorForUser) 2026-04-27 20:36:42 -04:00
bvandeusen 0c7e1b0408 feat(playevents): add Writer with start/end/skipped/synthetic paths
Owns the auto-close-prior step (caps each user at one open row),
spec §6 skip classification rule on play_ended (AND of completion <
0.5 and duration_played < 30s), and skip_events row writes. Synthetic
completed play wires the Subsonic /rest/scrobble?submission=true path
into the same store as native events.
2026-04-26 00:10:02 -04:00
bvandeusen fb49a39492 feat(db): add paged + count queries for library reads 2026-04-21 00:01:15 -04:00
bvandeusen f3a80347c1 sqlc generate for SearchArtists (#295) 2026-04-19 19:03:30 +00:00
bvandeusen 0377c58513 M1/#292: sqlc-generated artists queries 2026-04-19 02:31:58 +00:00