Commit Graph
23 Commits
Author SHA1 Message Date
TapTap 824eb36dd2 feat: rebuild AudioManager around downloadable moods
CI / chart (push) Successful in 3s
CI / test (push) Successful in 2m2s
CI / chart-push (push) Successful in 4s
CI / image (push) Successful in 3m20s
- V8 wipe migration and the shared song store keyed by YouTube video id
- media store, indexer, downloader, recommendation top-up and refcounted GC
- mood songs plus the recommendation lifecycle and mixed radio pools
- new search, song and recommendation API; remove library/longform/seed routes
- chart PVC/media env, docs, Nix, README and an end-to-end smoke test
2026-11-15 21:37:39 +00:00
TapTap 4be502bb4e fix: harden scans, downloads, sync and radio edge cases
CI / chart (push) Successful in 3s
CI / test (push) Successful in 2m2s
CI / chart-push (push) Successful in 4s
CI / image (push) Successful in 3m13s
Scanner and library:
- Keep the last library when a configured folder cannot be walked; the
  previous code deleted every song, cascading away mood seeds and progress.
- Re-adding a file now clears its tombstone, and a re-deletion refreshes the
  timestamp instead of keeping the old one.
- Tombstone timestamps are unique per row, and delta pages continue from the
  older of the song/tombstone page ends.
- Snapshot pagination accepts a stable revision for later pages so songs
  inserted mid-sync are not skipped forever.
- Reject "%" and "_" searches that normalize to an empty LIKE needle.

Downloads and discovery:
- Download promotion uses the deterministic path id, one folder per track so
  covers do not overwrite each other, removes failed promotions, and restarts
  the scan after a running one finishes.
- Stale downloading jobs are recovered; reject cancels queued/in-flight jobs;
  markDone only owns downloading rows; rejecting no longer seeds the track.
- Reuse an already completed download of the same video for another mood.
- yt-dlp stdout and stderr are separated, empty discovery results no longer
  prune undecided recommendations, and filenames are capped by UTF-8 bytes.

API and data:
- Malformed or missing JSON returns 400 instead of 500; optional session
  bodies use receiveNullable.
- Playback events must belong to the session, known song and open session.
- Radio refills the candidate pool after recent-song pruning.
- Seed percent is required in MoodRepository.update.
- Normalize legacy V4 liked/downloaded recommendation states before V5, with
  an upgrade regression test.

CI: check out without persisting credentials and require tests before chart
publishing.
2026-11-15 18:18:21 +00:00
TapTap c75f2971b4 feat: mix mood radio by seed percentage and embed download artwork
CI / chart (push) Successful in 3s
CI / chart-push (push) Successful in 5s
CI / test (push) Successful in 1m50s
CI / image (push) Successful in 3m16s
Moods now store a seedPercent (0-100, default 50). RadioService rolls that
share independently for every queued slot: heads picks from the seed songs,
tails from the generated recommendation pool. When one pool is empty the other
fills the batch, so a mood never stalls. The DTO exposes both seedPercent and
the derived recommendationPercent, and create/patch accept seedPercent.

Automatic YT downloads now embed the video thumbnail as MP3 cover art so the
scanner publishes a cover for newly imported tracks.

V7 adds moods.seed_percent.
2026-11-15 17:07:04 +00:00
TapTap e7704c42ea fix(download): explain filesystem failures and prepare the import dir
CI / chart (push) Successful in 3s
CI / chart-push (push) Successful in 4s
CI / test (push) Successful in 1m47s
CI / image (push) Successful in 3m45s
A failing Files.createDirectories only produced the directory path in the log,
which hid whether the music hostPath was read-only or owned by another user.
Errors now include the exception type, cause and a hint about UID 10001, and
permission or read-only failures fail immediately instead of retrying three
times.

The chart gets a prepare-imports init container (downloads.prepare) that
creates "<music>/AudioManager Imports" and gives it to UID 10001, so downloads
work on a hostPath owned by root. Chart version 0.2.4.
2026-11-15 14:40:28 +00:00
TapTap a5af1ee83f feat: download accepted recommendations and track longform progress
CI / chart (push) Successful in 4s
CI / chart-push (push) Successful in 4s
CI / test (push) Successful in 2m5s
CI / image (push) Successful in 3m14s
Accepted recommendations without a library match now enter a download queue.
A worker downloads the MP3 with yt-dlp into "<music>/AudioManager Imports",
runs a scan, matches the new song, links it to the recommendation and adds it
as a seed. Jobs retry three times and expose queued/downloading/done/failed
state (plus the error) on the recommendation DTO, so clients can show progress
and retry. Downloads can be disabled and the target folder chosen.

