Commit Graph
43 Commits
Author SHA1 Message Date
TapTap 44b75c4d4d feat: accept, store and expose client diagnostics
CI / chart (push) Successful in 3s
CI / test (push) Successful in 2m20s
CI / chart-push (push) Successful in 6s
CI / image (push) Successful in 3m39s
- V11 client_logs table with per-user storage and retention/pruning
- POST/GET/DELETE /logs with batch validation, rate limit and admin access
- redact bearer tokens, Authorization headers and query/JSON secrets twice
- add X-Request-Id to responses and include it in the server log pattern
- report client error entries immediately in the server log
- scripts/logs.sh for source-side retrieval and clearing
- chart knobs CLIENT_LOG_RETENTION_DAYS and CLIENT_LOG_MAX_ROWS_PER_USER
2026-11-20 13:43:05 +00:00
TapTap 91312faa1c feat: per-track loudness normalization and server audio info
CI / chart (push) Successful in 3s
CI / test (push) Successful in 2m6s
CI / chart-push (push) Successful in 3s
CI / image (push) Successful in 3m31s
- measure downloads with ffmpeg's EBU R128 filter and store gain/LUFS
- backfill the existing library one file at a time
- expose gain on songs and a /info endpoint for source quality
- chart knobs LOUDNESS_ENABLED and LOUDNESS_TARGET_LUFS
2026-11-19 16:38:21 +00:00
TapTap 6763a83b03 feat: report download status in the mood detail
CI / chart (push) Successful in 2s
CI / test (push) Successful in 3m32s
CI / chart-push (push) Successful in 10s
CI / image (push) Successful in 3m59s
The client can show a per-track Downloading/Added/Failed state in search
instead of relying on a snackbar under the keyboard.
2026-11-17 16:43:20 +00:00
TapTap de1e95bfc6 feat(chart): set the Deezer ARL from values
CI / chart (push) Successful in 2s
CI / test (push) Successful in 1m59s
CI / chart-push (push) Successful in 5s
CI / image (push) Successful in 3m35s
- new deezer.arl value rendered as DEEZER_ARL
- existingSecret and arl are mutually exclusive
- values.local.yaml is gitignored; README documents both options
- chart 0.4.1 and a chart check for the new value
2026-11-17 16:10:56 +00:00
TapTap 26c41cc7d9 feat: recommend from Deezer and YouTube Music radios
CI / chart (push) Successful in 2s
CI / test (push) Successful in 1m57s
CI / chart-push (push) Successful in 5s
CI / image (push) Successful in 3m39s
- Deezer: /artist/{id}/radio for collection artists, affinity 2.0
- YouTube Music: RDAMVM watch playlist via yt-dlp, affinity 2.0
- seed radios from the 2 newest songs of the mood's own catalog
- dedupe candidates by recording, not only by external id
- clean raw YouTube titles and Topic suffixes when indexing
- tests, smoke marker for the RDAMVM path, docs
2026-11-17 15:22:05 +00:00
TapTap 62bcefad20 feat: base discovery on the whole mood collection
CI / chart (push) Successful in 3s
CI / test (push) Successful in 1m56s
CI / chart-push (push) Successful in 5s
CI / image (push) Successful in 3m34s
- seed from every artist (weighted by song count) and every album, not one track
- walk Deezer's graph: artist top tracks, related artists, album deep cuts
- score by artist frequency, collection album, catalog affinity and hint text
- penalise repeated artists so a 30-slot mood spans artists, not one
- refresh the pool when a song is added instead of waiting for refreshHours
- skip discovery for a mood with no hint, genres or songs
- extend tests and the smoke test with the artist graph
2026-11-17 10:37:47 +00:00
TapTap 141698282d feat: add Deezer as the default download source
CI / chart (push) Successful in 3s
CI / test (push) Successful in 2m23s
CI / chart-push (push) Successful in 5s
CI / image (push) Successful in 3m50s
- V9 adds source/external_id to songs, moods, recommendations and jobs
- Deezer public catalog for search, related album covers and metadata
- streamrip downloader configured with DEEZER_ARL, 128/320 MP3
- per-mood source selector; switching clears and refills recommendations
- keep YouTube Music as a full second catalog and downloader
- media layout <source>-<externalId>, legacy YouTube folders still read
- Docker/streamrip install, chart ARL secret, docs and dual-source smoke test
2026-11-17 07:32:34 +00:00
TapTap 515b9bbe1b feat: search and download from YouTube Music
CI / chart (push) Successful in 3s
CI / test (push) Successful in 2m6s
CI / chart-push (push) Successful in 4s
CI / image (push) Successful in 3m25s
- search music.youtube.com with the Songs filter and resolve each hit so
  results carry canonical artist, album and duration
