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
This commit is contained in:
parent
c91b88a83e
commit
48cb903115
1 changed files with 2124 additions and 19 deletions
|
|
@ -33,6 +33,9 @@ half_life_days = 90 # an old listen weighs half as much after this many
|
|||
# data_dir = "data" # files Sonda makes (covers); built from your music, no backup needed.
|
||||
# Default: "data" next to the SQLite database.
|
||||
|
||||
[wikipedia]
|
||||
languages = ["it", "en"] # descriptions of artists: the first language that has a page wins
|
||||
|
||||
[scoring] # weights of the parts of a Discover score (only their proportions matter)
|
||||
weight_affinity = 0.40 # similar to the artists I like
|
||||
weight_genre = 0.25 # tags close to the tags I like
|
||||
|
|
|
|||
Loading…
Reference in a new issue