Long-form gets resume points: GET/PUT /longform/progress, scoped to longform
folders and to the owner, with automatic completion detection. Longform stays
excluded from moods and radio.

The chart mounts the music hostPath writable for imports and passes the new
DOWNLOAD_* settings; version 0.2.3.
2026-11-15 13:26:22 +00:00
TapTap c5aa000d1a feat: discover YT recommendations and tune the radio
CI / chart (push) Successful in 26s
CI / chart-push (push) Successful in 5s
CI / test (push) Successful in 2m6s
CI / image (push) Failing after 2m54s
yt-dlp now feeds mood discovery. Queries come from the free-text hint, seed
artists and genres; they run in parallel, are filtered to music-length videos,
matched against library songs by normalized title and artist, scored, and
stored as review candidates. Refresh, accept and reject endpoints are added:
accepting a library match adds a seed immediately, while accepted tracks that
are not owned wait for the future downloader. Decisions survive refreshes and
stale undecided candidates are pruned.

A background pass refreshes stale moods every hour, and the image ships a
pinned yt-dlp binary (YTDLP_PATH, also added to the Nix shell and chart).

Radio now avoids tracks played in the last 7 days when the pool is large
enough, spaces artists and albums across a batch, and weighs skips three times
as heavily as completions. The chart moves to 0.2.2.
2026-11-15 12:44:30 +00:00
TapTap 0df1da7cf7 feat: keep radio playing when a small library is exhausted
CI / chart (push) Successful in 2s
CI / chart-push (push) Successful in 3s
CI / test (push) Successful in 1m49s
CI / image (push) Successful in 3m14s
A mood with fewer tracks than a batch used to return an empty queue once the
session had heard everything. Allow controlled replay of already-heard tracks
once no unheard candidates remain, while still never repeating a track inside
one batch and never leaving the owner's music folders.
2026-11-14 19:44:20 +00:00
TapTap bf6c9e7394 refactor: remove the server-rendered web UI
CI / chart (push) Successful in 3s
CI / chart-push (push) Successful in 3s
CI / test (push) Successful in 1m53s
CI / image (push) Successful in 4m12s
All browsing and mood management now live in the native client. Drop the
embedded HTML page, the WEB_UI setting, the /ui route and the chart env
entry; the server only exposes /api/v1, /health and a small root banner.
2026-11-14 19:36:43 +00:00
TapTap 54cf807a9b feat: allow cross-origin API requests for the web client
CI / chart (push) Successful in 3s
CI / chart-push (push) Successful in 3s
CI / test (push) Successful in 1m46s
CI / image (push) Successful in 3m21s
The Kotlin/Wasm client can be hosted separately from the API. Bearer auth
does not use cookies, so a permissive CORS policy is safe and keeps the
static bundle deployable anywhere.
2026-11-14 18:24:13 +00:00
TapTap b33eb076c1 feat!: replace OpenSubsonic with a native mood-first API
CI / chart (push) Successful in 3s
CI / chart-push (push) Successful in 3s
CI / test (push) Successful in 1m40s
CI / image (push) Successful in 3m12s
Remove the /rest compatibility layer and the playlist model. Moods are now
first-class private collections, and playback is driven by short-lived radio
sessions whose queues are generated by the server.

- Bearer device tokens (hashed) with revocable sessions.
- Library snapshot/delta sync with tombstones and per-folder scoping.
- Mood CRUD, seeds, preview and recommendations.
- Radio batches weighted by seeds, genres, artists, text and playback affinity.
- Playback events (started/completed/skipped) and explicit add-to-mood.
- Stream, download and cover endpoints with query-token support for browsers.
- V5 migration drops playlists and migrates existing moods; scanner writes
  tombstones and song update timestamps.
- Built-in UI rebuilt on the native API with a radio player.
- Native API integration tests and a rewritten smoke test (49 checks).
- Chart bumped to 0.2.0.

BREAKING CHANGE: the OpenSubsonic API and static playlists are gone.
2026-11-14 17:54:44 +00:00
TapTap 28bfdd9d00 feat: add per-user moods as generated playlists
CI / chart (push) Successful in 2s
CI / chart-push (push) Successful in 2s
CI / test (push) Successful in 1m41s
CI / image (push) Successful in 3m11s
Add private server-managed playlist moods with curated seeds and related
library fill. Moods are created or promoted from existing playlists in the
web UI, refresh lazily after their TTL, and are marked stale after a scan.