- fall back to plain ytsearch when the Music search fails
- download the Music watch URL first and the regular YouTube URL second
- parse explicit artist fields and drop channel/album/playlist entries
- update the smoke stub, docs and tests
2026-11-16 18:38:53 +00:00
TapTap ef536d1882 docs: describe the destructive PVC upgrade [skip ci] 2026-11-15 21:50:32 +00:00
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 f1dc60aae5 chart: show the newest chart in the Charts repository README
CI / chart (push) Successful in 2s
CI / chart-push (push) Successful in 4s
CI / test (push) Successful in 1m39s
CI / image (push) Successful in 3m31s
The chart repository README was static, so the published version was only
visible in index.yaml. push-chart.sh now regenerates a marked "Newest chart"
section with the version, app version, publish time and source commit, plus a
table of the newest version of every chart in the repository. Plain markdown
only, so the README stays readable on the Gitea front page.

The section is inserted before the first section on the first publish and
replaced in place afterwards.
2026-11-14 21:59:51 +00:00
TapTap 8e87fed93f chart: refuse to render without an explicit namespace
Helm falls back to the "default" namespace when --namespace is omitted, so a
forgotten flag (or a Kustomize helmCharts entry without namespace) silently
deployed into the wrong place. Render the namespace through one helper that
fails on an empty or implicit "default" namespace, with allowDefaultNamespace
as an explicit opt-in.

scripts/check-chart.sh lints the chart, asserts every namespaced resource
carries the passed namespace, and checks both failure and opt-in paths. CI runs
it instead of the plain template call.

Bump the chart to 0.2.1.
2026-11-14 21:59:48 +00:00
TapTap 0cd0b9582d chore: extend the nix dev shell with Python and deployment tools
CI / chart (push) Successful in 3s
CI / chart-push (push) Successful in 3s
CI / test (push) Successful in 1m47s
CI / image (push) Successful in 3m14s
The smoke script needs Python, and Helm/Kustomize/kubectl cover the
deployment workflow. JAVA_HOME now uses the package home attribute.
2026-11-14 21:33:45 +00:00
TapTap 13f36daeab docs: drop the remaining UI reference
CI / chart (push) Successful in 2s
CI / chart-push (push) Successful in 3s
CI / test (push) Successful in 1m48s
CI / image (push) Successful in 3m55s
2026-11-14 19:37:14 +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 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 b86d9feb8b chart: render the release namespace on every resource
CI / chart (push) Successful in 2s
CI / chart-push (push) Successful in 2s
CI / test (push) Successful in 1m40s
CI / image (push) Successful in 3m2s
Set metadata.namespace from .Release.Namespace on the ConfigMap, Service,
PVC, Deployment and Ingress. This keeps the chart correct when a consumer
does not run Kustomize's namespace transformer, and makes the rendered
manifests explicit about where they belong.

Bump the chart to 0.1.3.
2026-11-14 10:40:44 +00:00
TapTap 0ac226b011 ci: publish charts to TapTap/Charts
CI / chart (push) Successful in 2s
CI / chart-push (push) Successful in 2s
CI / test (push) Successful in 1m38s
CI / image (push) Successful in 3m4s
Replace the OCI chart push with a classic Helm repository in the public
TapTap/Charts repository. CI packages the chart, regenerates index.yaml and
pushes both to main, so `helm repo add` and Kustomize helmCharts work.

The publisher authenticates with the AUDIOMANAGER_CHARTS_TOKEN secret and
supports an explicit VERSION for local releases.
2026-11-14 10:03:44 +00:00
TapTap df3ed281f8 docs: use a chart version placeholder
CI / test (push) Successful in 1m37s
CI / chart (push) Successful in 2s
CI / chart-push (push) Successful in 22s
CI / image (push) Successful in 3m37s
2026-11-14 09:32:45 +00:00
TapTap 73757f2425 docs: show the current chart registry version
CI / test (push) Successful in 1m37s
CI / chart (push) Successful in 2s
CI / chart-push (push) Successful in 3s
CI / image (push) Successful in 3m27s
2026-11-14 09:32:31 +00:00
TapTap 9711aca67a chart: rename the Helm chart to audiomanager
CI / test (push) Successful in 1m38s
CI / chart (push) Successful in 2s
CI / chart-push (push) Successful in 2s
CI / image (push) Successful in 3m0s
Use the product and image name for the chart, release, namespace, secrets,
container and rendered file paths. The application package and local config
paths keep their existing names.

Bump the chart to 0.1.2 so the new chart name and paths are a distinct
release. CI now publishes oci://gitea.tap-tap.win/taptap/charts/audiomanager.
2026-11-14 09:29:47 +00:00
TapTap 76bccaefea ci: package and push the Helm chart to the OCI registry
CI / test (push) Successful in 1m42s
CI / chart (push) Successful in 2s
CI / chart-push (push) Successful in 3s
CI / image (push) Successful in 3m4s
Add a chart-push job that runs after the chart lint on every push and
publishes the packaged chart to oci://gitea.tap-tap.win/taptap/charts.

