Commit 3176e658 authored by Jean Felder's avatar Jean Felder

acoustid: Keep the recording with the most sources

The recording results are are ordered by submission date (starting
with the most recent). Therefore, the first result can be a false
positive.

By adding the sources keyword to the meta parameter of the query, it
is possible to select the recording with the most submissions.
Update test accordingly.
parent bd6a3ceb
......@@ -50,7 +50,7 @@ netopts = {
acoustid = {}
-- https://acoustid.org/webservice#lookup
ACOUSTID_LOOKUP = "https://api.acoustid.org/v2/lookup?client=%s&meta=recordings+releasegroups+releases&duration=%d&fingerprint=%s"
ACOUSTID_LOOKUP = "https://api.acoustid.org/v2/lookup?client=%s&meta=recordings+releasegroups+releases+sources&duration=%d&fingerprint=%s"
---------------------------------
-- Handlers of Grilo functions --
......@@ -102,11 +102,17 @@ function build_media(results)
local keys = grl.get_requested_keys ()
local record, album, artist
local release_group_id
local sources = 0
if results and #results > 0 and
results[1].recordings and
#results[1].recordings > 0 then
record = results[1].recordings[1]
for _, recording in ipairs(results[1].recordings) do
if recording.sources > sources then
sources = recording.sources
record = recording
end
end
media.title = keys.title and record.title or nil
media.mb_recording_id = keys.mb_recording_id and record.id or nil
......
{"status": "ok", "results": [{"recordings": [{"artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "duration": 443, "releasegroups": [{"artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "type": "Album", "id": "39f2c673-1387-4272-9db9-5f19d48e47cb", "releases": [{"track_count": 13, "releaseevents": [{"date": {"month": 2, "day": 19, "year": 2007}, "country": "IT"}], "country": "IT", "title": "Divenire", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"month": 2, "day": 19, "year": 2007}, "medium_count": 1, "id": "931d4cfa-53c6-41cd-8ab0-a2917a7c1f3e"}], "title": "Divenire"}], "title": "Primavera", "id": "70088e7c-1c01-48cb-9103-ba8b500c68a4"}, {"artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "duration": 444, "releasegroups": [{"releases": [{"track_count": 15, "releaseevents": [{"date": {"year": 2012}, "country": "FR"}], "country": "FR", "title": "Einaudi essentiel", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"year": 2012}, "medium_count": 1, "id": "7a06eb11-6013-4eb8-8aef-a2302ef4ed79"}], "title": "Einaudi essentiel", "secondarytypes": ["Compilation"], "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "type": "Album", "id": "6c42f326-7c15-41d5-851d-e887b544e217"}], "title": "Primavera", "id": "75e72e13-cf02-47f8-a4a7-98b916b3b18c"}, {"artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "duration": 443, "releasegroups": [{"releases": [{"track_count": 40, "releaseevents": [{"date": {"month": 11, "day": 26, "year": 2007}, "country": "GB"}], "country": "GB", "title": "The Number One Classical Album 2008", "artists": [{"id": "89ad4ac3-39f7-470e-963a-56509c546377", "name": "Various Artists"}], "date": {"month": 11, "day": 26, "year": 2007}, "medium_count": 2, "id": "d73e4041-375c-4b9f-8366-46089bca304c"}], "title": "The Number One Classical Album 2008", "secondarytypes": ["Compilation"], "artists": [{"id": "89ad4ac3-39f7-470e-963a-56509c546377", "name": "Various Artists"}], "type": "Album", "id": "ac615d26-df00-3053-9462-7636375603b4"}, {"releases": [{"track_count": 42, "releaseevents": [{"date": {"year": 2007}, "country": "GB"}], "country": "GB", "title": "Classic FM: As Heard on TV", "artists": [{"id": "89ad4ac3-39f7-470e-963a-56509c546377", "name": "Various Artists"}], "date": {"year": 2007}, "medium_count": 2, "id": "c0cb63d4-9a2b-4e11-b44f-b5ed1dda4e36"}], "title": "Classic FM: As Heard on TV", "secondarytypes": ["Compilation"], "artists": [{"id": "89ad4ac3-39f7-470e-963a-56509c546377", "name": "Various Artists"}], "type": "Album", "id": "7e7b5f9c-4959-360b-8ce1-895dacab472a"}, {"artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "type": "Album", "id": "39f2c673-1387-4272-9db9-5f19d48e47cb", "releases": [{"track_count": 12, "releaseevents": [{"date": {"month": 11, "day": 7, "year": 2006}, "country": "XE"}], "country": "XE", "title": "Divenire", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"month": 11, "day": 7, "year": 2006}, "medium_count": 1, "id": "4a796be9-612c-4fec-bac6-70fc1bef8175"}, {"track_count": 12, "releaseevents": [{"date": {"year": 2007}, "country": "US"}], "country": "US", "title": "Divenire", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"year": 2007}, "medium_count": 1, "id": "4694854e-5960-4fa2-b25e-46ad32707a31"}, {"track_count": 15, "releaseevents": [{"date": {"month": 11, "day": 5, "year": 2007}, "country": "IT"}], "country": "IT", "title": "Divenire", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"month": 11, "day": 5, "year": 2007}, "medium_count": 2, "id": "cbea7b36-3edb-392a-b703-f4d0b648deed"}], "title": "Divenire"}], "title": "Primavera", "id": "8f6ac978-95cf-41e8-82fb-043624652e04"}, {"artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "duration": 444, "releasegroups": [{"releases": [{"track_count": 14, "releaseevents": [{"date": {"month": 6, "day": 27, "year": 2011}, "country": "GB"}], "country": "GB", "title": "Islands: Essential Einaudi", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"month": 6, "day": 27, "year": 2011}, "medium_count": 1, "id": "4cec104f-25ac-4f10-9330-1fa67d851213"}, {"track_count": 27, "releaseevents": [{"date": {"month": 6, "day": 27, "year": 2011}, "country": "GB"}], "country": "GB", "title": "Islands: Essential Einaudi", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"month": 6, "day": 27, "year": 2011}, "medium_count": 2, "id": "45a7c1c6-26c0-4b07-8424-c88878de7611"}], "title": "Islands: Essential Einaudi", "secondarytypes": ["Compilation"], "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "type": "Album", "id": "e0901be3-7942-4677-ba24-013c37894344"}], "title": "Primavera", "id": "9efb88b2-618e-4de2-a672-9b3faec0b0c4"}], "score": 0.946137, "id": "843671ef-8722-4700-bd9e-0605f53180f2"}, {"recordings": [{"artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "duration": 444, "releasegroups": [{"releases": [{"track_count": 15, "releaseevents": [{"date": {"year": 2012}, "country": "FR"}], "country": "FR", "title": "Einaudi essentiel", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"year": 2012}, "medium_count": 1, "id": "7a06eb11-6013-4eb8-8aef-a2302ef4ed79"}], "title": "Einaudi essentiel", "secondarytypes": ["Compilation"], "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "type": "Album", "id": "6c42f326-7c15-41d5-851d-e887b544e217"}], "title": "Primavera", "id": "75e72e13-cf02-47f8-a4a7-98b916b3b18c"}, {"artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "duration": 443, "releasegroups": [{"releases": [{"track_count": 40, "releaseevents": [{"date": {"month": 11, "day": 26, "year": 2007}, "country": "GB"}], "country": "GB", "title": "The Number One Classical Album 2008", "artists": [{"id": "89ad4ac3-39f7-470e-963a-56509c546377", "name": "Various Artists"}], "date": {"month": 11, "day": 26, "year": 2007}, "medium_count": 2, "id": "d73e4041-375c-4b9f-8366-46089bca304c"}], "title": "The Number One Classical Album 2008", "secondarytypes": ["Compilation"], "artists": [{"id": "89ad4ac3-39f7-470e-963a-56509c546377", "name": "Various Artists"}], "type": "Album", "id": "ac615d26-df00-3053-9462-7636375603b4"}, {"releases": [{"track_count": 42, "releaseevents": [{"date": {"year": 2007}, "country": "GB"}], "country": "GB", "title": "Classic FM: As Heard on TV", "artists": [{"id": "89ad4ac3-39f7-470e-963a-56509c546377", "name": "Various Artists"}], "date": {"year": 2007}, "medium_count": 2, "id": "c0cb63d4-9a2b-4e11-b44f-b5ed1dda4e36"}], "title": "Classic FM: As Heard on TV", "secondarytypes": ["Compilation"], "artists": [{"id": "89ad4ac3-39f7-470e-963a-56509c546377", "name": "Various Artists"}], "type": "Album", "id": "7e7b5f9c-4959-360b-8ce1-895dacab472a"}, {"artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "type": "Album", "id": "39f2c673-1387-4272-9db9-5f19d48e47cb", "releases": [{"track_count": 12, "releaseevents": [{"date": {"month": 11, "day": 7, "year": 2006}, "country": "XE"}], "country": "XE", "title": "Divenire", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"month": 11, "day": 7, "year": 2006}, "medium_count": 1, "id": "4a796be9-612c-4fec-bac6-70fc1bef8175"}, {"track_count": 12, "releaseevents": [{"date": {"year": 2007}, "country": "US"}], "country": "US", "title": "Divenire", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"year": 2007}, "medium_count": 1, "id": "4694854e-5960-4fa2-b25e-46ad32707a31"}, {"track_count": 15, "releaseevents": [{"date": {"month": 11, "day": 5, "year": 2007}, "country": "IT"}], "country": "IT", "title": "Divenire", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"month": 11, "day": 5, "year": 2007}, "medium_count": 2, "id": "cbea7b36-3edb-392a-b703-f4d0b648deed"}], "title": "Divenire"}], "title": "Primavera", "id": "8f6ac978-95cf-41e8-82fb-043624652e04"}], "score": 0.94462, "id": "2fd40d3c-6e6b-44eb-8d11-446ce5b0ea24"}]}
{"status": "ok", "results": [{"recordings": [{"sources": 1, "artists": [{"id": "e7d8aea3-9c1d-4fe0-b93a-481d545296fc", "name": "Craig Ogden"}], "duration": 414, "releasegroups": [{"releases": [{"track_count": 30, "releaseevents": [{"date": {"year": 2009}, "country": "GB"}], "country": "GB", "title": "Classic FM Summer Guitar", "artists": [{"id": "89ad4ac3-39f7-470e-963a-56509c546377", "name": "Various Artists"}], "date": {"year": 2009}, "medium_count": 2, "id": "5fd10cc8-30e0-48aa-9ba1-19d05b871a75"}], "title": "Classic FM Summer Guitar", "secondarytypes": ["Compilation"], "artists": [{"id": "89ad4ac3-39f7-470e-963a-56509c546377", "name": "Various Artists"}], "type": "Album", "id": "2cde60bc-829c-49af-a62c-e20283167c30"}], "title": "Primavera", "id": "5d72b7d4-d0c4-4d0d-ab7f-3a737075e1c9"}, {"sources": 29, "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "duration": 443, "releasegroups": [{"artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "type": "Album", "id": "39f2c673-1387-4272-9db9-5f19d48e47cb", "releases": [{"track_count": 13, "releaseevents": [{"date": {"month": 2, "day": 19, "year": 2007}, "country": "IT"}], "country": "IT", "title": "Divenire", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"month": 2, "day": 19, "year": 2007}, "medium_count": 1, "id": "931d4cfa-53c6-41cd-8ab0-a2917a7c1f3e"}], "title": "Divenire"}], "title": "Primavera", "id": "70088e7c-1c01-48cb-9103-ba8b500c68a4"}, {"sources": 2, "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "duration": 444, "releasegroups": [{"releases": [{"track_count": 15, "releaseevents": [{"date": {"year": 2012}, "country": "FR"}], "country": "FR", "title": "Einaudi essentiel", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"year": 2012}, "medium_count": 1, "id": "7a06eb11-6013-4eb8-8aef-a2302ef4ed79"}], "title": "Einaudi essentiel", "secondarytypes": ["Compilation"], "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "type": "Album", "id": "6c42f326-7c15-41d5-851d-e887b544e217"}], "title": "Primavera", "id": "75e72e13-cf02-47f8-a4a7-98b916b3b18c"}, {"sources": 1, "artists": [{"id": "509249cd-a9ce-4e9e-b499-45be01bf1be1", "name": "Jeroen van Veen"}], "duration": 444, "releasegroups": [{"artists": [{"joinphrase": "; ", "id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}, {"id": "509249cd-a9ce-4e9e-b499-45be01bf1be1", "name": "Jeroen van Veen"}], "type": "Album", "id": "ef007d8d-93ce-4e90-ab87-220037c0704c", "releases": [{"track_count": 91, "releaseevents": [{"date": {"year": 2013}, "country": "XE"}], "country": "XE", "title": "Waves: The Piano Collection", "artists": [{"joinphrase": "; ", "id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}, {"id": "509249cd-a9ce-4e9e-b499-45be01bf1be1", "name": "Jeroen van Veen"}], "date": {"year": 2013}, "medium_count": 7, "id": "045ad634-44c7-4a81-973c-fc02c896ecd5"}], "title": "Waves: The Piano Collection"}], "title": "Primavera", "id": "7f0873dd-2934-4af3-9616-1a02aec9d4f6"}, {"sources": 290, "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "duration": 443, "releasegroups": [{"releases": [{"track_count": 40, "releaseevents": [{"date": {"month": 11, "day": 26, "year": 2007}, "country": "GB"}], "country": "GB", "title": "The Number One Classical Album 2008", "artists": [{"id": "89ad4ac3-39f7-470e-963a-56509c546377", "name": "Various Artists"}], "date": {"month": 11, "day": 26, "year": 2007}, "medium_count": 2, "id": "d73e4041-375c-4b9f-8366-46089bca304c"}], "title": "The Number One Classical Album 2008", "secondarytypes": ["Compilation"], "artists": [{"id": "89ad4ac3-39f7-470e-963a-56509c546377", "name": "Various Artists"}], "type": "Album", "id": "ac615d26-df00-3053-9462-7636375603b4"}, {"releases": [{"track_count": 42, "releaseevents": [{"date": {"year": 2007}, "country": "GB"}], "country": "GB", "title": "Classic FM: As Heard on TV", "artists": [{"id": "89ad4ac3-39f7-470e-963a-56509c546377", "name": "Various Artists"}], "date": {"year": 2007}, "medium_count": 2, "id": "c0cb63d4-9a2b-4e11-b44f-b5ed1dda4e36"}], "title": "Classic FM: As Heard on TV", "secondarytypes": ["Compilation"], "artists": [{"id": "89ad4ac3-39f7-470e-963a-56509c546377", "name": "Various Artists"}], "type": "Album", "id": "7e7b5f9c-4959-360b-8ce1-895dacab472a"}, {"artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "type": "Album", "id": "39f2c673-1387-4272-9db9-5f19d48e47cb", "releases": [{"track_count": 12, "releaseevents": [{"date": {"month": 11, "day": 7, "year": 2006}, "country": "XE"}], "country": "XE", "title": "Divenire", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"month": 11, "day": 7, "year": 2006}, "medium_count": 1, "id": "4a796be9-612c-4fec-bac6-70fc1bef8175"}, {"track_count": 12, "releaseevents": [{"date": {"year": 2007}, "country": "US"}], "country": "US", "title": "Divenire", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"year": 2007}, "medium_count": 1, "id": "4694854e-5960-4fa2-b25e-46ad32707a31"}, {"track_count": 15, "releaseevents": [{"date": {"month": 11, "day": 5, "year": 2007}, "country": "IT"}], "country": "IT", "title": "Divenire", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"month": 11, "day": 5, "year": 2007}, "medium_count": 2, "id": "cbea7b36-3edb-392a-b703-f4d0b648deed"}], "title": "Divenire"}], "title": "Primavera", "id": "8f6ac978-95cf-41e8-82fb-043624652e04"}, {"sources": 79, "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "duration": 444, "releasegroups": [{"releases": [{"track_count": 14, "releaseevents": [{"date": {"month": 6, "day": 27, "year": 2011}, "country": "GB"}], "country": "GB", "title": "Islands: Essential Einaudi", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"month": 6, "day": 27, "year": 2011}, "medium_count": 1, "id": "4cec104f-25ac-4f10-9330-1fa67d851213"}, {"track_count": 27, "releaseevents": [{"date": {"month": 6, "day": 27, "year": 2011}, "country": "GB"}], "country": "GB", "title": "Islands: Essential Einaudi", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"month": 6, "day": 27, "year": 2011}, "medium_count": 2, "id": "45a7c1c6-26c0-4b07-8424-c88878de7611"}], "title": "Islands: Essential Einaudi", "secondarytypes": ["Compilation"], "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "type": "Album", "id": "e0901be3-7942-4677-ba24-013c37894344"}], "title": "Primavera", "id": "9efb88b2-618e-4de2-a672-9b3faec0b0c4"}], "score": 0.946137, "id": "843671ef-8722-4700-bd9e-0605f53180f2"}, {"recordings": [{"sources": 112, "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "duration": 444, "releasegroups": [{"releases": [{"track_count": 15, "releaseevents": [{"date": {"year": 2012}, "country": "FR"}], "country": "FR", "title": "Einaudi essentiel", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"year": 2012}, "medium_count": 1, "id": "7a06eb11-6013-4eb8-8aef-a2302ef4ed79"}], "title": "Einaudi essentiel", "secondarytypes": ["Compilation"], "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "type": "Album", "id": "6c42f326-7c15-41d5-851d-e887b544e217"}], "title": "Primavera", "id": "75e72e13-cf02-47f8-a4a7-98b916b3b18c"}, {"sources": 1, "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "duration": 443, "releasegroups": [{"releases": [{"track_count": 40, "releaseevents": [{"date": {"month": 11, "day": 26, "year": 2007}, "country": "GB"}], "country": "GB", "title": "The Number One Classical Album 2008", "artists": [{"id": "89ad4ac3-39f7-470e-963a-56509c546377", "name": "Various Artists"}], "date": {"month": 11, "day": 26, "year": 2007}, "medium_count": 2, "id": "d73e4041-375c-4b9f-8366-46089bca304c"}], "title": "The Number One Classical Album 2008", "secondarytypes": ["Compilation"], "artists": [{"id": "89ad4ac3-39f7-470e-963a-56509c546377", "name": "Various Artists"}], "type": "Album", "id": "ac615d26-df00-3053-9462-7636375603b4"}, {"releases": [{"track_count": 42, "releaseevents": [{"date": {"year": 2007}, "country": "GB"}], "country": "GB", "title": "Classic FM: As Heard on TV", "artists": [{"id": "89ad4ac3-39f7-470e-963a-56509c546377", "name": "Various Artists"}], "date": {"year": 2007}, "medium_count": 2, "id": "c0cb63d4-9a2b-4e11-b44f-b5ed1dda4e36"}], "title": "Classic FM: As Heard on TV", "secondarytypes": ["Compilation"], "artists": [{"id": "89ad4ac3-39f7-470e-963a-56509c546377", "name": "Various Artists"}], "type": "Album", "id": "7e7b5f9c-4959-360b-8ce1-895dacab472a"}, {"artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "type": "Album", "id": "39f2c673-1387-4272-9db9-5f19d48e47cb", "releases": [{"track_count": 12, "releaseevents": [{"date": {"month": 11, "day": 7, "year": 2006}, "country": "XE"}], "country": "XE", "title": "Divenire", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"month": 11, "day": 7, "year": 2006}, "medium_count": 1, "id": "4a796be9-612c-4fec-bac6-70fc1bef8175"}, {"track_count": 12, "releaseevents": [{"date": {"year": 2007}, "country": "US"}], "country": "US", "title": "Divenire", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"year": 2007}, "medium_count": 1, "id": "4694854e-5960-4fa2-b25e-46ad32707a31"}, {"track_count": 15, "releaseevents": [{"date": {"month": 11, "day": 5, "year": 2007}, "country": "IT"}], "country": "IT", "title": "Divenire", "artists": [{"id": "fa34b363-79df-434f-a5b8-be4e6898543f", "name": "Ludovico Einaudi"}], "date": {"month": 11, "day": 5, "year": 2007}, "medium_count": 2, "id": "cbea7b36-3edb-392a-b703-f4d0b648deed"}], "title": "Divenire"}], "title": "Primavera", "id": "8f6ac978-95cf-41e8-82fb-043624652e04"}], "score": 0.94462, "id": "2fd40d3c-6e6b-44eb-8d11-446ce5b0ea24"}]}
{"status": "ok", "results": [{"recordings": [{"artists": [{"id": "5ae54dee-4dba-49c0-802a-a3b3b3adfe9b", "name": "Philip Glass"}], "duration": 602, "releasegroups": [{"artists": [{"id": "5ae54dee-4dba-49c0-802a-a3b3b3adfe9b", "name": "Philip Glass"}], "type": "Album", "id": "52f1f9d5-5166-4ceb-9289-6fb1a87f367c", "releases": [{"track_count": 6, "releaseevents": [{"date": {"year": 2012}, "country": "US"}], "country": "US", "title": "The Passion of Ramakrishna", "artists": [{"id": "5ae54dee-4dba-49c0-802a-a3b3b3adfe9b", "name": "Philip Glass"}], "date": {"year": 2012}, "medium_count": 1, "id": "2807def3-7873-4277-b079-c9a963d99993"}], "title": "The Passion of Ramakrishna"}], "title": "Part 2", "id": "298e15a1-b29b-4947-9dca-ec3634f9ebde"}], "score": 0.999604, "id": "b3179c26-c4cb-45da-b750-a5f9211a54da"}]}
{"status": "ok", "results": [{"recordings": [{"sources": 11, "artists": [{"id": "5ae54dee-4dba-49c0-802a-a3b3b3adfe9b", "name": "Philip Glass"}], "duration": 602, "releasegroups": [{"artists": [{"id": "5ae54dee-4dba-49c0-802a-a3b3b3adfe9b", "name": "Philip Glass"}], "type": "Album", "id": "52f1f9d5-5166-4ceb-9289-6fb1a87f367c", "releases": [{"track_count": 6, "releaseevents": [{"date": {"year": 2012}, "country": "US"}], "country": "US", "title": "The Passion of Ramakrishna", "artists": [{"id": "5ae54dee-4dba-49c0-802a-a3b3b3adfe9b", "name": "Philip Glass"}], "date": {"year": 2012}, "medium_count": 1, "id": "2807def3-7873-4277-b079-c9a963d99993"}], "title": "The Passion of Ramakrishna"}], "title": "Part 2", "id": "298e15a1-b29b-4947-9dca-ec3634f9ebde"}], "score": 0.999604, "id": "b3179c26-c4cb-45da-b750-a5f9211a54da"}]}
This source diff could not be displayed because it is too large. You can view the blob instead.
{"status": "ok", "results": [{"recordings": [{"artists": [{"id": "cae4fd51-4d58-4d48-92c1-6198cc2e45ed", "name": "Trombone Shorty"}], "duration": 245, "releasegroups": [{"artists": [{"id": "cae4fd51-4d58-4d48-92c1-6198cc2e45ed", "name": "Trombone Shorty"}], "type": "Album", "id": "c3418122-387b-4477-90cf-e5e6d110e054", "releases": [{"track_count": 14, "releaseevents": [{"date": {"year": 2011}, "country": "US"}], "country": "US", "title": "For True", "artists": [{"id": "cae4fd51-4d58-4d48-92c1-6198cc2e45ed", "name": "Trombone Shorty"}], "date": {"year": 2011}, "medium_count": 1, "id": "567621e3-b80f-4c30-af5f-2ecf0882e94a"}, {"track_count": 14, "releaseevents": [{"date": {"month": 9, "day": 19, "year": 2011}, "country": "GB"}], "country": "GB", "title": "For True", "artists": [{"id": "cae4fd51-4d58-4d48-92c1-6198cc2e45ed", "name": "Trombone Shorty"}], "date": {"month": 9, "day": 19, "year": 2011}, "medium_count": 1, "id": "2af487be-ef25-4076-a729-911a8ee0c590"}, {"track_count": 14, "releaseevents": [{"date": {"month": 9, "day": 16, "year": 2011}, "country": "XE"}], "country": "XE", "title": "For True", "artists": [{"id": "cae4fd51-4d58-4d48-92c1-6198cc2e45ed", "name": "Trombone Shorty"}], "date": {"month": 9, "day": 16, "year": 2011}, "medium_count": 1, "id": "f32ccfd7-bb10-489a-979b-85929fcccf42"}], "title": "For True"}], "title": "Buckjump", "id": "96483bdd-f219-4ae3-a94e-04feeeef22a4"}], "score": 1.0, "id": "b13c6dd3-9e27-4740-8da7-ee766917a8d9"}]}
{"status": "ok", "results": [{"recordings": [{"sources": 60, "artists": [{"id": "cae4fd51-4d58-4d48-92c1-6198cc2e45ed", "name": "Trombone Shorty"}], "duration": 245, "releasegroups": [{"artists": [{"id": "cae4fd51-4d58-4d48-92c1-6198cc2e45ed", "name": "Trombone Shorty"}], "type": "Album", "id": "c3418122-387b-4477-90cf-e5e6d110e054", "releases": [{"track_count": 14, "releaseevents": [{"date": {"year": 2011}, "country": "US"}], "country": "US", "title": "For True", "artists": [{"id": "cae4fd51-4d58-4d48-92c1-6198cc2e45ed", "name": "Trombone Shorty"}], "date": {"year": 2011}, "medium_count": 1, "id": "567621e3-b80f-4c30-af5f-2ecf0882e94a"}, {"track_count": 14, "releaseevents": [{"date": {"month": 9, "day": 19, "year": 2011}, "country": "GB"}], "country": "GB", "title": "For True", "artists": [{"id": "cae4fd51-4d58-4d48-92c1-6198cc2e45ed", "name": "Trombone Shorty"}], "date": {"month": 9, "day": 19, "year": 2011}, "medium_count": 1, "id": "2af487be-ef25-4076-a729-911a8ee0c590"}, {"track_count": 14, "releaseevents": [{"date": {"month": 9, "day": 16, "year": 2011}, "country": "XE"}], "country": "XE", "title": "For True", "artists": [{"id": "cae4fd51-4d58-4d48-92c1-6198cc2e45ed", "name": "Trombone Shorty"}], "date": {"month": 9, "day": 16, "year": 2011}, "medium_count": 1, "id": "f32ccfd7-bb10-489a-979b-85929fcccf42"}], "title": "For True"}], "title": "Buckjump", "id": "96483bdd-f219-4ae3-a94e-04feeeef22a4"}], "score": 1.0, "id": "b13c6dd3-9e27-4740-8da7-ee766917a8d9"}]}
......@@ -3,13 +3,13 @@ version=1
ignored-parameters=fingerprint
# test_lua_acoustid
[https://api.acoustid.org/v2/lookup?client=ACOUSTID_TEST_MOCK_API_KEY&meta=recordings+releasegroups+releases&duration=445]
[https://api.acoustid.org/v2/lookup?client=ACOUSTID_TEST_MOCK_API_KEY&meta=recordings+releasegroups+releases+sources&duration=445]
data = acoustid_ludovico_einaudi_primavera.txt
[https://api.acoustid.org/v2/lookup?client=ACOUSTID_TEST_MOCK_API_KEY&meta=recordings+releasegroups+releases&duration=160]
[https://api.acoustid.org/v2/lookup?client=ACOUSTID_TEST_MOCK_API_KEY&meta=recordings+releasegroups+releases+sources&duration=160]
data = acoustid_norah_jones_chasing_pirates.txt
[https://api.acoustid.org/v2/lookup?client=ACOUSTID_TEST_MOCK_API_KEY&meta=recordings+releasegroups+releases&duration=243]
[https://api.acoustid.org/v2/lookup?client=ACOUSTID_TEST_MOCK_API_KEY&meta=recordings+releasegroups+releases+sources&duration=243]
data = acoustid_trombone_shorty_buckjump.txt
[https://api.acoustid.org/v2/lookup?client=ACOUSTID_TEST_MOCK_API_KEY&meta=recordings+releasegroups+releases&duration=601]
[https://api.acoustid.org/v2/lookup?client=ACOUSTID_TEST_MOCK_API_KEY&meta=recordings+releasegroups+releases+sources&duration=601]
data = acoustid_philip_glass_the_passion_of.txt
[https://api.acoustid.org/v2/lookup?client=ACOUSTID_TEST_MOCK_API_KEY&meta=recordings+releasegroups+releases&duration=385]
[https://api.acoustid.org/v2/lookup?client=ACOUSTID_TEST_MOCK_API_KEY&meta=recordings+releasegroups+releases+sources&duration=385]
data = acoustid_radiohead_paranoid_android.txt
......@@ -123,9 +123,9 @@ test_resolve_fingerprint (void)
} audios[] = {
{ FINGERPRINT_LUDOVICO_EI, 445,
"fa34b363-79df-434f-a5b8-be4e6898543f", "Ludovico Einaudi",
"39f2c673-1387-4272-9db9-5f19d48e47cb", "Divenire",
"70088e7c-1c01-48cb-9103-ba8b500c68a4", "Primavera",
"931d4cfa-53c6-41cd-8ab0-a2917a7c1f3e" },
"ac615d26-df00-3053-9462-7636375603b4", "The Number One Classical Album 2008",
"8f6ac978-95cf-41e8-82fb-043624652e04", "Primavera",
"d73e4041-375c-4b9f-8366-46089bca304c" },
{ FINGERPRINT_NORAH_JONES, 160,
"985c709c-7771-4de3-9024-7bda29ebe3f9", "Norah Jones",
"f5cffa96-262c-49af-9747-3f04a1d42c78", "\u00d63 Greatest Hits 49",
......@@ -143,9 +143,9 @@ test_resolve_fingerprint (void)
"2807def3-7873-4277-b079-c9a963d99993" },
{ FINGERPRINT_RADIOHEAD_PA, 385,
"a74b1b7f-71a5-4011-9441-d0b5e4122711", "Radiohead",
"aaf960f9-bfe9-3130-9f14-af412880c360", "Superhits of the 90's",
"7a7c3a58-288b-4725-93af-3b0b4fcd3870", "Paranoid Android",
"7c095f83-fbf8-4d88-9228-8af138ab6f12",
"dd02a722-bb7f-4771-9a5b-681f5556ce71", "3X plus de bruit!",
"9f9cf187-d6f9-437f-9d98-d59cdbd52757", "Paranoid Android",
"67016a2b-118d-483d-9e36-49080ae43df4",
},
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment