feat(agents): Add artist url and top and similar songs to ListenBrainz agent (#4934)

* feat(agents): Add artist url and top songs to ListenBrainz agent

* add newline at end of file

* respond to some feedback

* add more tests, include more metadata in top songs

* add duration to album info

* add similar artists from labs

* add similar artists and track radio

* fix(client): replace sort with slices.SortFunc for deterministic ordering of recordings with same score

Signed-off-by: Deluan <deluan@navidrome.org>

* fix: typos

Signed-off-by: Deluan <deluan@navidrome.org>

* refactor: use struct literal initialization consistently

Signed-off-by: Deluan <deluan@navidrome.org>

* feat: configurable artist and track algorithms

Signed-off-by: Deluan <deluan@navidrome.org>

* test configuration changes

---------

Signed-off-by: Deluan <deluan@navidrome.org>
Co-authored-by: Deluan Quintão <deluan@navidrome.org>
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Kendall Garner
2026-02-07 18:19:43 +00:00
committed by Deluan
parent 6fb4cd277e
commit 1e37e680d7
12 changed files with 1072 additions and 8 deletions
@@ -0,0 +1,19 @@
[
{
"area": "Japan",
"artist_mbid": "d2a92ee2-27ce-4e71-bfc5-12e34fe8ef56",
"begin_year": 2012,
"mbid": "d2a92ee2-27ce-4e71-bfc5-12e34fe8ef56",
"name": "Mili",
"rels": {
"free streaming": "https://www.deezer.com/artist/56563392",
"official homepage": "http://projectmili.com/",
"purchase for download": "https://recochoku.jp/artist/2000285803/",
"social network": "https://www.instagram.com/projectmili/",
"streaming": "https://tidal.com/artist/3848902",
"wikidata": "https://www.wikidata.org/wiki/Q27309228",
"youtube": "https://www.youtube.com/channel/UCVh47EKH9VLresRqiYi9txw"
},
"type": "Group"
}
]
@@ -0,0 +1,15 @@
[
{
"area": "Japan",
"artist_mbid": "7c2cc610-f998-43ef-a08f-dae3344b8973",
"mbid": "7c2cc610-f998-43ef-a08f-dae3344b8973",
"name": "Feryquitous",
"rels": {
"free streaming": "https://www.deezer.com/artist/9841008",
"purchase for download": "https://itunes.apple.com/jp/artist/id1083544578",
"social network": "https://twitter.com/Feryquitous_",
"youtube": "https://www.youtube.com/channel/UCj2nw_9puY3sJoDbkE-FCQA"
},
"type": "Person"
}
]
+1
View File
@@ -0,0 +1 @@
[{"artist_mbid": "f27ec8db-af05-4f36-916e-3d57f91ecf5e", "name": "Michael Jackson", "comment": "\u201cKing of Pop\u201d", "type": "Person", "gender": "Male", "score": 800, "reference_mbid": "db92a151-1ac2-438b-bc43-b82e149ddd50"}, {"artist_mbid": "7364dea6-ca9a-48e3-be01-b44ad0d19897", "name": "a-ha", "comment": "Norwegian synth\u2010pop band", "type": "Group", "gender": null, "score": 792, "reference_mbid": "db92a151-1ac2-438b-bc43-b82e149ddd50"}]
@@ -0,0 +1 @@
[{"recording_mbid":"12f65dca-de8f-43fe-a65d-f12a02aaadf3","recording_name":"Take On Me","artist_credit_name":"aha","artist_credit_mbids":null,"release_name":"Hunting High and Low","release_mbid":"4ec07fe8-e7c6-3106-a0aa-fdf92f13f7fc","caa_id":13015069966,"caa_release_mbid":"181b9a01-0446-4601-99be-b011ab615631","score":124,"reference_mbid":"8f3471b5-7e6a-48da-86a9-c1c07a0f47ae"},{"recording_mbid":"12f65dca-de8f-43fe-a65d-f12a02aaadf3","recording_name":"Take On Me","artist_credit_name":"aha","artist_credit_mbids":null,"release_name":"Hunting High and Low","release_mbid":"4ec07fe8-e7c6-3106-a0aa-fdf92f13f7fc","caa_id":13015069966,"caa_release_mbid":"181b9a01-0446-4601-99be-b011ab615631","score":124,"reference_mbid":"8f3471b5-7e6a-48da-86a9-c1c07a0f47ae"},{"recording_mbid":"80033c72-aa19-4ba8-9227-afb075fec46e","recording_name":"Wake Me Up Before You GoGo","artist_credit_name":"Wham!","artist_credit_mbids":null,"release_name":"Make It Big","release_mbid":"c143d542-48dc-446b-b523-1762da721638","caa_id":2622532701,"caa_release_mbid":"ec01ad0c-a28f-4d45-bed7-d73014161c38","score":65,"reference_mbid":"8f3471b5-7e6a-48da-86a9-c1c07a0f47ae"},{"recording_mbid":"ef4c6855-949e-4e22-b41e-8e0a2d372d5f","recording_name":"Tainted Love","artist_credit_name":"Soft Cell","artist_credit_mbids":null,"release_name":"Non-Stop Erotic Cabaret","release_mbid":"1acaa870-6e0c-4b6e-9e91-fdec4e5ea4b1","caa_id":1031647403,"caa_release_mbid":"c3367d3a-2f6c-48d1-95c5-c1ee7a49c479","score":61,"reference_mbid":"8f3471b5-7e6a-48da-86a9-c1c07a0f47ae"},{"recording_mbid":"e4b347be-ecb2-44ff-aaa8-3d4c517d7ea5","recording_name":"Everybody Wants to Rule the World","artist_credit_name":"Tears for Fears","artist_credit_mbids":null,"release_name":"Songs From the Big Chair","release_mbid":"21f19b06-81f1-347a-add5-5d0c77696597","caa_id":19682986993,"caa_release_mbid":"9aefc6dd-216a-4271-ada1-d9cf67956f39","score":68,"reference_mbid":"8f3471b5-7e6a-48da-86a9-c1c07a0f47ae"}]
@@ -0,0 +1 @@
[{"recording_mbid":"12f65dca-de8f-43fe-a65d-f12a02aaadf3","recording_name":"Take On Me","artist_credit_name":"aha","artist_credit_mbids":null,"release_name":"Hunting High and Low","release_mbid":"4ec07fe8-e7c6-3106-a0aa-fdf92f13f7fc","caa_id":13015069966,"caa_release_mbid":"181b9a01-0446-4601-99be-b011ab615631","score":124,"reference_mbid":"8f3471b5-7e6a-48da-86a9-c1c07a0f47ae"},{"recording_mbid":"80033c72-aa19-4ba8-9227-afb075fec46e","recording_name":"Wake Me Up Before You GoGo","artist_credit_name":"Wham!","artist_credit_mbids":null,"release_name":"Make It Big","release_mbid":"c143d542-48dc-446b-b523-1762da721638","caa_id":2622532701,"caa_release_mbid":"ec01ad0c-a28f-4d45-bed7-d73014161c38","score":65,"reference_mbid":"8f3471b5-7e6a-48da-86a9-c1c07a0f47ae"}]
+81
View File
@@ -0,0 +1,81 @@
[
{
"artist_mbids": ["d2a92ee2-27ce-4e71-bfc5-12e34fe8ef56"],
"artist_name": "Mili",
"artists": [
{
"artist_credit_name": "Mili",
"artist_mbid": "d2a92ee2-27ce-4e71-bfc5-12e34fe8ef56",
"join_phrase": ""
}
],
"caa_id": 14987576054,
"caa_release_mbid": "38a8f6e1-0e34-4418-a89d-78240a367408",
"length": 211912,
"recording_mbid": "9980309d-3480-4e7e-89ce-fce971a452be",
"recording_name": "world.execute(me);",
"release_color": { "blue": 109, "green": 94, "red": 95 },
"release_mbid": "38a8f6e1-0e34-4418-a89d-78240a367408",
"release_name": "Miracle Milk",
"tags": [
{
"count": 1,
"genre_mbid": "911c7bbb-172d-4df8-9478-dbff4296e791",
"tag": "pop"
},
{
"count": 1,
"genre_mbid": "b739a895-85ed-4ad3-8717-4e9ef5387dd8",
"tag": "dance-pop"
},
{
"count": 1,
"genre_mbid": "9c8ba153-740e-4b88-b7ff-31d004944c95",
"tag": "nerdcore"
},
{
"count": 1,
"genre_mbid": "c4a69842-f891-4569-9506-1882aa5db433",
"tag": "electronic rock"
},
{ "count": 1, "tag": "hackercore" },
{ "count": 1, "tag": "meter:4/4" },
{ "count": 1, "tag": "vocal:true" },
{ "count": 1, "tag": "bpm:130" },
{
"count": 1,
"genre_mbid": "e5bba957-8c91-496a-a675-c6d0c6b51c33",
"tag": "dance"
},
{
"count": 1,
"genre_mbid": "89255676-1f14-4dd8-bbad-fca839d6aff4",
"tag": "electronic"
}
],
"total_listen_count": 19440,
"total_user_count": 1102
},
{
"artist_mbids": ["d2a92ee2-27ce-4e71-bfc5-12e34fe8ef56"],
"artist_name": "Mili",
"artists": [
{
"artist_credit_name": "Mili",
"artist_mbid": "d2a92ee2-27ce-4e71-bfc5-12e34fe8ef56",
"join_phrase": ""
}
],
"caa_id": 31388973421,
"caa_release_mbid": "e58ed9ef-2bc1-4480-9d6d-2d799beb5ba9",
"length": 174000,
"recording_mbid": "afa2c83d-b17f-4029-b9da-790ea9250cf9",
"recording_name": "String Theocracy",
"release_color": { "blue": 92, "green": 147, "red": 164 },
"release_mbid": "d79a38e3-7016-4f39-a31a-f495ce914b8e",
"release_name": "String Theocracy",
"tags": [],
"total_listen_count": 8986,
"total_user_count": 712
}
]