Main builds use <chart version>-sha.<commit> so parallel commits do not
overwrite each other; v* tags use the tag version. The shared
scripts/push-chart.sh also supports explicit VERSION and local use.
2026-11-14 09:21:46 +00:00
TapTap 441fa056ba chart: make the default deployment ready to install
CI / test (push) Successful in 1m38s
CI / chart (push) Successful in 2s
CI / image (push) Successful in 3m4s
Use the CI-published :latest tag with pullPolicy Always, since the chart
previously defaulted to appVersion 0.1.0, which is not published as an image.

Add ingress annotations with a cert-manager ClusterIssuer so the TLS secret is
issued instead of having to exist beforehand.

Extend release.sh --deploy to create the registry image pull secret from the
local Docker config and pass it to the release, and document both the scripted
and manual deployment paths.
2026-11-13 16:09:02 +00:00
TapTap 96d704f192 ci: check out the image job with plain git
CI / test (push) Successful in 1m38s
CI / chart (push) Successful in 3s
CI / image (push) Successful in 4m38s
Kaniko unpacks the final stage over /, so tools from the CI image (node in
particular) are gone after the build. The checkout action's post step then
fails with exit code 127 even though the image was pushed successfully.

Use a plain git fetch/checkout in the image job, which has no JavaScript action
and therefore no post step.
2026-11-13 15:58:11 +00:00
TapTap a6cc46b747 ci: restore image publishing with a persistent Docker config
CI / test (push) Successful in 1m38s
CI / chart (push) Successful in 2s
CI / image (push) Failing after 3m29s
A multi-stage kaniko build replaces / with the last stage's root filesystem,
which deletes $HOME/.docker/config.json. Kaniko then resolves credentials at
push time without them, asks the registry for an anonymous token and Gitea
rejects the upload with 401 reqPackageAccess.

Keep the Docker credential store in /kaniko/.docker for the whole image job via
DOCKER_CONFIG and let docker login write there directly. Restore the image job
and document that CI publishes images again.
2026-11-13 15:51:01 +00:00
TapTap 60e8dadce6 ci: keep tests in CI and move image pushes to a local release script
CI / test (push) Successful in 1m36s
CI / chart (push) Successful in 3s
The Gitea registry rejects kaniko pushes from job containers with
401 reqPackageAccess even though the same credentials work from a normal
machine, so the image job could never go green.

Drop the image job; CI now only runs unit tests, the smoke test and the
Helm chart lint. Add scripts/release.sh, which builds and pushes the
image from a trusted machine and can optionally apply the users secret
and run helm upgrade.
2026-11-13 14:28:48 +00:00
TapTap 4c6f1c8fe8 ci: use a prebuilt image with every pipeline dependency
CI / test (push) Successful in 1m52s
CI / chart (push) Successful in 3s
CI / image (push) Failing after 2s
Add ci/Dockerfile (JDK 21, Gradle 8.14.3, ffmpeg, sqlite3, node,
docker CLI and Helm) and build it as taptap/audiomanager-ci. Workflows
now start from that image instead of downloading a JDK and installing
packages on every run.

The registry namespace is the lowercased package owner `taptap`, not
`tap-tap`; update the chart, workflow and documentation accordingly.
The image build uses plain docker build/push, since the job container
starts with no buildx plugin.
2026-11-13 13:37:15 +00:00
TapTap 7d98bc1d3a fix: use a glibc base image for sqlite-jdbc
CI / test (push) Successful in 2m34s
CI / smoke (push) Failing after 1m13s
CI / chart (push) Successful in 14s
CI / image (push) Skipped
Alpine/musl cannot load sqlite-jdbc's bundled native library, so the
container failed at startup. Switch the runtime image to
eclipse-temurin:21-jre-jammy and verify the image end-to-end, including
transcoding, against a read-only root filesystem.

The smoke fixture now uses a 192 kbps source so the maxBitRate check
actually proves transcoding instead of direct play.
2026-11-13 13:12:13 +00:00
TapTap 25331ec0e1 feat: add Docker image, Helm chart and Gitea CI
CI / test (push) Successful in 3m35s
CI / smoke (push) Successful in 3m11s
CI / chart (push) Successful in 14s
CI / image (push) Failing after 5s
- multi-stage Dockerfile with ffmpeg on Alpine JRE 21
- Helm chart for k3s: library ConfigMap, Vault users secret, data PVC,
  read-only hostPath media, ingress, probes and security context
- Gitea Actions runs tests, smoke test and chart lint, then builds and
  pushes the image on main and version tags
2026-11-13 12:56:30 +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 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 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 f5e247e164 docs: rename README to README.md so Gitea renders it as Markdown 2026-11-13 12:02:08 +00:00