feat(subsonic): scan status, artist and album info, lyrics, ratings and users
release / go (push) Failing after 1m15s
release / web (push) Successful in 1m18s
release / govulncheck (push) Successful in 21s
release / integration (push) Successful in 3m57s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / android (push) Canceled after 4m33s
release / Build signed APK (push) Canceled after 4m9s
release / go (push) Failing after 1m15s
release / web (push) Successful in 1m18s
release / govulncheck (push) Successful in 21s
release / integration (push) Successful in 3m57s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / android (push) Canceled after 4m33s
release / Build signed APK (push) Canceled after 4m9s
The last Subsonic methods apps call that Minstrel didn't answer: - getScanStatus counts the songs whose files are present and says whether a scan is running; startScan, for an admin, starts the scan the web app's Rescan starts, and answers "scanning" straight away since the scan records itself a moment later. - getArtistInfo and getArtistInfo2 give the artist's MusicBrainz id and the artists in this library that sound like them, from an artist, album or song id; getAlbumInfo and getAlbumInfo2 give the album's MusicBrainz id. Minstrel fetches no biographies or outside images, so none are sent. - getLyrics (by artist and title) and getLyricsBySongId (OpenSubsonic songLyrics, now declared) read lyrics when asked: a .lrc file beside the song gives timed lyrics, otherwise the song's own lyrics tag. - setRating accepts a rating and keeps none: a like is Minstrel's only rating, and a low rating is never read as a dislike. - getUsers lists every user, for an admin only. ArtistRef no longer fixes its XML element name, so it can appear as similarArtist; every field holding it names the element. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -424,3 +424,23 @@ ORDER BY p.plays DESC, l.likes DESC,
|
||||
al.release_date NULLS LAST, al.sort_title, al.id,
|
||||
t.disc_number NULLS FIRST, t.track_number NULLS FIRST, t.id
|
||||
LIMIT sqlc.arg(lim);
|
||||
|
||||
-- name: ListTracksByArtistAndTitle :many
|
||||
-- Songs matching a title, and an artist when one is given, both regardless
|
||||
-- of case, for the Subsonic getLyrics, which names the song rather than
|
||||
-- giving an id. The artist matches the filing artist or the song's own
|
||||
-- credit ("Low Tide Choir feat. Ruby Calloway").
|
||||
SELECT sqlc.embed(t)
|
||||
FROM tracks t
|
||||
JOIN artists ar ON ar.id = t.artist_id
|
||||
WHERE lower(t.title) = lower(sqlc.arg(title)::text)
|
||||
AND (sqlc.arg(artist_name)::text = ''
|
||||
OR lower(ar.name) = lower(sqlc.arg(artist_name)::text)
|
||||
OR lower(coalesce(t.artist_credit, '')) = lower(sqlc.arg(artist_name)::text))
|
||||
AND t.missing_since IS NULL
|
||||
ORDER BY t.id
|
||||
LIMIT 20;
|
||||
|
||||
-- name: CountPlayableTracks :one
|
||||
-- The songs whose files are present, for the Subsonic getScanStatus count.
|
||||
SELECT count(*) FROM tracks WHERE missing_since IS NULL;
|
||||
|
||||
Reference in New Issue
Block a user