A client starts an upload with the soundtrack's name, sends one MP3 per
request, and finishes it. The server then moves the songs into a new folder
in the music folder and syncs only that folder, so the soundtrack is in the
library, lists and search right away.
- POST /api/v1/soundtracks/uploads, GET/DELETE .../uploads/{id},
PUT .../uploads/{id}/files/{file} and POST .../uploads/{id}/finish.
- Names must work as file names on every system and be free, ignoring case.
File names are plain: clients flatten disc folders.
- Only MP3 files. Size limits from UPLOAD_MAX_FILE_MB (50) and
UPLOAD_MAX_TOTAL_MB (2048).
- Refused while a sync runs, and a sync cannot start while an upload is
finished. Songs equal to an existing soundtrack's are refused, as the sync
would take them for that soundtrack renamed.
- Unfinished uploads live in MUSIC_PATH/.uploads and are removed after a day.
The sync now skips every hidden folder.
Closes#33
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Prometheus client and the golang.org/x updates raised go.mod to Go 1.26,
so the Docker build with golang:1.25-alpine failed in go mod download.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Alternative names (#32):
- PUT /api/v1/soundtracks/{uuid}/alternative-names replaces a soundtrack's
alternative names (trimmed, deduplicated, without the soundtrack's own name).
- alternative_names is in the soundtrack and statistics responses.
- /find matches them too and shows which name matched.
Covers (#12), stored in COVERS_PATH and off when it is not set:
- GET, PUT (upload) and DELETE /api/v1/soundtracks/{uuid}/cover, and
PUT .../cover/source to pick a SteamGridDB game or AniList anime by ID.
Uploaded and picked covers are never replaced automatically.
- With STEAMGRIDDB_API_KEY, a background job searches SteamGridDB, then
AniList, by name, alternative names and the name without bracketed parts,
at startup, after a sync and after names change. Search results are ranked
by matching words, so "Civilization IV" gets "Sid Meier's Civilization IV".
- cover_modified (Unix seconds) is in the soundtrack and statistics responses,
so clients can cache covers.
The new columns are added to migration 000006, which is not released yet.
Closes#12, closes#32
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Metrics are served on METRICS_PORT (default 2112, "off" to disable), never on
the public port. Besides the Go runtime and process metrics this adds:
- http_requests_total and http_request_duration_seconds per route pattern,
from an Echo middleware.
- musicserver_songs_requested_total and musicserver_songs_played_total by
pick mode (random, low, classic). The mode is now stored with each queued
song (migration 000006, not released yet).
- Library size, sync duration, last successful sync, broken songs from the
last full sync, and the database connection pool.
Refs #35, #36, #37
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bundled frontend gets a token with API_PASSWORD from config.js. The server now
generates config.js from its own config, so setting API_PASSWORD on the server
container is enough.
- Unit tests, integration tests and the Docker build check run in
parallel on branches and pull requests
- Integration tests run on every push instead of only manually
- Branch builds only build amd64 and check the arm64 cross-compile in the
test job; both platforms are built and pushed only for version tags,
after all tests pass
- Docker layers cached through the runner cache, Go module and build
caches mounted in the Dockerfile
- A newer push to the same branch cancels the running pipeline
- Dockerfile cross-compiles Go for the target platform (amd64/arm64
without emulation), uses templ pinned in go.mod, runs as uid 1000 on
alpine and lets FRONTEND_IMAGE pin the frontend version
- justfile: tools via go tool, `test` (unit) and `test-integration`
(uses the active docker context), no hardcoded paths, no tailwind or
frontend recipes
- Removed app.yaml, init.sh, tailwind.config.js and the tracked .idea
folder
Images should not be included in the database
Removes songs where the path doesn't work
Started working on adding cover images
Started adding vue directly in the application
Images should not be included in the database
Removes songs where the path doesn't work
Started working on adding cover images
Started adding vue directly in the application