Symfonium stars pin the active mood: opening a mood restores its context,
and a starred song becomes a permanent seed. Without an active session the
song is pinned to every mood that already contains it.

Includes the V4 migration, custom mood endpoints, management UI, tests and
smoke coverage. Bump the chart to 0.1.4.
2026-11-14 12:52:25 +00:00
TapTap e08d993e35 fix: browse artist directories in getMusicDirectory
CI / chart (push) Successful in 3s
CI / chart-push (push) Successful in 3s
CI / test (push) Successful in 1m39s
CI / image (push) Successful in 2m59s
Symfonium uses getIndexes followed by getMusicDirectory for folder
browsing. Artist entries have ar- IDs, but getMusicDirectory only handled
al- and folder IDs, so drilling into an artist returned error 70 and the
client showed an empty directory.

Return the artist's albums as child directories, and use the same album
child shape for the folder view. Add a browsing test for the artist path.
2026-11-14 11:36:01 +00:00
TapTap 18a1d7cd19 feat: transcode streams with ffmpeg
- FfmpegTranscoder with maxBitRate, format fallback to MP3 and timeOffset
- direct play when no transcode is required, preserving HTTP Range support
- transcoded responses are chunked audio/mpeg with process cleanup
- unit tests for policy and real ffmpeg output
- smoke test covers maxBitRate, timeOffset and format fallback
2026-11-13 12:53:06 +00:00
TapTap 628d739d4c fix: normalize inverted year ranges in album and random song feeds 2026-11-13 12:49:00 +00:00
TapTap 26d31834a5 feat: add a built-in browser test client
- serve a single-page client at /ui (and redirect / to it)
- login, folder switch, album grid, album songs, search and streaming
- enabled by default, disable with WEB_UI=false
- document the test client and WEB_UI
2026-11-13 12:45:41 +00:00
TapTap 1571ec65ff fix: accept POST form posts on every Subsonic endpoint
Clients that use the formPost extension (Feishin, Symfonium) send requests
as application/x-www-form-urlencoded POSTs, not only GET. Register both
methods for every route and cover it in the smoke test.
2026-11-13 12:42:43 +00:00
TapTap 4d313a2846 feat: add client compatibility endpoints and a smoke test script
- getMusicDirectory for folder/album browsing
- server-side play queues with savePlayQueue/getPlayQueue and index variants
- jukebox status and internet radio compatibility responses
- scripts/smoke.sh generates a tagged MP3 library, runs the server and
  verifies all endpoints clients use, including Range, download and covers
2026-11-13 12:40:00 +00:00
TapTap 46266d8071 feat: add home feeds, interaction endpoints and playlists
- getAlbumList2/getAlbumList, getRandomSongs, getGenres, getSongsByGenre,
  getStarred2/getStarred, artist/album info and similar/top stubs
- scrobble, star/unstar, setRating, bookmarks and lyrics
- playlist create/get/update/delete with ownership and visibility rules
- persist scanned lyrics via V3 migration
- include last-played timestamps in song and album responses
2026-11-13 12:33:10 +00:00
TapTap 43e726628e feat: add getUser and getUsers endpoints
Feishin calls getUser during login to determine roles and folder access.
2026-11-13 12:22:48 +00:00
TapTap 656020f5c1 build: add setupLocal task for local development config 2026-11-13 12:15:31 +00:00
TapTap af2a8bd35d fix: make local development work out of the box
- library.example.yaml now uses relative ./media paths for local runs
- clearer startup errors for missing roots and config files
- ignore the local config/library.yaml override
2026-11-13 12:12:17 +00:00
TapTap 643ee42f09 feat: add browsing and media endpoints
- user-scoped getMusicFolders, getIndexes, getArtists, getArtist,
  getAlbum and getSong
- search3 with pagination, literal matching and empty/wildcard queries
- stream and download with Range support and RFC 5987 filenames
- getCoverArt with cached size variants and visibility checks
- V2 migration for per-user album and artist ratings
2026-11-13 11:53:57 +00:00
TapTap e194badefb feat: bootstrap MusicManager with scanner and Subsonic auth
- Gradle/Kotlin/Ktor project on JVM 21 with ShadowJar
- SQLite WAL, Flyway migrations and config-driven users/folders
- deterministic IDs, MP3 tag extraction, cover cache and delta scanner
- OpenSubsonic JSON envelope with token/password authentication
- system endpoints: ping, license, extensions, scan status
2026-11-13 11:42:57 +00:00