sonda/internal/api/http
Repository files (latest commit first)
Filename Latest commit message Latest commit date
tgiachi d5ed0f2e9c feat(images): album covers from the Cover Art Archive
- The scan reads the MusicBrainz release group id of an album from the tags of its
  files (MUSICBRAINZ_RELEASEGROUPID, a vorbis comment or an ID3 frame) and stores it in
  albums.mbid: it is taken only when the file has an album and exactly one valid id, an
  album keeps the one it has, and an id that another album owns is not given twice. A full
  rescan reads it for music that was already indexed.
- New provider "coverartarchive" (off by default, no key, contact in the User-Agent). When
  an album has no picture in the user's own files, which always come first, its cover is
  asked from the archive by that id and never by a title: only the id leaves the server.
  The same GET /albums/{id}/cover; the record keeps the source. An outage is a 502
  provider_unavailable and is not remembered, and an older cover is served in its place.
- The archive answers with three redirects (coverartarchive.org, archive.org, a data node
  whose name changes). The outbound client can now follow redirects, but only the ones the
  caller allows, up to a limit; here that is https on archive.org and its subdomains.
- A purge counter now guards the covers too: a read that started before the provider's data
  was taken back is not kept. Removing the provider's data forgets the covers that came from
  it and deletes their files, and leaves the ones from the user's files.
- Spec, contract and HTTP tests, README updated; the facts of the real archive are written down.

Closes #43
2026-11-12 09:09:31 +01:00
..
api_test.go feat(images): free photos of artists from Wikimedia Commons 2026-11-11 22:03:32 +01:00
artist_image_test.go feat(images): free photos of artists from Wikimedia Commons 2026-11-11 22:03:32 +01:00
auth_test.go fix(listening): report a deleted account first and document one event per play 2026-11-11 15:02:28 +01:00
catalog_test.go feat(catalog): add the read API for artists, albums and tracks 2026-11-11 13:43:38 +01:00
contract_test.go feat(images): album covers from the Cover Art Archive 2026-11-12 09:09:31 +01:00
covers_test.go feat(images): album covers from the Cover Art Archive 2026-11-12 09:09:31 +01:00
description_test.go feat(images): free photos of artists from Wikimedia Commons 2026-11-11 22:03:32 +01:00
discover_test.go feat(feedback): a wishlist and "not interested" 2026-11-11 20:11:18 +01:00
docs.go fix(api): make the spec say what the code does, and make the tests prove it 2026-11-11 14:46:28 +01:00
docs_test.go fix(api): make the spec say what the code does, and make the tests prove it 2026-11-11 14:46:28 +01:00
errors.go feat: add sondad server with config, storage, auth and listening API 2026-11-11 12:06:15 +01:00
feedback_test.go feat(feedback): a wishlist and "not interested" 2026-11-11 20:11:18 +01:00
handlers_about.go feat(about): artist descriptions from Wikipedia 2026-11-11 21:36:27 +01:00
handlers_artist_image.go feat(images): free photos of artists from Wikimedia Commons 2026-11-11 22:03:32 +01:00
handlers_auth.go feat(auth): add refresh tokens, admin role and user management 2026-11-11 12:38:42 +01:00
handlers_catalog.go fix(catalog): keep albums apart, align album counts, reject bad search text 2026-11-11 13:47:31 +01:00
handlers_covers.go feat(images): album covers from the Cover Art Archive 2026-11-12 09:09:31 +01:00
handlers_discover.go feat(feedback): a wishlist and "not interested" 2026-11-11 20:11:18 +01:00
handlers_feedback.go feat(feedback): a wishlist and "not interested" 2026-11-11 20:11:18 +01:00
handlers_libraries.go fix(library): make the libraries upgrade and validation robust 2026-11-11 13:34:44 +01:00
handlers_library.go fix(discovery): purge lock, cleanup chains and rescans that cannot read 2026-11-11 17:36:14 +01:00
handlers_listen.go feat(listening): count a listen after a minimum play time and expose the history 2026-11-11 14:58:47 +01:00
handlers_providers.go feat(images): free photos of artists from Wikimedia Commons 2026-11-11 22:03:32 +01:00
handlers_similar.go feat(discovery): artist tags from Last.fm and MusicBrainz, and ids from my files 2026-11-11 17:01:43 +01:00
handlers_stream.go feat(streaming): stream tracks with HTTP Range support 2026-11-11 12:56:20 +01:00
handlers_taste.go feat(taste): learn what I like from what I listen to 2026-11-11 18:46:58 +01:00
handlers_users.go feat(auth): add refresh tokens, admin role and user management 2026-11-11 12:38:42 +01:00
handlers_usersettings.go fix(settings): strict body, deleted-account race, doc wording 2026-11-11 19:20:42 +01:00
libraries_test.go fix(library): make the libraries upgrade and validation robust 2026-11-11 13:34:44 +01:00
library_test.go fix(discovery): purge lock, cleanup chains and rescans that cannot read 2026-11-11 17:36:14 +01:00
listens_test.go feat(listening): count a listen after a minimum play time and expose the history 2026-11-11 14:58:47 +01:00
middleware.go fix(auth): reuse the account, quiet aborted requests, more tests 2026-11-11 19:29:39 +01:00
middleware_test.go fix(auth): reuse the account, quiet aborted requests, more tests 2026-11-11 19:29:39 +01:00
providers_test.go feat(images): album covers from the Cover Art Archive 2026-11-12 09:09:31 +01:00
router.go feat(images): free photos of artists from Wikimedia Commons 2026-11-11 22:03:32 +01:00
similar_test.go feat(discovery): remove provider data, genres from my files, full rescans 2026-11-11 17:27:29 +01:00
stream_test.go feat(library): named media libraries managed through the API 2026-11-11 13:30:25 +01:00
tags_test.go feat(discovery): remove provider data, genres from my files, full rescans 2026-11-11 17:27:29 +01:00
taste_test.go feat(taste): learn what I like from what I listen to 2026-11-11 18:46:58 +01:00
usersettings_test.go fix(settings): strict body, deleted-account race, doc wording 2026-11-11 19:20:42 +01:00