Commit graph

106 commits

Author SHA1 Message Date
tgiachi
075e000fd8 feat(web): a button for browser full screen
- one button in the player bar and one in the full-screen player puts the whole page in full screen and takes it out
- it follows the browser: Esc and F11 flip it back, a refused request leaves the page as it was
- left out where the browser has no Fullscreen API (for example iPhone Safari)
- English and Italian labels
2026-11-12 12:28:15 +01:00
squidd
2d478055f2 Merge pull request 'feat(web): web app with player, library browsing, themes and languages (F1)' (#55) from feat/web-f1 into main 2026-11-12 12:15:12 +01:00
tgiachi
241c1efc5d feat(web): Neon theme
- colour in the surfaces too: deep indigo ground, saturated violet panels, electric yellow accent
- checked by the same contrast test as the other themes
- README lists six themes
2026-11-12 12:10:36 +01:00
tgiachi
0d5805fd37 feat(web): Dracula theme
- a livelier dark theme: violet ground, hot pink accent
- covered by the same contrast test as the others
- README lists five themes
2026-11-12 12:08:54 +01:00
tgiachi
d7bd2c75db style(web): squarer corners
- base radius from 10px to 4px; one value (--radius in src/index.css) sets every corner
- no fully round shapes any more: play button, search box, pills and artist photos are squares with small corners
2026-11-12 12:03:53 +01:00
squidd
995ff4befe Merge pull request 'feat(discover): one Discover at a time for each listener, three at once on the server' (#56) from feat/discover-limit into main 2026-11-12 12:03:00 +01:00
tgiachi
69da67065d fix(discover): refusals do not wait for a turn, and waiting for one has an end
- The gate now comes after what only the database decides (a seed that is not an
  artist, no seed and no permission), so those answers are not held up by three
  slow Discovers and do not make the listener "busy".
- A request that waits more than 30 seconds for a turn answers 429 instead of
  hanging for as long as the providers are slow.
- The spec and the README say that a waiting request counts as running.
2026-11-12 12:00:18 +01:00
tgiachi
80a26aeb4a fix(web): keep the player bar on screen, label the settings choices, compact menu on phones
- the player bar stays at the bottom on long pages (sticky sits on its wrapper, not on the bar)
- theme and language groups in Settings have a visible label
- on a phone the menu is a row of links instead of a tall card, and the privacy note is left out there
- the full-screen player is centred vertically
Found by running the app in a real browser against a real server.
2026-11-12 11:58:48 +01:00
tgiachi
63fee32271 feat(discover): one Discover at a time for each listener, three at once on the server
A cold Discover can make dozens of provider requests, and nothing stopped one
listener, or a client that keeps opening and cancelling requests, from lining up
work for the providers and slowing everyone else's.

- A listener who already has a Discover running gets 429 `discover_busy` with
  Retry-After, at once.
- At most three Discovers run at the same time, whoever asks; the others wait for
  their turn, and one that stops waiting does no work and keeps no place.
- The place and the turn are given back when a Discover fails or ends.
- Spec and README describe it; the fakes of the tests are safe for parallel runs.
2026-11-12 11:52:20 +01:00
tgiachi
9eb9341593 fix(web): renew the session in the background, work over plain HTTP, and do not carry a queue to the next sign-in
- the token is renewed in the background when under 3 minutes are left, so the stream URL of the next track is never built from an expired token
- a renewal adopts a session from another tab only when it differs from the one in memory
- listen keys no longer need crypto.randomUUID, which does not exist on pages opened over plain HTTP on a local network
- signing out, or closing the app, stops the music and empties the queue, and the play in progress is reported first
- a provider address that is not an http(s) address is shown as text, never as a link
2026-11-12 11:48:32 +01:00
tgiachi
e0c42dd5ac docs(web): how to run and build the web app
- README section for the web client: how to run it next to sondad, what it does today, the commands
- the greeting on Home is read once per visit (lint: no Date during render)
- checked against a real sondad: login, renewal and spent refresh tokens, media URLs with Range, listens, search, and the provider-off answers
2026-11-12 11:45:20 +01:00
tgiachi
005d0808e9 feat(web): settings for theme, language and password
- theme and language as radio groups, each theme with a preview of its colours, the choice remembered
- change password: 8 to 256 bytes checked before sending; a changed password signs this session out, as the server ends every session
- account name and role, and sign out
2026-11-12 11:41:14 +01:00
tgiachi
3a93c65574 feat(web): home page
- greeting by the hour, recently played songs from the listening history (each song once), shelves of albums and artists
- an empty history, an empty library and a song that is gone each get their own short message
- a shelf that cannot be loaded does not hide the others
2026-11-12 11:39:56 +01:00
squidd
5a3761ca0c Merge pull request 'feat(lidarr): send an artist to Lidarr and see whether it has it' (#54) from feat/lidarr-artist into main 2026-11-12 11:38:18 +01:00
tgiachi
77d60664bb feat(web): search
- search page with a 250 ms pause after typing, the text kept in the address, and at most 200 characters sent
- artists, albums and songs in three groups of six, each with a link to the full list
- accents and capitals are left to the server, which ignores them
- list hooks can take a smaller page size and stay switched off until there is something to ask
2026-11-12 11:38:10 +01:00
tgiachi
e2899c6647 feat(web): artists, albums and songs pages with provider data and attribution
- lists of artists, albums and songs, loaded 50 at a time, with the search text taken from the address
- album page and artist page; a click on a song plays the list from there
- artist page shows a Wikipedia text, similar artists and tags with their credits, and the photo credit
- providers that are off, unreachable or without an id give a short explanation, never an error page
- artists a provider named, with nothing to play, still have a page
2026-11-12 11:36:35 +01:00
tgiachi
22cd0aecd4 fix(lidarr): protect Lidarr from many asks, refuse bad ids, give up when the request does
- Asking whether Lidarr has an artist keeps the answer for a minute, asks once however
  many ask at once, and has at most four questions on their way; what cannot be
  answered is not kept, and a send forgets what was kept.
- An id that is not a MusicBrainz id (one that a provider named and that was only
  cleaned) is no id: it is refused or shown as no_id instead of becoming a 500.
- A send that waits for its turn gives up when its request does.
- A bad answer after the add also says the artist may have been added; a canceled
  send ends like the other canceled requests.
- The README says which artists can be sent.
2026-11-12 11:35:28 +01:00
tgiachi
20856f2ec6 feat(web): player bar and full-screen player
- bar at the bottom of every page with cover, artists, controls, seek and time
- full-screen player in a dialog: big cover, bar-style seek control, up next, focus kept inside, Escape closes
- Space plays and pauses unless the key belongs to a field, a button or a link
- songs list row, seek control and time formatting
- jumpTo in the queue store for a click on an upcoming track
2026-11-12 11:32:29 +01:00
tgiachi
4ab5f8ace9 feat(web): report listens, one event per play
- one event per play with its own idempotency key: complete, skip, or play when the page closes
- a failed send is retried with the same body and key after 1, 4 and 16 seconds; a 400 or 404 is final
- closing the page sends the open play and anything waiting for a retry with keepalive
- a hidden tab keeps playing, so only pagehide ends a play early
2026-11-12 11:28:50 +01:00
tgiachi
8160c33960 feat(lidarr): send an artist to Lidarr and see whether it has it
- POST /artists/{id}/lidarr (admin) adds the artist to the admin's own Lidarr by its
  MusicBrainz id, never by name, with the profiles, the folder and the monitor
  option the admin chose. It works for any artist that has an id, also one that
  Sonda only learned of from a list of similar artists. It can be repeated: an artist
  that Lidarr already has changes nothing. Two sends at once go one after the other.
- GET /artists/{id}/lidarr (signed in) says whether Lidarr has the artist and
  monitors it; what stops the answer is a status (disabled, no_id, not_configured,
  error), as for the descriptions.
- It needs the provider switched on and the profiles and folder chosen; a timeout
  says the artist may have been added anyway.
- Spec, contract test and README, which also say that Sonda downloads nothing.
2026-11-12 11:28:15 +01:00
tgiachi
92d9c8ed78 feat(web): audio engine that survives token renewal
- drives the audio element from the player store: load, play, pause, seek, next on end
- a renewed access token swaps the stream URL and resumes at the same second, playing or paused
- reports start, listened time (in steps of at most two seconds) and finish for the listen reporter
- media keys and lock screen through the Media Session API
2026-11-12 11:26:54 +01:00
tgiachi
cffa8f1976 feat(web): player queue store
- queue with next, previous, seek, repeat (off, all, one), shuffle that keeps the original order, enqueue, play next and remove
- seek and restart requests are explicit, so the audio engine can follow them
2026-11-12 11:24:55 +01:00
tgiachi
3ffd07c546 feat(web): app shell, sidebar and routes
- sidebar with the current page marked, privacy note, and a main area that wraps on narrow screens
- routes for home, search, artists, albums, songs and settings, and a not-found page
2026-11-12 11:23:24 +01:00
tgiachi
1250fd4eac feat(web): catalog hooks, covers and artist photos with fallbacks
- paged lists for artists, albums and songs, 50 at a time, with search text and artist/album filters
- cover and artist photo that fall back to rings or an initial, and retry when the token is renewed
2026-11-12 11:22:16 +01:00
tgiachi
1c5b4a4fa0 feat(web): API client, session with cross-tab refresh, login screen
- fetch client with bearer token, one retry after a renewal, ApiError with the server code
- session kept in localStorage; renewal is single-flight in a tab and under a Web Lock across tabs, and a tab adopts a session another tab already renewed
- a refused refresh token signs out once; an unreachable server keeps the session
- mediaUrl and onTokenChange for audio and image URLs that carry the token
- sign-in and first-account screen, and a gate that shows the app only when signed in
2026-11-12 11:21:06 +01:00
tgiachi
7363b80ebd feat(web): English and Italian UI text
- i18next with en and it, language from the stored choice, then the browser, then English
- a test keeps both files on the same keys with no empty text
- API error codes map to error.<code>, with error.unknown as the fallback
2026-11-12 11:18:34 +01:00
tgiachi
abeef4e30f feat(web): four themes with a contrast test
- Sonda, Tokyo Night, Gruvbox dark and Gruvbox light as CSS variables with shadcn token names
- contrast test: text 4.5:1, accent and form outlines 3:1 in every theme
- Gruvbox dark muted text lightened to pass
- theme choice is stored in localStorage and survives it being blocked
2026-11-12 11:17:41 +01:00
tgiachi
f1da4b5aaf feat(web): scaffold the React app with Vite, Tailwind and shadcn/ui
- Vite, React 19 and TypeScript in web/, Vitest with jsdom and Testing Library
- Tailwind v4 and shadcn/ui, with Figtree and Fraunces bundled locally
- npm run gen:api builds src/api/schema.d.ts from the OpenAPI spec
- dev server proxies /api to sondad (SONDA_URL, default 127.0.0.1:8080)
- mockFetch test helper that refuses unmatched requests
2026-11-12 11:15:50 +01:00
squidd
7027eca946 Merge pull request 'feat(lidarr): set up Lidarr as a provider and read what it offers' (#53) from feat/lidarr-client into main 2026-11-12 11:13:58 +01:00
tgiachi
4dbe1074ba fix(lidarr): saved defaults, conflicts, no proxy, readable addresses
- Setting the address alone now stores the default options (monitor all, search
  for missing albums), so what is shown is what will be sent.
- A 409 from Lidarr, when two adds of the same artist cross, means the artist is
  already there; only "an artist with this ID was not found" is an unknown artist.
- The client never goes through a proxy named by the environment, since Lidarr is
  on the admin's own network and the key travels in a header.
- An address that cannot be read back (an IPv6 zone) is refused instead of being
  stored and reported as "not configured".
- A deadline asking Lidarr is a bad gateway, not an internal error; a redirect is
  reported with a hint to use the final address; the request schema of the Lidarr
  options is closed.
2026-11-12 11:11:35 +01:00
tgiachi
fb9e923197 feat(lidarr): set up Lidarr as a provider and read what it offers
Lidarr is a server of the user's own that looks for and downloads music. Sonda
never downloads; this is the first piece of letting an admin send it an artist.

- The `lidarr` provider, off by default: an address, an API key (32 hexadecimal
  characters, never returned) and, chosen once, a quality profile, a metadata
  profile, a root folder, the monitor option and whether to search for missing
  albums. It cannot be enabled without an address and a key.
- The address is checked: http or https, no user and password, no query, no
  fragment, no closing slash.
- A small client of its own, apart from the outbound one (which only makes plain
  GETs): the key travels in a header, no redirect is ever followed, answers and
  time are bounded, and the address and key are read for every request.
  Status, options, artist by MusicBrainz id and add (lookup, then the add that
  Lidarr's own screen sends).
- `GET /providers/lidarr/options` lists the profiles and root folders; the test of
  the provider checks the address and the key (`no_address` when it has none).
- Migration 0017 adds the address and the options to the provider settings.
- OpenAPI, contract test and README say what is sent and where.
2026-11-12 11:04:53 +01:00
squidd
227e267d73 Merge pull request 'feat(search): search ignores accents' (#50) from feat/search-accents into main 2026-11-12 10:25:23 +01:00
tgiachi
4ec3ae3bb0 fix(search): empty folded queries, compatibility forms, final sigma, start-up log
- A search text that has nothing left once its accents are taken off matches
  nothing instead of everything.
- The search key folds compatibility forms (the ligature "fi", full-width
  letters) and the Greek final sigma.
- The start-up refresh of the keys logs when it starts and how long it took, since
  it can take a while on a big library the first time.
- More tests: a retitled track is found by its new title, a refresh fixes both
  keys and keeps "Beyoncé" and "Beyonce" apart, more cases for the key.
2026-11-12 10:24:44 +01:00
tgiachi
271c88743c feat(search): search ignores accents
- A search key apart from the key that identifies artists, albums and tracks:
  lower case, accents taken off (Latin, Greek and Cyrillic marks only, so kana
  and Hangul stay intact), and letters like ß, æ, ø, ł written plain.
- GET /artists, /albums and /tracks look in it, so "bjork" finds "Björk" and
  "strasse" finds "Straße".
- "Beyoncé" and "Beyonce" stay two artists: the identity key keeps accents.
- Migration 0016 adds the column on SQLite and PostgreSQL; RefreshMatchKeys
  fills it for existing rows at start.
- golang.org/x/text is now a direct dependency.
2026-11-12 10:17:21 +01:00
squidd
bea1158e68 Merge pull request 'feat(jobs): background jobs for artist photos and descriptions' (#48) from feat/artist-jobs into main 2026-11-12 10:10:35 +01:00
tgiachi
9323702b1e fix(jobs): a stop or a panic never wedges a job, a bad download never replaces a good picture
- A panic while counting no longer leaves the job marked as running; a panic in the
  work of one item is a failure of that item, and a panic in the list ends the job
  with a reason.
- A stop while the items are counted is recorded as a stop instead of a 500, and a
  count that fails leaves the status as the previous job left it.
- An artist that lost its MusicBrainz id since it was listed is skipped by the
  pictures job, as the spec says, instead of counting as a failure.
- A picture that cannot be used now (refused download, bytes that are not an image)
  is a failure when a good picture is stored, so a refresh never throws it away.
- The outcomes the artist jobs report share their constants in the jobs package.
- The spec no longer calls each job "the one request" that goes through the library.
- The test that waited with a sleep for the count now waits for a signal.
2026-11-12 10:09:46 +01:00
tgiachi
e3843ad7d6 feat(jobs): background jobs for artist photos and descriptions
Add one engine, internal/jobs, that runs the jobs which go through the whole
library: start, stop, progress, one at a time, give up after five failures in
a row, end at once when a provider is off.

- The covers job now runs on the engine; its API is unchanged.
- POST/GET/DELETE /library/artist-images looks for the picture of every
  artist of the library that has a MusicBrainz id.
- POST/GET/DELETE /library/descriptions does the same for the Wikipedia
  description.
- ?refresh=true searches everything again and never replaces a stored result
  by a failure; artists without an id are never touched, nothing is looked up
  by name.
- images.Service.EnsureArtistImage and about.Service.Ensure do the work for one
  artist; the lists come from ImageRepo and DiscoveryRepo.
- jobs.Runner binds a job to the application context, replacing the two
  hand-written controls.
- OpenAPI, contract test and README describe the new endpoints and say that
  they are bulk requests.
2026-11-12 09:58:45 +01:00
squidd
1c3c2d017b Merge pull request 'feat(images): a background job that builds all the covers' (#46) from feat/covers-job into main 2026-11-12 09:44:33 +01:00
tgiachi
345ad8eecb fix(images): a refresh never wipes covers, the job sees outages and starts cleanly
- A refresh (or any rebuild) while the Cover Art Archive is switched off, but its data
  not taken back, no longer turns the covers it gave into "no cover" and deletes their
  files: the stored cover is kept and its date renewed, so the files are not searched
  again at every request.
- When none of an album's files and folders can be looked at (an unmounted disk, a
  permission), that is ErrFilesUnreadable (503 files_unreadable), not "no picture": nothing
  is remembered, nothing built is touched, the archive is not asked, and the job counts it
  as a failure and gives up after five. A link that leaves the library is still just refused.
- The job calls the build for every album that is not good yet and does not serve an older
  cover on an outage, so a dead provider shows as failures and trips the limit instead of
  being reported as covers from the archive.
- Start marks the job as running before counting the albums and does not hold the lock
  meanwhile; a stop that comes back as a plain driver error is not a failure; a job that
  finished by itself is never marked stopped.
- Spec and README say so; the tests cover each case, including a list that fails midway.
2026-11-12 09:43:51 +01:00
tgiachi
548ee03d83 feat(images): a background job that builds all the covers
- POST /library/covers (admin) starts, in the background and one at a time like a scan,
  a job that builds the cover of every album that has something to play and no cover that
  is still good; GET /library/covers shows the progress and how the last job ended;
  DELETE /library/covers stops it. ?refresh=true searches every album again.
- For each album it does what opening its cover does: the user's own files first, then the
  Cover Art Archive if the provider is on. It gives up, and says why, when the provider
  fails for five albums in a row; an album that vanished is skipped, not a failure.
- This is the one request that goes through the whole library, and the README and the
  provider text say so: with the archive on it sends the release group id of each album with
  no picture in its files, one after the other, spaced out.
- NewRouter now refuses to build when a service was not wired, naming it, instead of
  panicking at the first request (the wiring of this job in main had been missed, which no
  test could see).
- The outbound spacing test measures where the request leaves the client, so a busy
  machine cannot make it fail.
- Spec, contract and HTTP tests, README updated.

Closes #45
2026-11-12 09:34:27 +01:00
squidd
75c887c931 Merge pull request 'feat(images): album covers from the Cover Art Archive' (#44) from feat/cover-art-archive into main 2026-11-12 09:22:01 +01:00
tgiachi
5fecd394e4 fix(images): purge removes every archive cover, the id of an emptied album moves on
- The covers that come from the Cover Art Archive now live in a folder of their own
  (images/album-remote). Taking the provider's data back deletes that folder, so nothing
  from the archive is left whatever became of its records: a rescan makes a record stale
  and a later search that finds nothing replaces it, and neither of those used to remove
  the files. A cover that moves between the user's files and the archive, or goes away,
  no longer leaves the old files behind.
- A redirect to a place that is not allowed is an outage (502, not remembered, an older
  cover served), not "no cover" for a day for every album. A picture over the limit is
  still "no cover".
- A track that moves to another album (a fixed title) leaves the first with no track: it
  gives up its release group id, so the album the track went to can take it. An album
  that has an id keeps it; an id another album owns is not given twice.
- Waiting for a local slot is no longer reported as the provider being unreachable, and a
  build whose reads were purged three times is not served with files that were never written.
- README and spec no longer say covers never contact anybody.
- Tests: the new folder and the purge after a rescan, files left by a replaced cover, the
  local wait, repeated purges, a refused redirect, the update path with a taken id and the
  emptied album.
2026-11-12 09:21:11 +01:00
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
squidd
699970aac9 Merge pull request 'feat(images): free photos of artists from Wikimedia Commons' (#42) from feat/artist-image into main 2026-11-11 22:13:26 +01:00
tgiachi
9e85d4d1ea fix(images): outages are 502, purges are not undone, bad pictures are not outages
- A timeout inside the provider (the outbound client's own deadline, which wraps
  context.DeadlineExceeded) was mistaken for the caller leaving and came out as a 500, so
  an older stored picture was not served. The decision now uses the caller's own context,
  and a build that runs out of its two minutes is an outage (502) too.
- A purge of the Commons data could be undone by a read that was already running: the row
  was deleted, so the generation guard started from zero, and the files were written after
  the files were removed. Pictures are now kept only under a purge counter; BeginArtistPurge
  is called before the purge and a read that started earlier starts again, or is refused if
  the provider is off by then.
- A redirect or an oversized picture from the picture host is a fault of that picture (no
  picture), not an outage, and the pictures are downloaded through a client of their own so
  that one bad file cannot open the breaker of the API calls.
- The author drops the invisible characters that reorder or hide text. Artist pictures are
  decoded only up to 4 million pixels.
- Tests: an outage that ends in a deadline, a build that times out, a purge during a read,
  a redirect and a huge picture from the host, a separate download client.
2026-11-11 22:12:49 +01:00
tgiachi
e752d15536 feat(images): free photos of artists from Wikimedia Commons
- GET and HEAD /artists/{id}/image serve a free picture of an artist as a JPEG
  (size=small 300 px or large 1000 px, token in the query allowed for an <img>), and
  GET /artists/{id}/image/credit gives the author, the licence and the page of the file,
  to be shown next to it.
- New provider "commons" (off by default, no key, contact in the User-Agent), which also
  needs MusicBrainz on. The way to the picture uses ids only, never a name: the artist's
  MusicBrainz id, the Wikidata item MusicBrainz links to it, the file Wikidata names for
  it (P18), Commons for its licence, and a 960 px copy from a Wikimedia picture host.
- Only free licences: public domain, CC0, CC BY and CC BY-SA. Non-commercial,
  no-derivatives, GFDL alone, fair use and unknown licences are refused, since a copy is
  kept. The author is plain text, the licence address is kept only on creativecommons.org,
  and the download only from https thumb.wikimedia.org or upload.wikimedia.org.
- Built on the first request, kept in the data folder: 30 days, or a week when there is no
  free picture; an older copy is served when Commons cannot be reached; a failure is not
  remembered. Credit changes change the ETag.
- Removing the provider's data forgets the records and deletes the files; a read that started
  before it is not saved over it.
- images table gets the credit (migration 0015); the purge reports images.
- Spec, contract test, README updated; the facts of the real APIs are written down.

Closes #41
2026-11-11 22:03:32 +01:00
squidd
d0f98b0dcc Merge pull request 'feat(about): artist descriptions from Wikipedia' (#40) from feat/artist-description into main 2026-11-11 21:45:54 +01:00
tgiachi
762d424816 fix(about): unusable pages fall through, MusicBrainz switch, merged items
- A page that cannot be used (no text, an address off Wikipedia, a redirect that is
  never followed) is now an answer: the chain goes on to the next language and the
  outcome is stored. Before, it was a failure asked about again at every view, and
  redirects counted against the provider's breaker.
- The chain also needs the MusicBrainz provider to be on, since the id goes to it
  with its own contact: nothing is sent to MusicBrainz that the admin did not allow.
  The disclosure in the provider settings, the spec and the README say so.
- A Wikidata item that was merged into another is understood through the target: the
  entity's own id is returned, compared with the page's item and stored. Verified on
  the real API.
- The title shown is the one Wikidata names (with spaces), control characters are
  dropped from the text (PostgreSQL refuses NUL), the text is cut to at most 4000
  characters with the mark included, and a stored description is reported disabled
  when the provider is off.
- A read that started before the provider was switched off does not save its result.
- Tests: the real clients with a redirect and a page without text, merged items,
  MusicBrainz off, switching off during a read.
2026-11-11 21:45:20 +01:00
tgiachi
48cb903115 feat(about): artist descriptions from Wikipedia
- GET /artists/{id}/description shows what Wikipedia says about an artist: a short
  text with its page, a link and the licence (CC BY-SA 4.0).
- New provider "wikipedia" (off by default, no key, contact in the User-Agent, which
  Wikimedia requires). The way to the text is a chain of ids, never a name: the
  artist's MusicBrainz id, the Wikidata item MusicBrainz links to it, the Wikipedia
  page Wikidata names in the first configured language that has one. A page is used
  only if it is an article about that same item.
- [wikipedia] languages in the config (one to five codes of two or three lower case
  letters, checked before they are sent: an unknown site makes Wikidata answer with
  every language).
- Stored 30 days (a day when there was nothing to find), served stale if Wikipedia
  fails, removed with the provider's data (the purge now reports descriptions).
- MusicBrainz client: WikidataID. Wikipedia client for Wikidata and the summary,
  which also reads Wikidata's errors that come with HTTP 200.
- artist_descriptions table (migration 0014, SQLite and PostgreSQL).
- Spec, contract test, README and example config updated.

Closes #39
2026-11-11 21:36:27 +01:00
squidd
c91b88a83e Merge pull request 'feat(images): album covers from my own files' (#38) from feat/album-covers into main 2026-11-11 21:04:12 +01:00