createPlaylist makes a playlist, or with playlistId replaces its songs;
updatePlaylist renames it, sets its comment and visibility, removes songs
by the index the app was shown and adds songs; deletePlaylist deletes it.
A song index counts only the entries getPlaylist lists, so a hidden
entry ahead of it doesn't shift which song goes.
The playlist service gains ReplaceTracks and RemovePositions; the owner
and system-mix checks that each change repeated are one function.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both lookups ran with no way to stop them. Admin › Metadata sources now
has an "Other lookups" group with a switch each, both on by default
(lookup_settings, migration 0111). Off, the similarity worker asks
ListenBrainz nothing and still links what it already fetched; the
duplicate resolver gets ErrLookupOff and decides from the track lists it
already has. The setting is backed up, and docs/security.md names the
switches. docs/security.md also says every account but the first needs an
invite.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sonos, UPnP and public-address tests used addresses from a real home
network. They now use 198.51.100.x (RFC 5737), keeping the last number.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README offered open registration, and the register handler still had
a branch for a registration_settings mode nothing could set. Now every
account after the first needs an invite; the first still needs the setup
token from the log. Migration 0110 drops registration_settings and its
queries, and backups no longer carry it (an older backup that holds it
restores without it). The web form asks for the invite token as required.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fixture's C has a missing file, and search3 now lists only what the
listener can play, as getAlbumList2 already did with the same fixture.
The paging test expected the old behaviour.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing reached any of it:
- MusicBrainz search (artists, albums, songs), artist lookups and the
query escaping they used. The release-group lookups the duplicate
resolver uses stay.
- Release-group covers, and artist-level tags for artists not in the
library.
- Nine named queries with no caller (CountTracksByArtist went with the
previous commit), two of them describing request-progress reporting.
The MusicBrainz client's retry and not-found tests now drive the
release-group lookup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A restart mid-scan left its scan_runs row unfinished, and saving library
folders refused ("A library scan is running") until a later scan reaped it,
up to 12 hours on. Startup now closes such rows with the reason before the
boot scan, as backups already do. Saving folders and the duplicate sweep
share one check that treats a run past StuckScanThreshold as dead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
getAlbum, getMusicDirectory and search2/3 ignored the listener's quarantine
and listed missing files, which an app then failed to stream; song counts
counted both. They now pass the listener and leave out missing files, as
the mixes already did. Subsonic can't mark a song unplayable, so leaving it
out is how the native apps' greyed-out row comes across.
Song search filters in SQL (SearchPlayableTracks), so a library sync paging
through search3 never gets a short page that reads as the end. Album song
counts come from one query for the whole page (CountPlayableTracksByAlbums)
instead of one per album.
tracks.sql also drops CountTracksByArtist, which nothing called; see the
next commit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Queued offline writes, Home, history, the quarantine list, notifications and
the resume queue carry no user id, and nothing cleared them when someone
signed out. The next person to sign in on a shared phone inherited them,
and the queued likes and plays were sent under their session.
The cached data now has an owner (Room v15, auth_session.cacheOwnerUserId).
When a different account signs in, AccountCache clears those tables in one
transaction and empties the player before adopting it. The replayer only
sends queued writes while their owner is signed in. The same person signing
back in, after a sign-out or an expired session, keeps everything. Signing
out from Settings sends what is still queued first, for up to five seconds.
An install updated from before this adopts whoever is signed in, keeping
their data.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Subsonic app reports "now playing" when a song starts and "played" when
it ends. The played report used to close the now-playing row as a play of
its own and write a second one, so every listen counted twice, and as a
skip when the app sent the song's start time. The report now completes the
app's own row for that song. A late report for an earlier song no longer
cuts short the song playing now.
Subsonic's scrobble doesn't say where a song was played from, so Minstrel
remembers, per user and app, the daily mix the app last opened (for six
hours). A play of a song in that mix is credited to it: the mix's metrics
count it and its rotation moves on.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Minstrel fetched artist pictures but showed them only to Subsonic apps.
GET /api/artists/{id}/image now serves the picture, or else the artist's
newest album cover, the same image Subsonic apps get. Artist listings
point at it when the artist has a picture and keep the album cover
otherwise; the artist page points at it whenever the artist has albums,
and the web artist page shows it beside the name.
Android shows the picture for cached artists that have one, and the
album cover for the rest.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
getCoverArt now answers an artist's id: the artist picture Minstrel
fetched, when its file is there, or else the cover of the artist's most
recently added album that has one, which is what Minstrel's own artist
cards show. Every artist entry carries its id as coverArt, so apps ask.
The lookup is coverart.ResolveArtistPath, beside the album one, and looks
through at most ten of an artist's albums for a cover.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
getTopSongs ranks the named artist's songs by how often they were played
through on this server, then by likes, then in album order, so an artist
nobody has played yet still has songs to offer. Missing files and the
listener's quarantined songs are left out.
savePlayQueue keeps one queue per listener: the songs in order, the one
playing, how far into it, and the app that saved it. getPlayQueue gives it
back to that listener only; a song no longer in the library drops out.
Saving no songs clears it. The queue lives in a new play_queues table,
which backups carry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Subsonic apps can now list genres and play one (getGenres,
getSongsByGenre), and apps that browse by folder, such as DSub, can open
an artist to its albums and an album to its songs (getMusicDirectory),
with the album lists and search they use in that mode (getAlbumList,
search2).
Genres are split and counted as the web's genre index counts them, now
with an album count beside the song count. A genre's songs leave out the
listener's quarantined ones and missing files. Folders are Minstrel's
artists and albums, under the same ids as the tag-based calls.
getAlbumList2 and search3 now share their selection with the folder
versions, so the two modes list and find the same things.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Subsonic apps now get what Minstrel picks, not only what it holds:
- getPlaylists lists the listener's daily mixes first, then their own
playlists, then other people's public ones; getPlaylist returns the
playable songs in order, as <entry> elements in XML.
- getRandomSongs answers with the weighted shuffle (likes up, skips down,
the last hour's plays out), narrowed by genre and release year.
- getSimilarSongs and getSimilarSongs2 answer with Minstrel's radio, seeded
from a song, or from a random song of an album or artist.
Radio's selection moves out of the /api/radio handler into
recommendation.Picker, built by recsettings.Service.Picker, so the web and
Android apps and the Subsonic apps pick through one piece of code and one
tuning. SongRef loses its XMLName so the field holding it names the element.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Test data and example comments named real artists, records and songs, and
carried real MusicBrainz ids. One mapping swaps them for invented ones
throughout (Fields of Ontario, Plastic Apes, Marlo Davies, ...), keeping
what each case tests: sort order, index letter, escaping, title keys,
artist-prefix stripping. A test username is no longer the operator's name.
The cover-art and Last.fm connection checks still query real releases;
they reach live services and need something that exists there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 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>
A track tagged "Low Tide Choir feat. Ruby Calloway" was filed under an
artist of that whole name, with its own page, its own place in the artist
list and its own "Songs like" mix. It is now filed under Low Tide Choir and
keeps "Low Tide Choir feat. Ruby Calloway" as its credit, shown wherever the
track is listed, sent to Subsonic apps and scrobbled.
A collaboration is split only when the file lists its artists one by one
(Picard's ARTISTS tag, read from FLAC, Ogg, Opus, MP3 and M4A). "A & B" on
its own may be one band, so it stays whole. A Vorbis file's artist id is now
its first, not the guest's.
Tag-read version 10 re-reads the library once; the scan's tidy-up removes
the credit-named artists it leaves empty.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
A first docker compose up starts Minstrel and a new Postgres together, and
the database spends several seconds initialising before it takes
connections. Minstrel tried once and exited, and with no restart policy
in the quick-start compose it stayed down. It now retries every two
seconds for up to two minutes, logging each attempt, and only then exits
with the last connection error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
Test names, assertion messages and comments no longer cite internal
task or rule numbers; each says the reason itself. The dev compose
starts Minstrel after the database without a healthcheck to gate on,
since Minstrel waits for its database at startup on its own. The
published-names test is removed; that check is a local grep before
publishing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The genre mix builder already ranks genres by how much you listen to
them (taste profile, then plays and likes, then library size), but the
rank was lost when the mixes were stored and both apps sorted the shelf
by name. Each playlist now has a shelf_rank (migration 0107), which the
genre builder fills 1..n in that listening order, even where it picked a
narrower genre before a broader one. The list and detail endpoints carry
it, and the web and Android Home sort the genre shelf by it, unranked
playlists after by name. Android's playlist cache gains the column
(Room v14).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fixture makes one artist row per track, so artists share names, and
with twelve Songs like mixes two can both be "Songs like X". Keyed by
name, their tracks merged and interleaved in tie order, so the snapshot
varied though the mixes did not. Name plus seed artist identifies a mix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Six mixes stretched to oversized circles on a wide window; twelve fill
the row at its normal tile size. The pool doubles with the count so the
daily shuffle still rotates which artists get a mix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each playlist on the wire (list and get) carries cover_album_ids: up to
six distinct albums with art, in the order they first appear. A shelf of
playlist tiles takes each tile's first album that no tile before it
shows, so no cover repeats along the shelf.
System mixes are stored with a one-line description of what they are
built from, written in one place so the web and Android apps show the
same words. Songs like and genre mixes have none; their names say it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A go-lane test reads every tracked file and path and fails on any of the
music-finding tools Minstrel no longer uses or ships beside. It holds their
names only as hashes, so it does not name them itself, and a second test
shows the matcher catching a stand-in name in any case and inside a word.
Also gone: the screenshots of the removed integration, requests and
auto-approve screens (the README no longer shows the old admin page), and
comments that still spoke of indexer keys and re-acquisition.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The watcher scans single files and never reconciles, and a file restored
with its old mtime takes the unchanged skip, so a track whose file came
back at the same path waited in Needs a file for the next full scan. The
scan now clears the mark when the path it reads belongs to a waiting
track, and tells clients it plays again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0106_baseline.up.sql is the schema at version 106 and the settings rows
it starts with, taken from a database migrated through 0001–0106; a
database built from the baseline alone dumps identically. A database
already at 106 skips it. Comments that pointed at a migration number now
name the table or constraint instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
request_kind and request_status were the requests table's column types
and outlived it. No database has run 106 yet, so it carries the drop.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A playback error can no longer be resolved as "requested": the server
refuses it, migration 106 takes it out of the CHECK (no row used it), and
the Reports history and types drop its label. The web and Android error
tables lose the copy for errors only the wanted list, follows, release-type
profiles, downloads and indexers sent, and comments stop naming Discover,
following and the requests page.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Migration 105 removes the tables the acquisition and Discover features
kept, and users.auto_approve_requests. Before library_album_matches goes,
an album with no release-group MBID takes the one its match listed.
Tables drop without CASCADE, in reference order, so a reference from a
table that stays stops the migration. The down migration refuses: the
data is gone, and a backup from before it is the way back.
The backup table list, the test reset list and the duplicate and user
queries follow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Admin card is Reports ("Tracks listeners flagged"). Each report
offers Resolve, Remove the file (the file goes and the track waits for a
good copy, with its likes and plays) and Remove from library (track,
file and history). Both removals now ask first; Delete file used to
delete on the tap.
They stay online-only: each deletes a file for good against a live
queue, so a replay hours later could act on a decision another admin
has since made. Offline they fail with the reason and the row returns.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reports offers "Remove the file" ahead of "Remove from library": the
bad file goes and the track waits in Needs a file, with its likes and
plays, for a good copy. Suspect sources gets "Remove this file", and the
Duplicates wrong-slot action and its route are named for what they do
(remove-files). Their toasts and copy name Needs a file.
Missing files becomes Needs a file in the rail, the Collection header and
the Overview counts. Each track says why it waits and who removed it, and
can be forgotten one at a time or by folder; the list exports as a CSV or
copies to the clipboard. The empty state says how a track gets there and
how it leaves.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The missing list carries each track's disc and track number, its
recording and release-group MBIDs, the Collection queue its file was
removed from, and the admin who removed it.
- POST /api/admin/library/missing/forget deletes waiting tracks for good,
tidying away an album or artist they leave empty, and writes a
track_forget audit row naming each. It is all or nothing: a track that
has its file again is refused with 409 track_has_file.
- GET /api/admin/library/missing.csv exports every waiting track (artist,
album, disc, track, title, MBIDs, why, since) to hand to whatever finds
music.
- DELETE /api/admin/tracks/{id} is retired. No client called it; its
service becomes tracks.Service.ForgetTracks.
Grimoire #7744 (milestone 635).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reports, Duplicates and Suspect sources now end the same way: the file
goes and the track stays, marked missing with its likes, plays and
playlist places, until a good copy lands in the library and move
adoption or missing-pair folding brings it back.
- library.RemoveFile removes one track's file and marks the track
missing with the queue it was removed from and who removed it
(tracks.removed_reason / removed_by, migration 0104). The duplicate
resolver's wrong-slot removal shares the same marking.
- POST /api/admin/quarantine/{id}/remove-file removes a reported file,
clears the listeners' reports, marks open playback errors deleted and
records removed_file in the Reports history. A wrong-file or
wrong-tags report drops the file's recording MBID.
- POST /api/admin/library/suspect-sources/{id}/remove removes a video
rip's file and its MBID, and writes a suspect_file_remove audit row.
- The removal reason clears with the missing mark when a file returns.
Grimoire #7743 (milestone 635).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Request notifications (approved, declined, completed, pending) are removed
along with the request flow that produced them. A new_music kind takes the
"new music arrived" slot: when a scan or a watcher batch finishes, the
scanner claims every album not yet announced (albums.announced_at) and tells
every user about the ones that are new: an album with a track on disk and
no track older than itself. The first import into an empty library, and an
album formed only by retagging tracks already held, announce nothing. One
notice per scan, carrying up to 50 albums and the total; it is never
coalesced, so a notice already emailed can't quietly absorb later arrivals.
It feeds the daily summary email, grouped by artist. Defaults: inbox and
email on, phone off.
Migration 0103 deletes request-kind notification rows and prefs, swaps the
kind CHECKs to new_music, and adds albums.announced_at with every album
held marked announced, so the first scan after it announces nothing old.
Web and Android: labels, the Android "Requests" settings section becomes
"New music", the shade channel your_requests becomes new_music (the old one
is deleted at startup), and "/" opens Home in the app. TrackLabel moves to
the notifications package. docs/smart-music-{server,client}-spec.md are
deleted per the operator; an Android comment loses the word "exchanges".
Grimoire #7666, #7671.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The similarity worker stops keeping the similar artists the library does
not hold, now that Discover is gone. The test keeps its check that the
in-library match lands scored against the seed's best, and drops the
assertions on the unmatched table.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Minstrel is now a viewer of the library it is pointed at. Finding,
downloading and filing music moves out of it.
Removed from the server:
- the request flow (requests, approval, auto-approve) and the wanted list,
follows, release profiles and release blocks;
- searching indexers, the download clients, the importer, the album
lifecycle and missing-file re-acquisition;
- the catalogue's discography, search and art (the MusicBrainz release and
track-list cache stays, for the duplicate resolver);
- Discover: its suggestions of artists not in the library, snoozes, the
candidate-artist tag enrichment and its tuning scope;
- writes to acquisition tables from moving the library folder and from
merging duplicates, the want-list join on Suspect sources, the sealing of
acquisition credentials, and the release-group lookup only
re-acquisition used.
Settling a wrong-slot duplicate no longer sets the release aside: the
copies go and their slots show as missing until a good copy is in the
library.
Removed from the web: Admin > Acquisition and Requests, /requests,
/discover, Follow on the artist page, the auto-approve toggle, and the
Collection's wanted-list tabs. The Collection is now the library's health:
an overview, Reports, Duplicates, Suspect sources and Missing files. The
README and docs no longer describe getting music.
The tables stay for now; a later migration drops them. The request
notification kinds and the Android screens are still to go.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shelf had four mixes built largely from the same lo-fi beats: about
1,250 tracks carry Hip Hop, Lo-Fi, Instrumental, Downtempo and four more
tags at once, and the near-duplicate guard compared artists, not songs, so
each tag passed as its own channel.
Genre selection now works on songs:
- ListGenreMixCandidates returns each genre's track ids instead of its
artist ids.
- A broad genre, one whose songs mostly also carry clearly narrower
candidates (Rock over Pop Punk and Ska Punk), is considered after the
specific genres of its tier.
- A genre is kept only when at least half its songs are not already in a
kept genre.
- Each mix leaves out songs tagged with a genre kept before it
(ListGenreMixTracks exclude_genres), so a song is in one mix at most.
The tiers, the minimum shelf and the minimum mix length are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Within a genre both halves of the mix were a uniform daily draw: a song
played forty times was no likelier than one played once, and the unheard
40% ignored who the artist was. ListGenreMixTracks now draws each half by a
date-seeded weighted lottery (Efraimidis-Spirakis: smallest -ln(u)/weight
wins), so the mix still changes daily and holds within a day.
- Familiar: 1 + ln(1 + plays) + 1 if liked, times the share of plays that
weren't skips.
- Unheard: 1 + ln(1 + the artist's plays + 2 x its liked tracks)
+ 2 x the artist's best similarity to the user's own artists, times the
artist's non-skip share. An unknown artist weighs 1, so new artists still
come up.
Which genres are offered, the exclusions and the familiar/unheard blend
are unchanged. DB tests check the lean averaged over ten days, and that a
stranger's tracks stay in the pool.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>