diff --git a/.gitignore b/.gitignore index 2a5f9ef..2121175 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ .vscode __pycache__ -config.ini \ No newline at end of file +config.ini +*.json +*.log \ No newline at end of file diff --git a/ListenBrainz.py b/ListenBrainz.py index 119d205..6759e78 100644 --- a/ListenBrainz.py +++ b/ListenBrainz.py @@ -1,10 +1,11 @@ from dataclasses import dataclass - +from datetime import datetime @dataclass class ListenBrainzScrobble: artist_name: str release_name: str track_name: str + listened_at: datetime # Optional artist_mbids: list[str] | None = None @@ -56,5 +57,6 @@ class ListenBrainzScrobble: artist_name=data['artist_name'], release_name=data['release_name'], track_name=data['track_name'], + listened_at=datetime.fromtimestamp(data['listened_at']), **{key:(add_info[key] if key in add_info else None) for key in additional_info_keys} ) \ No newline at end of file diff --git a/MusicDatabase.py b/MusicDatabase.py index f3b4341..97c0e1f 100644 --- a/MusicDatabase.py +++ b/MusicDatabase.py @@ -97,7 +97,10 @@ def execute_insertion_query(query_path: str, *args) -> int | None: return cur.lastrowid def insert_listen_event(song_id: int, user_id: int, date: int | datetime.datetime, time: int): - pass + if isinstance(date, datetime.datetime): + date = int(date.timestamp()) + + execute_insertion_query('sql/insert_listen_event.sql', song_id, user_id, date, time) def search_song_mbid(mbid: str) -> Song | None: results: list = execute_query('sql/get_song_by_mbid.sql', mbid) @@ -199,5 +202,5 @@ def search_artist_by_id(id: int) -> Artist | None: return Artist.from_row(results[0]) if results else None -def insert_artist(name: str, mbid: str | None = None, icon_url: str | None = None) -> None: +def insert_artist(name: str, mbid: str | None = None, icon_url: str | None = None) -> Artist | None: return search_artist_by_id(execute_insertion_query('sql/insert_artist.sql', name, mbid, icon_url)) diff --git a/listen-brain-request.json b/listen-brain-request.json deleted file mode 100644 index f0d0776..0000000 --- a/listen-brain-request.json +++ /dev/null @@ -1,4908 +0,0 @@ -{ - "recording-list": [ - { - "id": "0484f8a6-5675-430a-a07e-ff79907590fd", - "ext:score": "100", - "title": "Avril 14th, Reversed Music Not Audio.", - "length": "132000", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin", - "alias-list": [ - { - "locale": "ja", - "sort-name": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3", - "type": "Artist name", - "alias": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3" - }, - { - "sort-name": "AphexTwin", - "alias": "AphexTwin" - }, - { - "sort-name": "Aphex Twins", - "alias": "Aphex Twins" - }, - { - "sort-name": "aphex+twin", - "alias": "aphex+twin" - }, - { - "sort-name": "Aphex Twin, The", - "type": "Artist name", - "alias": "The Aphex Twin" - }, - { - "sort-name": "Aphex Twin", - "type": "Artist name", - "alias": "Aphex Twin" - } - ] - } - } - ], - "release-list": [ - { - "id": "9dd65019-6474-45af-a9e7-ea8d2866f217", - "title": "Drukqs", - "status": "Official", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2018-12-09", - "country": "XW", - "release-event-list": [ - { - "date": "2018-12-09", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "bb800a88-044a-4e75-801f-479d5e3e76f2", - "number": "33", - "title": "avril 14th reversed music not audio [re-recorded 2009 Nagra]", - "length": "132000", - "track_or_recording_length": "132000" - } - ], - "track-count": 34 - } - ], - "medium-track-count": 34, - "medium-count": 1, - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "f1e1e043-f0e7-44e8-a71e-d67efd6b8279", - "title": "Drukqs", - "status": "Official", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2018-12-04", - "country": "XW", - "release-event-list": [ - { - "date": "2018-12-04", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "2df877ca-a750-4b15-a531-5a611c5dd117", - "number": "33", - "title": "avril 14th reversed music not audio [re-recorded 2009 Nagra]", - "length": "132000", - "track_or_recording_length": "132000" - } - ], - "track-count": 33 - } - ], - "medium-track-count": 33, - "medium-count": 1, - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "e527b82a-edfb-4e81-8cf7-1a7dcd7cd29c", - "title": "Drukqs", - "status": "Official", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2018-12-03", - "country": "XW", - "release-event-list": [ - { - "date": "2018-12-03", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "72152898-35ab-47b6-a402-dc25fd82f4c7", - "number": "33", - "title": "avril 14th reversed music not audio [re-recorded 2009 Nagra]", - "length": "132000", - "track_or_recording_length": "132000" - } - ], - "track-count": 34 - } - ], - "medium-track-count": 34, - "medium-count": 1, - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "84896220-3be0-4826-aa9c-5b2475128370", - "title": "[user48736353001]", - "status": "Bootleg", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "2cc89ef8-1878-400b-8d44-a780cc4f022b", - "type": "Other", - "title": "[user48736353001]", - "primary-type": "Other", - "secondary-type-list": [ - "Compilation" - ] - }, - "date": "2015-05-08", - "country": "XW", - "release-event-list": [ - { - "date": "2015-05-08", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "739b7d95-b1dd-4602-a5c3-9202a86224fb", - "number": "266", - "title": "Avril 14th, Reversed Music Not Audio.", - "length": "132000", - "track_or_recording_length": "132000" - } - ], - "track-count": 275 - } - ], - "medium-track-count": 275, - "medium-count": 1, - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "3c8a59b1-a749-4894-946c-9897c64053bf", - "title": "SYROBONKERS! Interview Trax", - "status": "Promotion", - "artist-credit": [ - { - "name": "AFX", - "artist": { - "id": "87225a21-c925-41cd-852f-be4b052d0824", - "name": "AFX", - "sort-name": "AFX", - "disambiguation": "Aphex Twin" - } - } - ], - "release-group": { - "id": "0122fe9d-ff1d-4c59-b177-3ea544f481d0", - "type": "Other", - "title": "SYROBONKERS! Interview Trax", - "primary-type": "Other" - }, - "date": "2014-11-03", - "country": "XW", - "release-event-list": [ - { - "date": "2014-11-03", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "a5204ca8-02d5-4f2d-b727-e3a13256d0cd", - "number": "15", - "title": "Avril 14th Reversed Music Not Audio", - "length": "132000", - "track_or_recording_length": "132000" - } - ], - "track-count": 55 - } - ], - "medium-track-count": 55, - "medium-count": 1, - "artist-credit-phrase": "AFX" - } - ], - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "2dd2d655-811a-4dda-83b2-d3491da3119e", - "ext:score": "88", - "title": "avril 14th half speed alternative version [re-recorded 2009 Nagra]", - "length": "307000", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin", - "alias-list": [ - { - "locale": "ja", - "sort-name": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3", - "type": "Artist name", - "alias": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3" - }, - { - "sort-name": "AphexTwin", - "alias": "AphexTwin" - }, - { - "sort-name": "Aphex Twins", - "alias": "Aphex Twins" - }, - { - "sort-name": "aphex+twin", - "alias": "aphex+twin" - }, - { - "sort-name": "Aphex Twin, The", - "type": "Artist name", - "alias": "The Aphex Twin" - }, - { - "sort-name": "Aphex Twin", - "type": "Artist name", - "alias": "Aphex Twin" - } - ] - } - } - ], - "release-list": [ - { - "id": "9dd65019-6474-45af-a9e7-ea8d2866f217", - "title": "Drukqs", - "status": "Official", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2018-12-09", - "country": "XW", - "release-event-list": [ - { - "date": "2018-12-09", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "b4ac2b29-6be6-4aeb-b659-9cbb322c5111", - "number": "32", - "title": "avril 14th half speed alternative version [re-recorded 2009 Nagra]", - "length": "307000", - "track_or_recording_length": "307000" - } - ], - "track-count": 34 - } - ], - "medium-track-count": 34, - "medium-count": 1, - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "f1e1e043-f0e7-44e8-a71e-d67efd6b8279", - "title": "Drukqs", - "status": "Official", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2018-12-04", - "country": "XW", - "release-event-list": [ - { - "date": "2018-12-04", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "fbd5d7bc-2d03-409f-9dca-3517209784c7", - "number": "32", - "title": "avril 14th half speed alternative version [re-recorded 2009 Nagra]", - "length": "307000", - "track_or_recording_length": "307000" - } - ], - "track-count": 33 - } - ], - "medium-track-count": 33, - "medium-count": 1, - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "e527b82a-edfb-4e81-8cf7-1a7dcd7cd29c", - "title": "Drukqs", - "status": "Official", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2018-12-03", - "country": "XW", - "release-event-list": [ - { - "date": "2018-12-03", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "efb13a5c-c57b-4d76-af17-8e2a4baee7a4", - "number": "32", - "title": "avril 14th half speed alternative version [re-recorded 2009 Nagra]", - "length": "307000", - "track_or_recording_length": "307000" - } - ], - "track-count": 34 - } - ], - "medium-track-count": 34, - "medium-count": 1, - "artist-credit-phrase": "Aphex Twin" - } - ], - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "6e92d975-39da-42c1-9bd6-c3f47e43e940", - "ext:score": "70", - "title": "Avril 14th", - "length": "109040", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin", - "alias-list": [ - { - "sort-name": "aphex+twin", - "alias": "aphex+twin" - }, - { - "sort-name": "Aphex Twin, The", - "type": "Artist name", - "alias": "The Aphex Twin" - }, - { - "sort-name": "Aphex Twin", - "type": "Artist name", - "alias": "Aphex Twin" - }, - { - "sort-name": "AphexTwin", - "alias": "AphexTwin" - }, - { - "locale": "ja", - "sort-name": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3", - "type": "Artist name", - "alias": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3" - }, - { - "sort-name": "Aphex Twins", - "alias": "Aphex Twins" - } - ] - } - } - ], - "release-list": [ - { - "id": "29268e18-7ff1-40bb-974c-b0d21a2926aa", - "title": "Mond\u00e4n Vol.2", - "status": "Official", - "artist-credit": [ - { - "name": "Various Artists", - "artist": { - "id": "89ad4ac3-39f7-470e-963a-56509c546377", - "name": "Various Artists", - "sort-name": "Various Artists", - "disambiguation": "add compilations to this artist" - } - } - ], - "release-group": { - "id": "b96fd810-3b41-42d9-a94b-fe6da8d45fff", - "type": "Compilation", - "title": "Mond\u00e4n Vol.2", - "primary-type": "Album", - "secondary-type-list": [ - "DJ-mix", - "Compilation" - ] - }, - "date": "2002", - "country": "DE", - "release-event-list": [ - { - "date": "2002", - "area": { - "id": "85752fda-13c4-31a3-bee5-0e5cb1f51dad", - "name": "Germany", - "sort-name": "Germany", - "iso-3166-1-code-list": [ - "DE" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "CD", - "track-list": [ - { - "id": "e2c77d20-53f4-373f-ac58-bb6f43e7f2d4", - "number": "14", - "title": "Avril 14th", - "length": "109040", - "track_or_recording_length": "109040" - } - ], - "track-count": 20 - } - ], - "medium-track-count": 20, - "medium-count": 1, - "artist-credit-phrase": "Various Artists" - } - ], - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "610d045a-d29b-4436-b43d-3d017c312f7c", - "ext:score": "70", - "title": "Avril 14th", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin", - "alias-list": [ - { - "sort-name": "Aphex Twin", - "type": "Artist name", - "alias": "Aphex Twin" - }, - { - "sort-name": "Aphex Twin, The", - "type": "Artist name", - "alias": "The Aphex Twin" - }, - { - "sort-name": "AphexTwin", - "alias": "AphexTwin" - }, - { - "sort-name": "Aphex Twins", - "alias": "Aphex Twins" - }, - { - "sort-name": "aphex+twin", - "alias": "aphex+twin" - }, - { - "locale": "ja", - "sort-name": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3", - "type": "Artist name", - "alias": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3" - } - ] - } - } - ], - "release-list": [ - { - "id": "c289c655-ffbf-4032-a305-310745bd7e23", - "title": "Dinner for Two", - "status": "Official", - "artist-credit": [ - { - "name": "Various Artists", - "artist": { - "id": "89ad4ac3-39f7-470e-963a-56509c546377", - "name": "Various Artists", - "sort-name": "Various Artists", - "disambiguation": "add compilations to this artist" - } - } - ], - "release-group": { - "id": "34a7681f-a9f2-494c-a6a3-3a1c737b2911", - "type": "Compilation", - "title": "Dinner for Two", - "primary-type": "Album", - "secondary-type-list": [ - "Compilation" - ] - }, - "date": "2012", - "country": "US", - "release-event-list": [ - { - "date": "2012", - "area": { - "id": "489ce91b-6658-3307-9877-795b68554c98", - "name": "United States", - "sort-name": "United States", - "iso-3166-1-code-list": [ - "US" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "CD", - "track-list": [ - { - "id": "c9c47c9c-999f-4aec-814a-95c01c524d68", - "number": "1", - "title": "Avril 14th" - } - ], - "track-count": 16 - } - ], - "medium-track-count": 16, - "medium-count": 1, - "artist-credit-phrase": "Various Artists" - } - ], - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "aaf425e5-05e3-4821-8b5a-48947bf66365", - "ext:score": "70", - "title": "Avril 14th", - "length": "115000", - "disambiguation": "part of \u201cLane 8 Winter 2018 Mixtape\u201d DJ\u2010mix", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin", - "alias-list": [ - { - "sort-name": "aphex+twin", - "alias": "aphex+twin" - }, - { - "sort-name": "Aphex Twin", - "type": "Artist name", - "alias": "Aphex Twin" - }, - { - "sort-name": "Aphex Twins", - "alias": "Aphex Twins" - }, - { - "sort-name": "AphexTwin", - "alias": "AphexTwin" - }, - { - "locale": "ja", - "sort-name": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3", - "type": "Artist name", - "alias": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3" - }, - { - "sort-name": "Aphex Twin, The", - "type": "Artist name", - "alias": "The Aphex Twin" - } - ] - } - } - ], - "release-list": [ - { - "id": "f9cb8904-666d-4436-82c6-60c9675f1d20", - "title": "Lane 8 Winter 2018 Mixtape", - "status": "Official", - "artist-credit": [ - { - "name": "Lane 8", - "artist": { - "id": "bd052b81-353a-4bce-8cd8-72ba9d4ce414", - "name": "Lane 8", - "sort-name": "Lane 8" - } - } - ], - "release-group": { - "id": "b8c9341a-6772-43db-b426-557580fed59f", - "type": "Compilation", - "title": "Winter 2018 Mixtape", - "primary-type": "Album", - "secondary-type-list": [ - "Compilation", - "DJ-mix" - ] - }, - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "92a96d6a-8451-4d03-8f6d-42396194ab92", - "number": "61", - "title": "Avril 14th", - "length": "115000", - "track_or_recording_length": "115000" - } - ], - "track-count": 61 - } - ], - "medium-track-count": 61, - "medium-count": 1, - "artist-credit-phrase": "Lane 8" - } - ], - "isrc-list": [ - "US23A1524552" - ], - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "6533ac16-af4c-45d2-83d6-e14db91be928", - "ext:score": "70", - "title": "Avril, 14th", - "length": "126000", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin", - "alias-list": [ - { - "sort-name": "AphexTwin", - "alias": "AphexTwin" - }, - { - "sort-name": "Aphex Twin, The", - "type": "Artist name", - "alias": "The Aphex Twin" - }, - { - "sort-name": "Aphex Twin", - "type": "Artist name", - "alias": "Aphex Twin" - }, - { - "locale": "ja", - "sort-name": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3", - "type": "Artist name", - "alias": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3" - }, - { - "sort-name": "aphex+twin", - "alias": "aphex+twin" - }, - { - "sort-name": "Aphex Twins", - "alias": "Aphex Twins" - } - ] - } - } - ], - "release-list": [ - { - "id": "0e0949c2-17fc-4917-8b39-2d2983e9ddea", - "title": "Spex CD #13", - "status": "Official", - "artist-credit": [ - { - "name": "Various Artists", - "artist": { - "id": "89ad4ac3-39f7-470e-963a-56509c546377", - "name": "Various Artists", - "sort-name": "Various Artists", - "disambiguation": "add compilations to this artist" - } - } - ], - "release-group": { - "id": "02509b93-3605-4322-9568-23062001380e", - "type": "Compilation", - "title": "Spex CD #13", - "primary-type": "Album", - "secondary-type-list": [ - "Compilation" - ] - }, - "date": "2001-11", - "country": "DE", - "release-event-list": [ - { - "date": "2001-11", - "area": { - "id": "85752fda-13c4-31a3-bee5-0e5cb1f51dad", - "name": "Germany", - "sort-name": "Germany", - "iso-3166-1-code-list": [ - "DE" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "CD", - "track-list": [ - { - "id": "6364a803-12d8-4a8f-86af-d3d52326d517", - "number": "1", - "title": "Avril, 14th", - "length": "126000", - "track_or_recording_length": "126000" - } - ], - "track-count": 14 - } - ], - "medium-track-count": 14, - "medium-count": 1, - "artist-credit-phrase": "Various Artists" - } - ], - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "856d081d-320b-4b6b-8dac-4427e308296d", - "ext:score": "70", - "title": "Avril 14th", - "length": "125000", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin", - "alias-list": [ - { - "sort-name": "Aphex Twin, The", - "type": "Artist name", - "alias": "The Aphex Twin" - }, - { - "sort-name": "Aphex Twin", - "type": "Artist name", - "alias": "Aphex Twin" - }, - { - "locale": "ja", - "sort-name": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3", - "type": "Artist name", - "alias": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3" - }, - { - "sort-name": "aphex+twin", - "alias": "aphex+twin" - }, - { - "sort-name": "Aphex Twins", - "alias": "Aphex Twins" - }, - { - "sort-name": "AphexTwin", - "alias": "AphexTwin" - } - ] - } - } - ], - "release-list": [ - { - "id": "c8ce01cc-06e2-4f86-9b21-253c5b3e31c2", - "title": "Classically Chilled", - "status": "Official", - "artist-credit": [ - { - "name": "Various Artists", - "artist": { - "id": "89ad4ac3-39f7-470e-963a-56509c546377", - "name": "Various Artists", - "sort-name": "Various Artists", - "disambiguation": "add compilations to this artist" - } - } - ], - "release-group": { - "id": "a5e2b055-9754-47f5-91e7-bf4c9eb19a2d", - "type": "Compilation", - "title": "Classically Chilled", - "primary-type": "Album", - "secondary-type-list": [ - "Compilation" - ] - }, - "date": "2015-07-10", - "country": "XW", - "release-event-list": [ - { - "date": "2015-07-10", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "01284132-34ce-4123-98b5-9a6ac8a05ae6", - "number": "26", - "title": "Avril 14th", - "length": "118893", - "track_or_recording_length": "118893" - } - ], - "track-count": 40 - } - ], - "medium-track-count": 40, - "medium-count": 1, - "artist-credit-phrase": "Various Artists" - }, - { - "id": "facbe59c-6bf7-45c6-bb0c-85aaba8d8670", - "title": "Drukqs", - "status": "Official", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2001-10-22", - "country": "GB", - "release-event-list": [ - { - "date": "2001-10-22", - "area": { - "id": "8a754a16-0027-3a29-b6d7-2b40ea0481ed", - "name": "United Kingdom", - "sort-name": "United Kingdom", - "iso-3166-1-code-list": [ - "GB" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "CD", - "track-list": [ - { - "id": "1626aad9-b10f-3da6-bdac-def4d9518e00", - "number": "9", - "title": "Avril 14th", - "length": "125533", - "track_or_recording_length": "125533" - } - ], - "track-count": 15 - } - ], - "medium-track-count": 30, - "medium-count": 2, - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "2d00a3a5-362f-48f8-92f2-a9c42ed1f8da", - "title": "Classically Chilled", - "status": "Official", - "artist-credit": [ - { - "name": "Various Artists", - "artist": { - "id": "89ad4ac3-39f7-470e-963a-56509c546377", - "name": "Various Artists", - "sort-name": "Various Artists", - "disambiguation": "add compilations to this artist" - } - } - ], - "release-group": { - "id": "a5e2b055-9754-47f5-91e7-bf4c9eb19a2d", - "type": "Compilation", - "title": "Classically Chilled", - "primary-type": "Album", - "secondary-type-list": [ - "Compilation" - ] - }, - "date": "2015-07", - "country": "XE", - "release-event-list": [ - { - "date": "2015-07", - "area": { - "id": "89a675c2-3e37-3518-b83c-418bad59a85a", - "name": "Europe", - "sort-name": "Europe", - "iso-3166-1-code-list": [ - "XE" - ] - } - } - ], - "medium-list": [ - { - "position": "2", - "format": "CD", - "track-list": [ - { - "id": "9e9fda4b-1973-4df6-b336-999a51bfc483", - "number": "6", - "title": "Avril 14th", - "length": "118000", - "track_or_recording_length": "118000" - } - ], - "track-count": 20 - } - ], - "medium-track-count": 40, - "medium-count": 2, - "artist-credit-phrase": "Various Artists" - }, - { - "id": "88fdf3d0-6f82-4947-9af2-e1cb793b94fc", - "title": "Marie Antoinette", - "status": "Official", - "artist-credit": [ - { - "name": "Various Artists", - "artist": { - "id": "89ad4ac3-39f7-470e-963a-56509c546377", - "name": "Various Artists", - "sort-name": "Various Artists", - "disambiguation": "add compilations to this artist" - } - } - ], - "release-group": { - "id": "e225eff0-b28b-3418-b6d7-d574c5432ef7", - "type": "Soundtrack", - "title": "Marie Antoinette", - "primary-type": "Album", - "secondary-type-list": [ - "Soundtrack" - ] - }, - "date": "2006-10-10", - "country": "US", - "release-event-list": [ - { - "date": "2006-10-10", - "area": { - "id": "489ce91b-6658-3307-9877-795b68554c98", - "name": "United States", - "sort-name": "United States", - "iso-3166-1-code-list": [ - "US" - ] - } - } - ], - "medium-list": [ - { - "position": "2", - "format": "CD", - "track-list": [ - { - "id": "7f1c4044-e42b-3214-bd94-7a988e5ed6b3", - "number": "9", - "title": "Avril 14th", - "length": "118826", - "track_or_recording_length": "118826" - } - ], - "track-count": 14 - } - ], - "medium-track-count": 26, - "medium-count": 2, - "artist-credit-phrase": "Various Artists" - }, - { - "id": "218289b6-0756-44c0-b6f7-eeec3d355dab", - "title": "Exclusives!", - "status": "Promotion", - "artist-credit": [ - { - "name": "Various Artists", - "artist": { - "id": "89ad4ac3-39f7-470e-963a-56509c546377", - "name": "Various Artists", - "sort-name": "Various Artists", - "disambiguation": "add compilations to this artist" - } - } - ], - "release-group": { - "id": "4a190a69-5122-3f92-bf33-79ef82d212a7", - "type": "Compilation", - "title": "Exclusives!", - "primary-type": "Album", - "secondary-type-list": [ - "Compilation" - ] - }, - "date": "2001-10-02", - "country": "GB", - "release-event-list": [ - { - "date": "2001-10-02", - "area": { - "id": "8a754a16-0027-3a29-b6d7-2b40ea0481ed", - "name": "United Kingdom", - "sort-name": "United Kingdom", - "iso-3166-1-code-list": [ - "GB" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "CD", - "track-list": [ - { - "id": "5ee1ad0f-4896-3c40-9086-bda25740ab74", - "number": "5", - "title": "Avril 14th", - "length": "118333", - "track_or_recording_length": "118333" - } - ], - "track-count": 16 - } - ], - "medium-track-count": 16, - "medium-count": 1, - "artist-credit-phrase": "Various Artists" - }, - { - "id": "c6a30c75-db75-4f69-9fdf-c9bb9953b733", - "title": "Marie Antoinette", - "status": "Official", - "artist-credit": [ - { - "name": "Various Artists", - "artist": { - "id": "89ad4ac3-39f7-470e-963a-56509c546377", - "name": "Various Artists", - "sort-name": "Various Artists", - "disambiguation": "add compilations to this artist" - } - } - ], - "release-group": { - "id": "e225eff0-b28b-3418-b6d7-d574c5432ef7", - "type": "Soundtrack", - "title": "Marie Antoinette", - "primary-type": "Album", - "secondary-type-list": [ - "Soundtrack" - ] - }, - "date": "2019-03-29", - "country": "JO", - "release-event-list": [ - { - "date": "2019-03-29", - "area": { - "id": "2e40127e-0b8a-3a01-bfbc-58c7fcdba532", - "name": "Jordan", - "sort-name": "Jordan", - "iso-3166-1-code-list": [ - "JO" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "92d52542-3363-351c-a8b6-d991e0bccb8f", - "name": "Kazakhstan", - "sort-name": "Kazakhstan", - "iso-3166-1-code-list": [ - "KZ" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "f03f2625-dc7d-38b2-a058-4e9ca0e10424", - "name": "Kuwait", - "sort-name": "Kuwait", - "iso-3166-1-code-list": [ - "KW" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "66eb3e73-d69e-3581-9a23-a73b4c64c8dd", - "name": "Latvia", - "sort-name": "Latvia", - "iso-3166-1-code-list": [ - "LV" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "8138206e-5786-3f86-a53b-19a7303e7419", - "name": "Lebanon", - "sort-name": "Lebanon", - "iso-3166-1-code-list": [ - "LB" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "d2007481-eefe-37c0-be71-2256dfe148cb", - "name": "Liechtenstein", - "sort-name": "Liechtenstein", - "iso-3166-1-code-list": [ - "LI" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "0785dc14-96af-3dc4-bde4-dcdfc2e2d0d6", - "name": "Lithuania", - "sort-name": "Lithuania", - "iso-3166-1-code-list": [ - "LT" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "563d21b7-4a8e-35e2-83a7-7804baefbfa7", - "name": "Luxembourg", - "sort-name": "Luxembourg", - "iso-3166-1-code-list": [ - "LU" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "fa75cdb9-cbc4-35de-8bf4-a21e7b811484", - "name": "North Macedonia", - "sort-name": "North Macedonia", - "iso-3166-1-code-list": [ - "MK" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "305d19c7-c040-349c-8d5f-6ac75d2d2a09", - "name": "Malaysia", - "sort-name": "Malaysia", - "iso-3166-1-code-list": [ - "MY" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "050c94f7-1413-3a34-bb90-4a94f3bb2084", - "name": "Malta", - "sort-name": "Malta", - "iso-3166-1-code-list": [ - "MT" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "3e08b2cd-69f3-317c-b1e4-e71be581839e", - "name": "Mexico", - "sort-name": "Mexico", - "iso-3166-1-code-list": [ - "MX" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "560ddb6d-4304-3938-8407-c96605226fad", - "name": "Moldova", - "sort-name": "Moldova", - "iso-3166-1-code-list": [ - "MD" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "6f26d528-4467-3ecb-b105-10daf3466b40", - "name": "Monaco", - "sort-name": "Monaco", - "iso-3166-1-code-list": [ - "MC" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "b84d8617-249a-3a06-849d-fc5c25e2249b", - "name": "Morocco", - "sort-name": "Morocco", - "iso-3166-1-code-list": [ - "MA" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "ef1b7cc0-cd26-36f4-8ea0-04d9623786c7", - "name": "Netherlands", - "sort-name": "Netherlands", - "iso-3166-1-code-list": [ - "NL" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "8524c7d9-f472-3890-a458-f28d5081d9c4", - "name": "New Zealand", - "sort-name": "New Zealand", - "iso-3166-1-code-list": [ - "NZ" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "d2b87acd-06ce-3c71-b3ff-a35d914bbabe", - "name": "Nicaragua", - "sort-name": "Nicaragua", - "iso-3166-1-code-list": [ - "NI" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "6743d351-6f37-3049-9724-5041161fff4d", - "name": "Norway", - "sort-name": "Norway", - "iso-3166-1-code-list": [ - "NO" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "7ccdff29-2e00-3e50-9520-b9ea1e918bc2", - "name": "Oman", - "sort-name": "Oman", - "iso-3166-1-code-list": [ - "OM" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "6f85633b-dff4-3fb4-babd-fb89b3628041", - "name": "Panama", - "sort-name": "Panama", - "iso-3166-1-code-list": [ - "PA" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "0a750c98-a7a5-3d55-bd52-f6e9011b1537", - "name": "Paraguay", - "sort-name": "Paraguay", - "iso-3166-1-code-list": [ - "PY" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "719f6082-95c7-3dd5-9503-e143010a6cc1", - "name": "Peru", - "sort-name": "Peru", - "iso-3166-1-code-list": [ - "PE" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "786532a5-2e36-315a-bdf2-221dc1b64b72", - "name": "Philippines", - "sort-name": "Philippines", - "iso-3166-1-code-list": [ - "PH" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "dd7f80c8-f017-3d01-8608-2a8c9c32b954", - "name": "Poland", - "sort-name": "Poland", - "iso-3166-1-code-list": [ - "PL" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "781b0c54-3d54-362d-a941-8a617def4992", - "name": "Portugal", - "sort-name": "Portugal", - "iso-3166-1-code-list": [ - "PT" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "348dcc25-7bb6-3f75-8739-97eabc84a330", - "name": "Qatar", - "sort-name": "Qatar", - "iso-3166-1-code-list": [ - "QA" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "61ed84b8-5a10-30a7-8376-ccd51801d6d1", - "name": "Romania", - "sort-name": "Romania", - "iso-3166-1-code-list": [ - "RO" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "1f1fc3a4-9500-39b8-9f10-f0a465557eef", - "name": "Russia", - "sort-name": "Russia", - "iso-3166-1-code-list": [ - "RU" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "9705be0d-51fb-3990-8726-ec9f56c66ba0", - "name": "Saudi Arabia", - "sort-name": "Saudi Arabia", - "iso-3166-1-code-list": [ - "SA" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "aa344640-fd57-3960-afb4-84d0d3b69d3d", - "name": "Singapore", - "sort-name": "Singapore", - "iso-3166-1-code-list": [ - "SG" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "eb52ca74-dd11-37a1-a3fa-154430bf2df2", - "name": "Slovakia", - "sort-name": "Slovakia", - "iso-3166-1-code-list": [ - "SK" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "5b0b6225-584c-3942-b69d-5efceb9989af", - "name": "Slovenia", - "sort-name": "Slovenia", - "iso-3166-1-code-list": [ - "SI" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "50cc7852-862e-30ae-aa82-385fe7135b7f", - "name": "South Africa", - "sort-name": "South Africa", - "iso-3166-1-code-list": [ - "ZA" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "471c46a7-afc5-31c4-923c-d0444f5053a4", - "name": "Spain", - "sort-name": "Spain", - "iso-3166-1-code-list": [ - "ES" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "23d10872-f5ae-3f0c-bf55-332788a16ecb", - "name": "Sweden", - "sort-name": "Sweden", - "iso-3166-1-code-list": [ - "SE" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "1333ff06-8e3d-3c8e-9f3a-13a2a38b41df", - "name": "Switzerland", - "sort-name": "Switzerland", - "iso-3166-1-code-list": [ - "CH" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "41637cec-9a4f-389c-86d2-fc6abf3357b5", - "name": "Taiwan", - "sort-name": "Taiwan", - "iso-3166-1-code-list": [ - "TW" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "ce209e56-cda5-358e-96db-830e3405b675", - "name": "Thailand", - "sort-name": "Thailand", - "iso-3166-1-code-list": [ - "TH" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "58955071-67c1-3491-8dec-48d28f824bda", - "name": "Tunisia", - "sort-name": "Tunisia", - "iso-3166-1-code-list": [ - "TN" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "d3be28b4-41f7-3752-8a05-ed45e1d1e492", - "name": "T\u00fcrkiye", - "sort-name": "T\u00fcrkiye", - "iso-3166-1-code-list": [ - "TR" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "904768d0-61ca-3c40-93ac-93adc36fef4b", - "name": "Ukraine", - "sort-name": "Ukraine", - "iso-3166-1-code-list": [ - "UA" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "fe40c648-ba74-3e17-b768-58181d5ee563", - "name": "United Arab Emirates", - "sort-name": "United Arab Emirates", - "iso-3166-1-code-list": [ - "AE" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "8a754a16-0027-3a29-b6d7-2b40ea0481ed", - "name": "United Kingdom", - "sort-name": "United Kingdom", - "iso-3166-1-code-list": [ - "GB" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "489ce91b-6658-3307-9877-795b68554c98", - "name": "United States", - "sort-name": "United States", - "iso-3166-1-code-list": [ - "US" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "ea88d395-87c9-3c47-b49a-114cad41fd39", - "name": "Uruguay", - "sort-name": "Uruguay", - "iso-3166-1-code-list": [ - "UY" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "0158e991-c3c6-374a-9b9d-024bbaff6980", - "name": "Vietnam", - "sort-name": "Vietnam", - "iso-3166-1-code-list": [ - "VN" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "6f8faf25-44cb-313b-9162-77145cdc192d", - "name": "Montenegro", - "sort-name": "Montenegro", - "iso-3166-1-code-list": [ - "ME" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "7d24dd34-a00f-37a1-8307-f2ef1dd3dbcd", - "name": "Palestine", - "sort-name": "Palestine", - "iso-3166-1-code-list": [ - "PS" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "424c1b50-57f8-34af-ab97-313e2ad40058", - "name": "Serbia", - "sort-name": "Serbia", - "iso-3166-1-code-list": [ - "RS" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "7b6ae6b7-6f4f-43df-aab8-0c72531ea8ae", - "name": "Kosovo", - "sort-name": "Kosovo", - "iso-3166-1-code-list": [ - "XK" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "8e0551f2-95c2-3cc0-a0a9-f2d344f10667", - "name": "Egypt", - "sort-name": "Egypt", - "iso-3166-1-code-list": [ - "EG" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "967abc0e-f680-3cde-95d0-0b79b977d410", - "name": "Ecuador", - "sort-name": "Ecuador", - "iso-3166-1-code-list": [ - "EC" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "696cb3e0-5084-30ab-9916-65ece70adbf6", - "name": "Dominican Republic", - "sort-name": "Dominican Republic", - "iso-3166-1-code-list": [ - "DO" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "4757b525-2a60-324a-b060-578765d2c993", - "name": "Denmark", - "sort-name": "Denmark", - "iso-3166-1-code-list": [ - "DK" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "85752fda-13c4-31a3-bee5-0e5cb1f51dad", - "name": "Germany", - "sort-name": "Germany", - "iso-3166-1-code-list": [ - "DE" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "a75b525f-8c01-31f6-975e-4a32a2b001d5", - "name": "Cyprus", - "sort-name": "Cyprus", - "iso-3166-1-code-list": [ - "CY" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "7d30afff-e425-356a-873e-17ae9745b31d", - "name": "Croatia", - "sort-name": "Croatia", - "iso-3166-1-code-list": [ - "HR" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "ba544658-8266-36cb-ac0e-3bdfbf52cb00", - "name": "Costa Rica", - "sort-name": "Costa Rica", - "iso-3166-1-code-list": [ - "CR" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "02b60d8d-7164-339d-868d-22d147d9f74a", - "name": "Colombia", - "sort-name": "Colombia", - "iso-3166-1-code-list": [ - "CO" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "82d5f4d6-aed4-3ff5-81d1-5363ac6e97a7", - "name": "Chile", - "sort-name": "Chile", - "iso-3166-1-code-list": [ - "CL" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "71bbafaa-e825-3e15-8ca9-017dcad1748b", - "name": "Canada", - "sort-name": "Canada", - "iso-3166-1-code-list": [ - "CA" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "114c14ad-9776-34e9-81b0-6299507f3771", - "name": "Bulgaria", - "sort-name": "Bulgaria", - "iso-3166-1-code-list": [ - "BG" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "f45b47f8-5796-386e-b172-6c31b009a5d8", - "name": "Brazil", - "sort-name": "Brazil", - "iso-3166-1-code-list": [ - "BR" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "f2b64f81-6d36-35b3-94b9-5ba53d693914", - "name": "Bosnia and Herzegovina", - "sort-name": "Bosnia and Herzegovina", - "iso-3166-1-code-list": [ - "BA" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "a5aed4a3-8ce1-3ab3-bfee-b008cff6b857", - "name": "Bolivia", - "sort-name": "Bolivia", - "iso-3166-1-code-list": [ - "BO" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "5b8a5ee5-0bb3-34cf-9a75-c27c44e341fc", - "name": "Belgium", - "sort-name": "Belgium", - "iso-3166-1-code-list": [ - "BE" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "660e3c48-b301-3c8c-9708-0f71d5d094d6", - "name": "Belarus", - "sort-name": "Belarus", - "iso-3166-1-code-list": [ - "BY" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "65f4f7a6-d3c1-3a6b-a726-85e147d555b7", - "name": "Bahrain", - "sort-name": "Bahrain", - "iso-3166-1-code-list": [ - "BH" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "caac77d1-a5c8-3e6e-8e27-90b44dcc1446", - "name": "Austria", - "sort-name": "Austria", - "iso-3166-1-code-list": [ - "AT" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "106e0bec-b638-3b37-b731-f53d507dc00e", - "name": "Australia", - "sort-name": "Australia", - "iso-3166-1-code-list": [ - "AU" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "0df04709-c7d8-3b55-a6ea-f3e5069a947b", - "name": "Argentina", - "sort-name": "Argentina", - "iso-3166-1-code-list": [ - "AR" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "e01da61e-99a8-3c76-a27d-774c3f4982f0", - "name": "Andorra", - "sort-name": "Andorra", - "iso-3166-1-code-list": [ - "AD" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "28242750-534a-326b-8ed6-1b03dfb88cd0", - "name": "Algeria", - "sort-name": "Algeria", - "iso-3166-1-code-list": [ - "DZ" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "51d34c28-61bf-3d21-849f-7492672a9d44", - "name": "Czechia", - "sort-name": "Czechia", - "iso-3166-1-code-list": [ - "CZ" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "803db0ca-b6ed-3bbc-aeb8-f89efd0a2168", - "name": "Greece", - "sort-name": "Greece", - "iso-3166-1-code-list": [ - "GR" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "01448ddc-6ee3-3fa4-b136-507d984e31ee", - "name": "Guatemala", - "sort-name": "Guatemala", - "iso-3166-1-code-list": [ - "GT" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "0c3ea915-4e49-34fc-b702-debb216fd7fa", - "name": "Honduras", - "sort-name": "Honduras", - "iso-3166-1-code-list": [ - "HN" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "0373cdff-eac8-3fbc-92dc-36a607da06d1", - "name": "Hong Kong", - "sort-name": "Hong Kong", - "iso-3166-1-code-list": [ - "HK" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "312bc5bb-7e43-3e63-81c6-b4d712b37b2c", - "name": "Hungary", - "sort-name": "Hungary", - "iso-3166-1-code-list": [ - "HU" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "48802a32-075a-3805-a183-277c66047693", - "name": "Iceland", - "sort-name": "Iceland", - "iso-3166-1-code-list": [ - "IS" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "d31a9a15-537f-3669-ad53-25753ddd2772", - "name": "India", - "sort-name": "India", - "iso-3166-1-code-list": [ - "IN" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "d3a68bd0-7419-3f99-a5bd-204d6e057089", - "name": "Indonesia", - "sort-name": "Indonesia", - "iso-3166-1-code-list": [ - "ID" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "390b05d4-11ec-3bce-a343-703a366b34a5", - "name": "Ireland", - "sort-name": "Ireland", - "iso-3166-1-code-list": [ - "IE" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "03691455-bb46-37e3-91d2-cb064a35ffcc", - "name": "Israel", - "sort-name": "Israel", - "iso-3166-1-code-list": [ - "IL" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "c6500277-9a3d-349b-bf30-41afdbf42add", - "name": "Italy", - "sort-name": "Italy", - "iso-3166-1-code-list": [ - "IT" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "2db42837-c832-3c27-b4a3-08198f75693c", - "name": "Japan", - "sort-name": "Japan", - "iso-3166-1-code-list": [ - "JP" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "1c69b790-b46b-3e92-b6b4-93b4364badbc", - "name": "Albania", - "sort-name": "Albania", - "iso-3166-1-code-list": [ - "AL" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "f2fa4bfb-97aa-3db4-8d49-cc64969ce1a7", - "name": "El Salvador", - "sort-name": "El Salvador", - "iso-3166-1-code-list": [ - "SV" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "e1c1215f-dcc0-35b4-b840-d2ca2151593b", - "name": "Estonia", - "sort-name": "Estonia", - "iso-3166-1-code-list": [ - "EE" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "6a264f94-6ff1-30b1-9a81-41f7bfabd616", - "name": "Finland", - "sort-name": "Finland", - "iso-3166-1-code-list": [ - "FI" - ] - } - }, - { - "date": "2019-03-29", - "area": { - "id": "08310658-51eb-3801-80de-5a0739207115", - "name": "France", - "sort-name": "France", - "iso-3166-1-code-list": [ - "FR" - ] - } - } - ], - "medium-list": [ - { - "position": "2", - "format": "Digital Media", - "track-list": [ - { - "id": "31bc20a5-9d59-4b65-be97-4c4627324312", - "number": "9", - "title": "Avril 14th", - "length": "118826", - "track_or_recording_length": "118826" - } - ], - "track-count": 14 - } - ], - "medium-track-count": 26, - "medium-count": 2, - "artist-credit-phrase": "Various Artists" - }, - { - "id": "ef06981f-24fa-385b-97c4-3e07c3229f89", - "title": "Style: Upper Class Lounge", - "status": "Official", - "artist-credit": [ - { - "name": "Various Artists", - "artist": { - "id": "89ad4ac3-39f7-470e-963a-56509c546377", - "name": "Various Artists", - "sort-name": "Various Artists", - "disambiguation": "add compilations to this artist" - } - } - ], - "release-group": { - "id": "124d1390-2354-3933-84f3-3c801ed0e97e", - "type": "Compilation", - "title": "Style: Upper Class Lounge", - "primary-type": "Album", - "secondary-type-list": [ - "Compilation" - ] - }, - "date": "2002-12-02", - "country": "GB", - "release-event-list": [ - { - "date": "2002-12-02", - "area": { - "id": "8a754a16-0027-3a29-b6d7-2b40ea0481ed", - "name": "United Kingdom", - "sort-name": "United Kingdom", - "iso-3166-1-code-list": [ - "GB" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "track-list": [ - { - "id": "f80fd8b6-bcb3-3ada-9e6b-0b695e37c194", - "number": "1", - "title": "Avril 14th", - "length": "109280", - "track_or_recording_length": "109280" - } - ], - "track-count": 16 - } - ], - "medium-track-count": 16, - "medium-count": 1, - "artist-credit-phrase": "Various Artists" - }, - { - "id": "e11cd3c5-cf02-4651-af7f-19abeb7f7fe5", - "title": "Style: Upper Class Lounge", - "status": "Official", - "artist-credit": [ - { - "name": "Various Artists", - "artist": { - "id": "89ad4ac3-39f7-470e-963a-56509c546377", - "name": "Various Artists", - "sort-name": "Various Artists", - "disambiguation": "add compilations to this artist" - } - } - ], - "release-group": { - "id": "124d1390-2354-3933-84f3-3c801ed0e97e", - "type": "Compilation", - "title": "Style: Upper Class Lounge", - "primary-type": "Album", - "secondary-type-list": [ - "Compilation" - ] - }, - "date": "2002-11-11", - "country": "DE", - "release-event-list": [ - { - "date": "2002-11-11", - "area": { - "id": "85752fda-13c4-31a3-bee5-0e5cb1f51dad", - "name": "Germany", - "sort-name": "Germany", - "iso-3166-1-code-list": [ - "DE" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "CD", - "track-list": [ - { - "id": "bf6938a5-55fe-3b33-800e-3fb632373772", - "number": "1", - "title": "Avril 14th", - "length": "109280", - "track_or_recording_length": "109280" - } - ], - "track-count": 16 - } - ], - "medium-track-count": 16, - "medium-count": 1, - "artist-credit-phrase": "Various Artists" - }, - { - "id": "4e314b36-21bd-4766-9391-e5cf9b793034", - "title": "Chiller Cabinet", - "status": "Official", - "artist-credit": [ - { - "name": "Various Artists", - "artist": { - "id": "89ad4ac3-39f7-470e-963a-56509c546377", - "name": "Various Artists", - "sort-name": "Various Artists", - "disambiguation": "add compilations to this artist" - } - } - ], - "release-group": { - "id": "11b188dc-68ab-35d0-a65f-b74752c094d7", - "type": "Compilation", - "title": "Chiller Cabinet", - "primary-type": "Album", - "secondary-type-list": [ - "Compilation" - ] - }, - "date": "2004-01-27", - "country": "US", - "release-event-list": [ - { - "date": "2004-01-27", - "area": { - "id": "489ce91b-6658-3307-9877-795b68554c98", - "name": "United States", - "sort-name": "United States", - "iso-3166-1-code-list": [ - "US" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "CD", - "track-list": [ - { - "id": "e49381e4-04a8-3575-a958-dc08450c9de9", - "number": "6", - "title": "Avril 14th", - "length": "111640", - "track_or_recording_length": "111640" - } - ], - "track-count": 19 - } - ], - "medium-track-count": 36, - "medium-count": 2, - "artist-credit-phrase": "Various Artists" - }, - { - "id": "dbf15355-0a12-4ac4-847b-b99c21ad2b6d", - "title": "Drukqs", - "status": "Official", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2017-07-28", - "country": "XE", - "release-event-list": [ - { - "date": "2017-07-28", - "area": { - "id": "89a675c2-3e37-3518-b83c-418bad59a85a", - "name": "Europe", - "sort-name": "Europe", - "iso-3166-1-code-list": [ - "XE" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "CD", - "track-list": [ - { - "id": "5bd1313a-ba8e-433d-b18a-864a9679dd94", - "number": "9", - "title": "Avril 14th", - "length": "125520", - "track_or_recording_length": "125520" - } - ], - "track-count": 15 - } - ], - "medium-track-count": 30, - "medium-count": 2, - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "0c13023d-0ccf-4376-8634-4c86504eefad", - "title": "Drukqs", - "status": "Official", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2001-10-22", - "country": "XW", - "release-event-list": [ - { - "date": "2001-10-22", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "e6834218-28ca-4b65-8624-6f7e15590fdc", - "number": "9", - "title": "Avril 14th", - "length": "125000", - "track_or_recording_length": "125000" - } - ], - "track-count": 30 - } - ], - "medium-track-count": 30, - "medium-count": 1, - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "23496fd1-5dbc-4139-8667-0d8ee2ff4ac0", - "title": "Drukqs", - "status": "Official", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2001", - "country": "AU", - "release-event-list": [ - { - "date": "2001", - "area": { - "id": "106e0bec-b638-3b37-b731-f53d507dc00e", - "name": "Australia", - "sort-name": "Australia", - "iso-3166-1-code-list": [ - "AU" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "CD", - "track-list": [ - { - "id": "c16ce3cf-fcee-4956-a759-a9af54eb8ec6", - "number": "9", - "title": "Avril 14th", - "length": "125533", - "track_or_recording_length": "125533" - } - ], - "track-count": 15 - } - ], - "medium-track-count": 30, - "medium-count": 2, - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "88224d97-5fd2-48f9-bda6-1f025bcd136f", - "title": "Drukqs", - "status": "Promotion", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2001", - "country": "JP", - "release-event-list": [ - { - "date": "2001", - "area": { - "id": "2db42837-c832-3c27-b4a3-08198f75693c", - "name": "Japan", - "sort-name": "Japan", - "iso-3166-1-code-list": [ - "JP" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Cassette", - "track-list": [ - { - "id": "de295f7a-7322-43a8-9120-bfab8f620f7e", - "number": "B1", - "title": "Avril 14th" - } - ], - "track-count": 15 - } - ], - "medium-track-count": 30, - "medium-count": 2, - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "aab378a0-2dd5-40de-bb4e-cb32f0a3b2fd", - "title": "Drukqs", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2001", - "country": "RU", - "release-event-list": [ - { - "date": "2001", - "area": { - "id": "1f1fc3a4-9500-39b8-9f10-f0a465557eef", - "name": "Russia", - "sort-name": "Russia", - "iso-3166-1-code-list": [ - "RU" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "CD", - "track-list": [ - { - "id": "c379f556-d0ee-405f-853b-a63b6ecfdce5", - "number": "9", - "title": "Avril 14th", - "length": "125533", - "track_or_recording_length": "125533" - } - ], - "track-count": 15 - } - ], - "medium-track-count": 30, - "medium-count": 2, - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "9dd65019-6474-45af-a9e7-ea8d2866f217", - "title": "Drukqs", - "status": "Official", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2018-12-09", - "country": "XW", - "release-event-list": [ - { - "date": "2018-12-09", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "4fe5b55f-d898-4044-8481-5345e85a8c84", - "number": "9", - "title": "Avril 14th", - "length": "125000", - "track_or_recording_length": "125000" - } - ], - "track-count": 34 - } - ], - "medium-track-count": 34, - "medium-count": 1, - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "f1e1e043-f0e7-44e8-a71e-d67efd6b8279", - "title": "Drukqs", - "status": "Official", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2018-12-04", - "country": "XW", - "release-event-list": [ - { - "date": "2018-12-04", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "bd97d331-c4e1-4531-bb0a-f5fedc718356", - "number": "9", - "title": "Avril 14th", - "length": "125000", - "track_or_recording_length": "125000" - } - ], - "track-count": 33 - } - ], - "medium-track-count": 33, - "medium-count": 1, - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "e527b82a-edfb-4e81-8cf7-1a7dcd7cd29c", - "title": "Drukqs", - "status": "Official", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2018-12-03", - "country": "XW", - "release-event-list": [ - { - "date": "2018-12-03", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "278e6db0-6f11-4a30-b701-a50b9adae1f8", - "number": "9", - "title": "Avril 14th", - "length": "125000", - "track_or_recording_length": "125000" - } - ], - "track-count": 34 - } - ], - "medium-track-count": 34, - "medium-count": 1, - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "4d35da90-c4f9-4d37-b68a-027225fca9cd", - "title": "Drukqs", - "status": "Official", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2001-10-22", - "country": "GB", - "release-event-list": [ - { - "date": "2001-10-22", - "area": { - "id": "8a754a16-0027-3a29-b6d7-2b40ea0481ed", - "name": "United Kingdom", - "sort-name": "United Kingdom", - "iso-3166-1-code-list": [ - "GB" - ] - } - } - ], - "medium-list": [ - { - "position": "3", - "format": "12\" Vinyl", - "track-list": [ - { - "id": "c0f6e926-634f-3c37-bfe3-dd4a8ad2165f", - "number": "E4", - "title": "Avril 14th", - "length": "125000", - "track_or_recording_length": "125000" - } - ], - "track-count": 12 - } - ], - "medium-track-count": 30, - "medium-count": 4, - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "60fa0e80-5f0e-452b-8229-72118eb07194", - "title": "Drukqs", - "status": "Official", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "", - "country": "XW", - "release-event-list": [ - { - "date": "", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "c6e10ca0-0e64-48a0-bea2-40eedaa5f7ac", - "number": "9", - "title": "Avril 14th", - "length": "125000", - "track_or_recording_length": "125000" - } - ], - "track-count": 32 - } - ], - "medium-track-count": 32, - "medium-count": 1, - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "50a4e953-417f-4aea-9ae1-f65476932bab", - "title": "Drukqs", - "status": "Official", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2017-07-20", - "country": "XW", - "release-event-list": [ - { - "date": "2017-07-20", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "1c5596be-4ad0-494b-bce6-bcce41b7fd45", - "number": "9", - "title": "Avril 14th", - "length": "125000", - "track_or_recording_length": "125000" - } - ], - "track-count": 31 - } - ], - "medium-track-count": 31, - "medium-count": 1, - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "cf08cadb-445d-412d-87f2-75baa3fd194c", - "title": "Drukqs", - "status": "Official", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2014", - "country": "XE", - "release-event-list": [ - { - "date": "2014", - "area": { - "id": "89a675c2-3e37-3518-b83c-418bad59a85a", - "name": "Europe", - "sort-name": "Europe", - "iso-3166-1-code-list": [ - "XE" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "CD", - "track-list": [ - { - "id": "d70c6d19-d762-4a2a-ac7b-28e3e313ed71", - "number": "9", - "title": "Avril 14th", - "length": "125533", - "track_or_recording_length": "125533" - } - ], - "track-count": 15 - } - ], - "medium-track-count": 30, - "medium-count": 2, - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "a3a96dde-8af3-3622-a936-4ac3af501e1d", - "title": "Drukqs", - "status": "Official", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2001-10-23", - "country": "US", - "release-event-list": [ - { - "date": "2001-10-23", - "area": { - "id": "489ce91b-6658-3307-9877-795b68554c98", - "name": "United States", - "sort-name": "United States", - "iso-3166-1-code-list": [ - "US" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "CD", - "track-list": [ - { - "id": "31914a42-bc39-3943-91bc-a2a82968ace4", - "number": "9", - "title": "Avril 14th", - "length": "125533", - "track_or_recording_length": "125533" - } - ], - "track-count": 15 - } - ], - "medium-track-count": 30, - "medium-count": 2, - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "e1a549c2-82b5-43db-aaae-c4f7b0ed80dd", - "title": "Drukqs", - "status": "Promotion", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2001-08", - "country": "GB", - "release-event-list": [ - { - "date": "2001-08", - "area": { - "id": "8a754a16-0027-3a29-b6d7-2b40ea0481ed", - "name": "United Kingdom", - "sort-name": "United Kingdom", - "iso-3166-1-code-list": [ - "GB" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "CD", - "track-list": [ - { - "id": "57c93d6c-a1b1-3aa2-832a-14512e725d62", - "number": "3", - "title": "Avril 14th", - "length": "125000", - "track_or_recording_length": "125000" - } - ], - "track-count": 5 - } - ], - "medium-track-count": 5, - "medium-count": 1, - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "550481d1-ec9f-3a46-b8d9-fef59d534ad9", - "title": "Drukqs", - "status": "Promotion", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2001", - "country": "US", - "release-event-list": [ - { - "date": "2001", - "area": { - "id": "489ce91b-6658-3307-9877-795b68554c98", - "name": "United States", - "sort-name": "United States", - "iso-3166-1-code-list": [ - "US" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "CD", - "track-list": [ - { - "id": "076205ee-7f45-3325-a5a4-38d27ceabd61", - "number": "3", - "title": "Avril 14th", - "length": "125000", - "track_or_recording_length": "125000" - } - ], - "track-count": 5 - } - ], - "medium-track-count": 5, - "medium-count": 1, - "artist-credit-phrase": "Aphex Twin" - } - ], - "isrc-list": [ - "GBBPW0100148" - ], - "tag-list": [ - { - "count": "3", - "name": "electronic" - }, - { - "count": "2", - "name": "soundtrack" - }, - { - "count": "1", - "name": "drum and bass" - }, - { - "count": "3", - "name": "ambient" - }, - { - "count": "1", - "name": "experimental" - }, - { - "count": "7", - "name": "idm" - }, - { - "count": "1", - "name": "showtunes" - }, - { - "count": "1", - "name": "movie soundtrack" - }, - { - "count": "1", - "name": "impressionism" - } - ], - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "4b7b755f-e141-47af-a0be-a7f9ba5a35c6", - "ext:score": "70", - "title": "Avril 14th", - "length": "127520", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin", - "alias-list": [ - { - "locale": "ja", - "sort-name": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3", - "type": "Artist name", - "alias": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3" - }, - { - "sort-name": "Aphex Twin, The", - "type": "Artist name", - "alias": "The Aphex Twin" - }, - { - "sort-name": "Aphex Twin", - "type": "Artist name", - "alias": "Aphex Twin" - }, - { - "sort-name": "aphex+twin", - "alias": "aphex+twin" - }, - { - "sort-name": "Aphex Twins", - "alias": "Aphex Twins" - }, - { - "sort-name": "AphexTwin", - "alias": "AphexTwin" - } - ] - } - } - ], - "release-list": [ - { - "id": "2f40881d-4027-4dea-8960-11388008bb6c", - "title": "St Valentines L\u2665ve In", - "status": "Bootleg", - "artist-credit": [ - { - "name": "Various Artists", - "artist": { - "id": "89ad4ac3-39f7-470e-963a-56509c546377", - "name": "Various Artists", - "sort-name": "Various Artists", - "disambiguation": "add compilations to this artist" - } - } - ], - "release-group": { - "id": "20d2d166-9ed5-3c34-95f8-7f6f65c24eaf", - "type": "Compilation", - "title": "St Valentines L\u2665ve In", - "primary-type": "Album", - "secondary-type-list": [ - "Compilation" - ] - }, - "date": "2008", - "country": "GB", - "release-event-list": [ - { - "date": "2008", - "area": { - "id": "8a754a16-0027-3a29-b6d7-2b40ea0481ed", - "name": "United Kingdom", - "sort-name": "United Kingdom", - "iso-3166-1-code-list": [ - "GB" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "CD", - "track-list": [ - { - "id": "6a19e19d-a075-317f-b141-da8d8a9c1a76", - "number": "21", - "title": "Avril 14th", - "length": "127520", - "track_or_recording_length": "127520" - } - ], - "track-count": 23 - } - ], - "medium-track-count": 23, - "medium-count": 1, - "artist-credit-phrase": "Various Artists" - } - ], - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "475fe780-7405-4cf6-baf3-2e657f67e09e", - "ext:score": "55", - "title": "Avril 14th (Jaffa Kid remix)", - "length": "86988", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin", - "alias-list": [ - { - "sort-name": "Aphex Twin, The", - "type": "Artist name", - "alias": "The Aphex Twin" - }, - { - "sort-name": "AphexTwin", - "alias": "AphexTwin" - }, - { - "sort-name": "Aphex Twins", - "alias": "Aphex Twins" - }, - { - "sort-name": "aphex+twin", - "alias": "aphex+twin" - }, - { - "locale": "ja", - "sort-name": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3", - "type": "Artist name", - "alias": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3" - }, - { - "sort-name": "Aphex Twin", - "type": "Artist name", - "alias": "Aphex Twin" - } - ] - } - } - ], - "release-list": [ - { - "id": "aa395194-a6e6-445c-b70f-836fe01f661a", - "title": "Archives Retrieval", - "status": "Official", - "artist-credit": [ - { - "name": "The Jaffa Kid", - "artist": { - "id": "0fe6c1e3-4e93-4064-8860-8bfa7bbe1174", - "name": "The Jaffa Kid", - "sort-name": "Jaffa Kid, The" - } - } - ], - "release-group": { - "id": "85aa252b-7c8f-4922-a3db-c2addc4d846a", - "type": "Compilation", - "title": "Archives Retrieval", - "primary-type": "Album", - "secondary-type-list": [ - "Compilation" - ] - }, - "date": "2022-02-19", - "country": "XW", - "release-event-list": [ - { - "date": "2022-02-19", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "2cc8e0f6-44a6-4563-8aa9-3ff510e403d0", - "number": "4", - "title": "Avril 14th (Jaffa Kid remix)", - "length": "86988", - "track_or_recording_length": "86988" - } - ], - "track-count": 14 - } - ], - "medium-track-count": 14, - "medium-count": 1, - "artist-credit-phrase": "The Jaffa Kid" - } - ], - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "1a22d8cd-42c1-44e1-b869-141d68634e36", - "ext:score": "55", - "title": "avril 14th doubletempo,half speed", - "length": "136000", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin", - "alias-list": [ - { - "sort-name": "Aphex Twin, The", - "type": "Artist name", - "alias": "The Aphex Twin" - }, - { - "sort-name": "AphexTwin", - "alias": "AphexTwin" - }, - { - "sort-name": "Aphex Twins", - "alias": "Aphex Twins" - }, - { - "sort-name": "aphex+twin", - "alias": "aphex+twin" - }, - { - "locale": "ja", - "sort-name": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3", - "type": "Artist name", - "alias": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3" - }, - { - "sort-name": "Aphex Twin", - "type": "Artist name", - "alias": "Aphex Twin" - } - ] - } - } - ], - "release-list": [ - { - "id": "e527b82a-edfb-4e81-8cf7-1a7dcd7cd29c", - "title": "Drukqs", - "status": "Official", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "87f1a316-510f-36c3-9f2c-38230b0e56e0", - "type": "Album", - "title": "drukQs", - "primary-type": "Album" - }, - "date": "2018-12-03", - "country": "XW", - "release-event-list": [ - { - "date": "2018-12-03", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "72ebe50c-cb2b-4fab-ba04-232e5dbb5bcd", - "number": "34", - "title": "avril 14th doubletempo,half speed", - "length": "136000", - "track_or_recording_length": "136000" - } - ], - "track-count": 34 - } - ], - "medium-track-count": 34, - "medium-count": 1, - "artist-credit-phrase": "Aphex Twin" - } - ], - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "850d7cfc-b349-4ce2-a6cd-a94961a809ba", - "ext:score": "55", - "title": "Avril 14th (Terravita drumstep remix)", - "length": "380000", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin", - "alias-list": [ - { - "sort-name": "AphexTwin", - "alias": "AphexTwin" - }, - { - "sort-name": "Aphex Twin, The", - "type": "Artist name", - "alias": "The Aphex Twin" - }, - { - "sort-name": "Aphex Twin", - "type": "Artist name", - "alias": "Aphex Twin" - }, - { - "locale": "ja", - "sort-name": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3", - "type": "Artist name", - "alias": "\u30a8\u30a4\u30d5\u30a7\u30c3\u30af\u30b9\u30fb\u30c4\u30a4\u30f3" - }, - { - "sort-name": "aphex+twin", - "alias": "aphex+twin" - }, - { - "sort-name": "Aphex Twins", - "alias": "Aphex Twins" - } - ] - } - } - ], - "release-list": [ - { - "id": "95c8a0b0-b6d3-4fc6-8d89-e53888762f54", - "title": "Avril 14th (Terravita drumstep remix)", - "status": "Bootleg", - "artist-credit": [ - { - "name": "Aphex Twin", - "artist": { - "id": "f22942a1-6f70-4f48-866e-238cb2308fbd", - "name": "Aphex Twin", - "sort-name": "Aphex Twin" - } - } - ], - "release-group": { - "id": "094466c4-3f56-4bef-8507-41de6bd8843c", - "type": "Single", - "title": "Avril 14th (Terravita drumstep remix)", - "primary-type": "Single", - "secondary-type-list": [ - "Remix" - ] - }, - "date": "2011-11-28", - "country": "XW", - "release-event-list": [ - { - "date": "2011-11-28", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "114df03c-acf6-3be9-9136-3c3a898d85e8", - "number": "1", - "title": "Avril 14th (Terravita drumstep remix)", - "length": "380000", - "track_or_recording_length": "380000" - } - ], - "track-count": 1 - } - ], - "medium-track-count": 1, - "medium-count": 1, - "artist-credit-phrase": "Aphex Twin" - } - ], - "artist-credit-phrase": "Aphex Twin" - }, - { - "id": "3f99ace5-5d57-4b91-bd2d-89bd3147d617", - "ext:score": "51", - "title": "Avril 14th", - "length": "116731", - "artist-credit": [ - { - "name": "Johannes Bornl\u00f6f", - "artist": { - "id": "c501a2f9-fc6e-4e9a-a1ec-499396bed033", - "name": "Johannes Bornl\u00f6f", - "sort-name": "Bornl\u00f6f, Johannes", - "disambiguation": "music composition for film, television and commercials, soothing piano music" - } - } - ], - "release-list": [ - { - "id": "5375ee05-ed5a-472e-b422-c2883104ea5a", - "title": "The 50 Greatest Epic Piano Pieces", - "status": "Official", - "release-group": { - "id": "3fa2586c-22a5-4fac-8dd1-b58f6d79a63f", - "type": "Album", - "title": "The 50 Greatest Epic Piano Pieces", - "primary-type": "Album" - }, - "date": "2018-04-06", - "country": "FR", - "release-event-list": [ - { - "date": "2018-04-06", - "area": { - "id": "08310658-51eb-3801-80de-5a0739207115", - "name": "France", - "sort-name": "France", - "iso-3166-1-code-list": [ - "FR" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "aa6459f1-1004-40fc-852a-76615fd26b30", - "number": "44", - "title": "Avril 14th", - "length": "116731", - "track_or_recording_length": "116731" - } - ], - "track-count": 50 - } - ], - "medium-track-count": 50, - "medium-count": 1 - } - ], - "artist-credit-phrase": "Johannes Bornl\u00f6f" - }, - { - "id": "dd07c5e2-f8f1-4e10-a462-598670ee6f90", - "ext:score": "51", - "title": "Avril 14th", - "length": "114371", - "artist-credit": [ - { - "name": "Max Allard", - "artist": { - "id": "4c27bda8-7674-47ee-b751-fc398b8b1c86", - "name": "Max Allard", - "sort-name": "Allard, Max" - } - } - ], - "release-list": [ - { - "id": "97e58df8-ab7b-4bb2-aec7-53b6f5c8423d", - "title": "Odes / Codes", - "status": "Official", - "release-group": { - "id": "3c441554-859f-4086-88c0-a66ab5ef9428", - "type": "Album", - "title": "Odes / Codes", - "primary-type": "Album" - }, - "date": "2022-01-21", - "country": "XW", - "release-event-list": [ - { - "date": "2022-01-21", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "3596964d-aa81-434f-8cc8-c0b7dd188355", - "number": "11", - "title": "Avril 14th", - "length": "114371", - "track_or_recording_length": "114371" - } - ], - "track-count": 14 - } - ], - "medium-track-count": 14, - "medium-count": 1 - } - ], - "isrc-list": [ - "USL4Q2174195" - ], - "artist-credit-phrase": "Max Allard" - }, - { - "id": "10dec393-6aa1-40c8-a8e0-7ff501189cf7", - "ext:score": "51", - "title": "Avril 14th", - "artist-credit": [ - { - "name": "Lunapark", - "artist": { - "id": "f8b3afc1-49e8-4374-a794-eda15483c01d", - "name": "Lunapark", - "sort-name": "Lunapark", - "disambiguation": "Dutch modern ensemble" - } - } - ], - "release-list": [ - { - "id": "60913d8f-ce48-4a96-b420-41e965702167", - "title": "Flim", - "status": "Official", - "release-group": { - "id": "a00cea2e-0842-425f-b628-e0dfda5a40a4", - "type": "Album", - "title": "Flim", - "primary-type": "Album" - }, - "date": "2011", - "country": "XW", - "release-event-list": [ - { - "date": "2011", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "0b04ff94-9b32-4e25-8941-c27bf7ac1246", - "number": "3", - "title": "Avril 14th" - } - ], - "track-count": 14 - } - ], - "medium-track-count": 14, - "medium-count": 1 - } - ], - "artist-credit-phrase": "Lunapark" - }, - { - "id": "a531f9d9-6c0a-4556-84d4-59bd67c00dd9", - "ext:score": "51", - "title": "Avril 14th", - "length": "132000", - "artist-credit": [ - { - "name": "Simon Farintosh", - "artist": { - "id": "00bdf465-86b4-4b09-aaa6-1ce95697607a", - "name": "Simon Farintosh", - "sort-name": "Farintosh, Simon" - } - } - ], - "release-list": [ - { - "id": "240588eb-3a8d-4c0c-9d42-85eac858a0fb", - "title": "Aphex Twin for Guitar", - "status": "Official", - "release-group": { - "id": "1d118e78-213d-4c35-9bc6-682528a17a7e", - "type": "EP", - "title": "Aphex Twin for Guitar", - "primary-type": "EP" - }, - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "fed7fc54-0fa5-4d22-8d68-053c1425c4ce", - "number": "2", - "title": "Avril 14th", - "length": "132000", - "track_or_recording_length": "132000" - } - ], - "track-count": 6 - } - ], - "medium-track-count": 6, - "medium-count": 1 - } - ], - "artist-credit-phrase": "Simon Farintosh" - }, - { - "id": "2e18fe53-c32d-438c-ac11-4327d98a48a5", - "ext:score": "51", - "title": "Avril 14th", - "length": "126066", - "disambiguation": "live, 2011: Mosaic Festival, Singapore", - "artist-credit": [ - { - "name": "MUON", - "artist": { - "id": "a84c0750-3cce-4fad-a6cb-ac473fde18e9", - "name": "MUON", - "sort-name": "MUON", - "disambiguation": "electronic indie band from Singapore" - } - } - ], - "release-list": [ - { - "id": "e2d749a8-2c62-4cd8-896f-5c8b30704d99", - "title": "Live at Mosaic Festival 2011", - "status": "Official", - "release-group": { - "id": "c1536317-6f6c-4d71-be93-323de91a0644", - "type": "EP", - "title": "Live at Mosaic Festival 2011", - "primary-type": "EP", - "secondary-type-list": [ - "Live" - ] - }, - "date": "2011-03-23", - "country": "XW", - "release-event-list": [ - { - "date": "2011-03-23", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "d49f1740-ec73-411f-bb1d-8a2fc679849f", - "number": "5", - "title": "Avril 14th", - "length": "126066", - "track_or_recording_length": "126066" - } - ], - "track-count": 5 - } - ], - "medium-track-count": 5, - "medium-count": 1 - } - ], - "artist-credit-phrase": "MUON" - }, - { - "id": "fd05549c-be1e-4148-942c-af6dbb67c249", - "ext:score": "51", - "title": "Avril 14th", - "length": "119440", - "artist-credit": [ - { - "name": "Jon Stickley Trio", - "artist": { - "id": "0b822533-e0f1-437b-a3e1-9d8c1822746e", - "name": "Jon Stickley Trio", - "sort-name": "Jon Stickley Trio", - "disambiguation": "Progressive bluegrass" - } - } - ], - "release-list": [ - { - "id": "11d5311a-0b21-4321-a74d-6133959fdbfd", - "title": "Maybe Believe", - "status": "Official", - "release-group": { - "id": "9cb154da-f01f-4691-9d1f-74863b26f9da", - "type": "Album", - "title": "Maybe Believe", - "primary-type": "Album" - }, - "date": "2017-05-12", - "country": "XW", - "release-event-list": [ - { - "date": "2017-05-12", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "a32923d3-aed3-485b-ad17-ed4c1a8a94e7", - "number": "6", - "title": "Avril 14th", - "length": "127000", - "track_or_recording_length": "127000" - } - ], - "track-count": 12 - } - ], - "medium-track-count": 12, - "medium-count": 1 - }, - { - "id": "59e82332-1699-4698-945a-3a3752d333ea", - "title": "Maybe Believe", - "status": "Official", - "release-group": { - "id": "9cb154da-f01f-4691-9d1f-74863b26f9da", - "type": "Album", - "title": "Maybe Believe", - "primary-type": "Album" - }, - "date": "2017-05-12", - "country": "US", - "release-event-list": [ - { - "date": "2017-05-12", - "area": { - "id": "489ce91b-6658-3307-9877-795b68554c98", - "name": "United States", - "sort-name": "United States", - "iso-3166-1-code-list": [ - "US" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "CD", - "track-list": [ - { - "id": "b849620f-5ca9-43c5-93f3-a22016b8c52f", - "number": "6", - "title": "Avril 14th", - "length": "119440", - "track_or_recording_length": "119440" - } - ], - "track-count": 12 - } - ], - "medium-track-count": 12, - "medium-count": 1 - } - ], - "isrc-list": [ - "USCGH1750125" - ], - "artist-credit-phrase": "Jon Stickley Trio" - }, - { - "id": "0e6132cc-65c8-4885-9f4d-48696b2bea37", - "ext:score": "51", - "title": "avril 14th", - "length": "167442", - "artist-credit": [ - { - "name": "camoufly", - "artist": { - "id": "01947c88-acf0-405b-82cd-0a6d7688aa3c", - "name": "camoufly", - "sort-name": "camoufly" - } - } - ], - "release-list": [ - { - "id": "310b2984-338a-4e7b-97d5-236ad80d4707", - "title": "kawaii bounce, vol. I", - "status": "Official", - "release-group": { - "id": "022a754a-7691-4bac-9e26-41eb9a2714a9", - "type": "Compilation", - "title": "kawaii bounce, vol. I", - "primary-type": "Album", - "secondary-type-list": [ - "Compilation" - ] - }, - "date": "2020-03-20", - "country": "XW", - "release-event-list": [ - { - "date": "2020-03-20", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "16936828-9d6d-463a-b8bc-6a3e9ac3d3d6", - "number": "14", - "title": "avril 14th", - "length": "167442", - "track_or_recording_length": "167442" - } - ], - "track-count": 18 - } - ], - "medium-track-count": 18, - "medium-count": 1 - } - ], - "artist-credit-phrase": "camoufly" - }, - { - "id": "f1dc8da0-a6fa-46e8-88dd-7ae72f8b287d", - "ext:score": "51", - "title": "Avril 14th", - "length": "127880", - "artist-credit": [ - { - "name": "Remy van Kesteren", - "artist": { - "id": "2dd6d8e8-1255-4f32-b674-a6d442411994", - "name": "Remy van Kesteren", - "sort-name": "Kesteren, Remy van", - "disambiguation": "Dutch harpist" - } - } - ], - "release-list": [ - { - "id": "b5eff68b-6213-4267-92c8-0e5d996c4c20", - "title": "Muses", - "status": "Official", - "release-group": { - "id": "51cf53b6-d5e7-4a6e-9ed4-6adfbe944240", - "type": "Album", - "title": "Muses", - "primary-type": "Album" - }, - "medium-list": [ - { - "position": "1", - "format": "CD", - "track-list": [ - { - "id": "7c3a7200-d2a2-48bf-a1b2-43d13491dfa9", - "number": "3", - "title": "Avril 14th", - "length": "127880", - "track_or_recording_length": "127880" - } - ], - "track-count": 10 - } - ], - "medium-track-count": 10, - "medium-count": 1 - } - ], - "artist-credit-phrase": "Remy van Kesteren" - }, - { - "id": "d520a819-23bc-4253-a562-abb45970925f", - "ext:score": "51", - "title": "Avril 14th", - "length": "294013", - "artist-credit": [ - { - "name": "Murcof", - "artist": { - "id": "e8d1f02e-7e77-4415-85b6-dc17e08debbf", - "name": "Murcof", - "sort-name": "Murcof" - } - }, - " \u00d7 ", - { - "name": "Vanessa Wagner", - "artist": { - "id": "650bcc6c-61df-4136-a614-64caba859f9e", - "name": "Vanessa Wagner", - "sort-name": "Wagner, Vanessa", - "disambiguation": "French pianist" - } - } - ], - "release-list": [ - { - "id": "e8b8afa3-b0c6-4be6-858c-34a055f90233", - "title": "Statea", - "status": "Official", - "artist-credit": [ - { - "name": "Murcof", - "artist": { - "id": "e8d1f02e-7e77-4415-85b6-dc17e08debbf", - "name": "Murcof", - "sort-name": "Murcof" - } - }, - " x ", - { - "name": "Wagner", - "artist": { - "id": "650bcc6c-61df-4136-a614-64caba859f9e", - "name": "Vanessa Wagner", - "sort-name": "Wagner, Vanessa", - "disambiguation": "French pianist" - } - } - ], - "release-group": { - "id": "1f056295-2cf4-45ed-a421-b75d8dcb9643", - "type": "Album", - "title": "Statea", - "primary-type": "Album" - }, - "date": "2016-09-23", - "country": "XE", - "release-event-list": [ - { - "date": "2016-09-23", - "area": { - "id": "89a675c2-3e37-3518-b83c-418bad59a85a", - "name": "Europe", - "sort-name": "Europe", - "iso-3166-1-code-list": [ - "XE" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "CD", - "track-list": [ - { - "id": "8593ed6c-dcd8-4754-92ff-a5e62e92b1e5", - "number": "3", - "title": "Avril 14th", - "length": "294013", - "track_or_recording_length": "294013" - } - ], - "track-count": 9 - } - ], - "medium-track-count": 9, - "medium-count": 1, - "artist-credit-phrase": "Murcof x Wagner" - }, - { - "id": "18a06d40-45eb-4158-8c6a-e1f9ee2b6a26", - "title": "Statea", - "status": "Official", - "artist-credit": [ - { - "name": "Murcof", - "artist": { - "id": "e8d1f02e-7e77-4415-85b6-dc17e08debbf", - "name": "Murcof", - "sort-name": "Murcof" - } - }, - " x ", - { - "name": "Vanessa Wagner", - "artist": { - "id": "650bcc6c-61df-4136-a614-64caba859f9e", - "name": "Vanessa Wagner", - "sort-name": "Wagner, Vanessa", - "disambiguation": "French pianist" - } - } - ], - "release-group": { - "id": "1f056295-2cf4-45ed-a421-b75d8dcb9643", - "type": "Album", - "title": "Statea", - "primary-type": "Album" - }, - "date": "2016-09-23", - "country": "XW", - "release-event-list": [ - { - "date": "2016-09-23", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "1e0eae3e-bc28-404a-b8eb-2a2a4e1f6c22", - "number": "3", - "title": "Avril 14th", - "length": "294015", - "track_or_recording_length": "294015" - } - ], - "track-count": 9 - } - ], - "medium-track-count": 9, - "medium-count": 1, - "artist-credit-phrase": "Murcof x Vanessa Wagner" - } - ], - "isrc-list": [ - "FRT091600012" - ], - "artist-credit-phrase": "Murcof \u00d7 Vanessa Wagner" - }, - { - "id": "a347bf25-6afd-4606-8cfe-f3f1abe9e813", - "ext:score": "51", - "title": "Avril 14th", - "length": "103000", - "artist-credit": [ - { - "name": "Olga Scheps", - "artist": { - "id": "563783f7-f29c-42a1-8bc2-69a0e724b1d2", - "name": "Olga Scheps", - "sort-name": "Scheps, Olga", - "disambiguation": "pianist" - } - } - ], - "release-list": [ - { - "id": "0cf1baa0-f415-4812-b1d3-eed701958415", - "title": "Melody", - "status": "Official", - "release-group": { - "id": "af3d0957-1090-44fa-abbe-2c87d0799183", - "type": "Album", - "title": "Melody", - "primary-type": "Album" - }, - "date": "2019-03-08", - "country": "XE", - "release-event-list": [ - { - "date": "2019-03-08", - "area": { - "id": "89a675c2-3e37-3518-b83c-418bad59a85a", - "name": "Europe", - "sort-name": "Europe", - "iso-3166-1-code-list": [ - "XE" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "9cbeb0d7-707d-4c1c-a410-9b9defc488d6", - "number": "5", - "title": "Avril 14th", - "length": "103000", - "track_or_recording_length": "103000" - } - ], - "track-count": 15 - } - ], - "medium-track-count": 15, - "medium-count": 1 - } - ], - "artist-credit-phrase": "Olga Scheps" - }, - { - "id": "9d50c2f4-ba48-4632-8e7a-bb01dfe1a9b0", - "ext:score": "51", - "title": "Avril 14th", - "length": "110053", - "artist-credit": [ - { - "name": "Martin Jacoby", - "artist": { - "id": "556ff82a-d276-4dc2-96ba-48afc2235dd2", - "name": "Martin Jacoby", - "sort-name": "Jacoby, Martin", - "disambiguation": "pianist" - } - } - ], - "release-list": [ - { - "id": "b7cb4022-8493-497a-b6d8-434dd834b195", - "title": "Piano Classics in the Heart", - "status": "Official", - "release-group": { - "id": "44fca951-94fa-48c1-9542-91ff7a3ee254", - "type": "Album", - "title": "Piano Classics in the Heart", - "primary-type": "Album" - }, - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "b3e24173-57b4-4c66-b1a4-294342c35b52", - "number": "39", - "title": "Avril 14th", - "length": "110053", - "track_or_recording_length": "110053" - } - ], - "track-count": 40 - } - ], - "medium-track-count": 40, - "medium-count": 1 - } - ], - "artist-credit-phrase": "Martin Jacoby" - }, - { - "id": "13327b67-6d74-4e61-9a79-cb4c075636e5", - "ext:score": "51", - "title": "Avril 14th", - "length": "110000", - "artist-credit": [ - { - "name": "Martin Jacoby", - "artist": { - "id": "556ff82a-d276-4dc2-96ba-48afc2235dd2", - "name": "Martin Jacoby", - "sort-name": "Jacoby, Martin", - "disambiguation": "pianist" - } - } - ], - "release-list": [ - { - "id": "900fee44-25fe-40a5-8b0c-a2ac3ac8b429", - "title": "This Is Relaxing Piano", - "status": "Official", - "artist-credit": [ - { - "name": "Various Artists", - "artist": { - "id": "89ad4ac3-39f7-470e-963a-56509c546377", - "name": "Various Artists", - "sort-name": "Various Artists", - "disambiguation": "add compilations to this artist" - } - } - ], - "release-group": { - "id": "6864a244-3f69-43eb-8ba9-9d6618464f0b", - "type": "Album", - "title": "This Is Relaxing Piano", - "primary-type": "Album" - }, - "date": "2014-11-06", - "country": "XW", - "release-event-list": [ - { - "date": "2014-11-06", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "02e790cd-e62e-4edc-9d84-32235ac97df0", - "number": "17", - "title": "Avril 14th", - "length": "110000", - "track_or_recording_length": "110000" - } - ], - "track-count": 34 - } - ], - "medium-track-count": 34, - "medium-count": 1, - "artist-credit-phrase": "Various Artists" - } - ], - "artist-credit-phrase": "Martin Jacoby" - }, - { - "id": "76335d6f-3dde-44f4-9a73-2ff3a47ad9cb", - "ext:score": "51", - "title": "Avril 14th", - "length": "99429", - "artist-credit": [ - { - "name": "Wizard of Loneliness", - "artist": { - "id": "c15bd3ab-3a70-4191-b18b-1697e7930913", - "name": "Wizard of Loneliness", - "sort-name": "Wizard of Loneliness", - "disambiguation": "Colin Gross" - } - } - ], - "release-list": [ - { - "id": "572e6392-9cd3-439d-b44e-7856544f3e7c", - "title": "Wherever You Go, There You Are", - "status": "Official", - "release-group": { - "id": "360b7fff-e1fe-45dd-85ad-1229b5668b40", - "type": "Album", - "title": "Wherever You Go, There You Are", - "primary-type": "Album" - }, - "date": "2018-01-11", - "country": "XW", - "release-event-list": [ - { - "date": "2018-01-11", - "area": { - "id": "525d4e18-3d00-31b9-a58b-a146a916de8f", - "name": "[Worldwide]", - "sort-name": "[Worldwide]", - "iso-3166-1-code-list": [ - "XW" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "5bbb1f56-c641-440a-8f78-515530e001a2", - "number": "24", - "title": "Avril 14th", - "length": "99429", - "track_or_recording_length": "99429" - } - ], - "track-count": 25 - } - ], - "medium-track-count": 25, - "medium-count": 1 - } - ], - "artist-credit-phrase": "Wizard of Loneliness" - }, - { - "id": "ac2a9213-8915-4543-8c05-566cd792c1da", - "ext:score": "51", - "title": "Avril 14th", - "length": "130000", - "artist-credit": [ - { - "name": "YACHT", - "artist": { - "id": "f6a0a03f-3b2f-4d3a-b4b4-34ca4ce7f3cb", - "name": "YACHT", - "sort-name": "YACHT", - "disambiguation": "electronic project with Jona Bechtolt", - "alias-list": [ - { - "sort-name": "Yacht", - "alias": "Yacht" - }, - { - "sort-name": "Y.A.C.H.T.", - "alias": "Y.A.C.H.T." - } - ] - } - } - ], - "release-list": [ - { - "id": "8a38aa97-0e1a-435b-aa3a-7c1049d56c3b", - "title": "Avril 14th", - "status": "Official", - "artist-credit": [ - { - "name": "YACHT", - "artist": { - "id": "f6a0a03f-3b2f-4d3a-b4b4-34ca4ce7f3cb", - "name": "YACHT", - "sort-name": "YACHT", - "disambiguation": "electronic project with Jona Bechtolt" - } - } - ], - "release-group": { - "id": "e58c38ca-c1c5-43bb-8481-c089ad24e9bc", - "type": "Single", - "title": "Avril 14th", - "primary-type": "Single" - }, - "date": "2020-04-14", - "country": "US", - "release-event-list": [ - { - "date": "2020-04-14", - "area": { - "id": "489ce91b-6658-3307-9877-795b68554c98", - "name": "United States", - "sort-name": "United States", - "iso-3166-1-code-list": [ - "US" - ] - } - } - ], - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "5cb0acf0-3a69-4c0e-9050-8977c0884b82", - "number": "1", - "title": "Avril 14th", - "length": "130000", - "track_or_recording_length": "130000" - } - ], - "track-count": 1 - } - ], - "medium-track-count": 1, - "medium-count": 1, - "artist-credit-phrase": "YACHT" - }, - { - "id": "90c4eae3-ebe8-42ec-a9c1-bb0346caa9d3", - "title": "Sub Versions", - "artist-credit": [ - { - "name": "YACHT", - "artist": { - "id": "f6a0a03f-3b2f-4d3a-b4b4-34ca4ce7f3cb", - "name": "YACHT", - "sort-name": "YACHT", - "disambiguation": "electronic project with Jona Bechtolt" - } - } - ], - "release-group": { - "id": "699a859c-fded-42e2-8c7c-b9b5eaf74746", - "type": "Album", - "title": "Sub Versions", - "primary-type": "Album" - }, - "medium-list": [ - { - "position": "1", - "format": "Digital Media", - "track-list": [ - { - "id": "35e616e7-b076-49fc-8675-a982e25d504d", - "number": "4", - "title": "Avril 14th", - "length": "130000", - "track_or_recording_length": "130000" - } - ], - "track-count": 8 - } - ], - "medium-track-count": 8, - "medium-count": 1, - "artist-credit-phrase": "YACHT" - } - ], - "isrc-list": [ - "QZFYY2166038" - ], - "artist-credit-phrase": "YACHT" - } - ], - "recording-count": 1597816 -} \ No newline at end of file diff --git a/main.py b/main.py index 78e3789..59361a0 100644 --- a/main.py +++ b/main.py @@ -20,6 +20,9 @@ def main(): now_playing = conn.getNowPlaying() + with open('navidrome-request.json', 'w') as file: + file.write(json.dumps(now_playing)) + # print(json.dumps(now_playing, indent=4)) diff --git a/music-history.db b/music-history.db index 5e5d828..ca4126d 100644 Binary files a/music-history.db and b/music-history.db differ diff --git a/scrobble.py b/scrobble.py index 3c288e4..2bf6b33 100644 --- a/scrobble.py +++ b/scrobble.py @@ -1,3 +1,4 @@ +import difflib import logging import json import re @@ -10,15 +11,21 @@ import MusicDatabase logging.basicConfig( format="%(levelname)s %(module)s::%(filename)s::%(funcName)s %(asctime)s - %(message)s", - level=logging.DEBUG + level=logging.DEBUG, + filename="Hey-Listen.log" ) +# TODO : Do something about this +USER_ID = 1 + app = flask.Flask(__name__) musicbrainzngs.set_useragent("Navidrome Scrobbler", "beta 0.0") # Returns a tuple of (track_mbid, album_mbid, artist_mbids: list) -# TODO improve matching instead of assuming the top result is correct +def similarity(a: str, b: str) -> float: + return difflib.SequenceMatcher(None, a.lower(), b.lower()).ratio() + def get_mbid(scrobble: ListenBrainz.ListenBrainzScrobble) -> tuple[str, str, list[str]]: optional_args = {} if scrobble.duration: @@ -26,28 +33,49 @@ def get_mbid(scrobble: ListenBrainz.ListenBrainzScrobble) -> tuple[str, str, lis elif scrobble.duration_ms: optional_args['dur'] = scrobble.duration_ms - result = musicbrainzngs.search_recordings(f"{scrobble.track_name} {scrobble.release_name}", artist=scrobble.artist_name, **optional_args) + query = f"{scrobble.track_name} {scrobble.release_name}" + result = musicbrainzngs.search_recordings(query, artist=scrobble.artist_name, **optional_args) - # logging.debug(json.dumps(result, indent=4)) with open('listen-brain-request.json', 'w') as file: file.write(json.dumps(result, indent=4)) - top_result: dict = result['recording-list'][0] + candidates = result.get('recording-list', []) + if not candidates: + raise ValueError("No MusicBrainz results found.") - # print(json.dumps(top_result, indent=4)) + def score(candidate): + score = 0 + # Title similarity + score += similarity(candidate.get('title', ''), scrobble.track_name) * 2 + # Artist similarity + artist_names = " ".join([a['name'] for a in candidate.get('artist-credit', [])]) + score += similarity(artist_names, scrobble.artist_name) * 2 + # Album similarity + if 'release-list' in candidate and candidate['release-list']: + score += similarity(candidate['release-list'][0].get('title', ''), scrobble.release_name) + # Duration similarity (if available) + if scrobble.duration_ms and 'length' in candidate: + try: + mb_length = int(candidate['length']) + diff = abs(mb_length - scrobble.duration_ms) + score += max(0, 1 - diff / 10000) # 10s tolerance + except Exception: + pass + return score - track_mbid: str = top_result['id'] - track_name: str = top_result['title'] - album_mbid: str = top_result['release-list'][0]['id'] - album_name: str = top_result['release-list'][0]['title'] - # print(json.dumps(top_result[''])) - artist_mbids: list[str] = [artist['artist']['id'] for artist in top_result['artist-credit']] - artist_names: list[str] = [artist['name'] for artist in top_result['artist-credit']] + best = max(candidates, key=score) + + track_mbid: str = best['id'] + track_name: str = best['title'] + album_mbid: str = best['release-list'][0]['id'] if best.get('release-list') else '' + album_name: str = best['release-list'][0]['title'] if best.get('release-list') else '' + artist_mbids: list[str] = [artist['artist']['id'] for artist in best.get('artist-credit', [])] + artist_names: list[str] = [artist['name'] for artist in best.get('artist-credit', [])] logging.debug(f'Matched scrobble with {track_name=} {album_name=} {artist_names=}') return (track_mbid, album_mbid, artist_mbids) -def record_scrobble(scrobble: ListenBrainz.ListenBrainzScrobble) -> None: +def record_scrobble(scrobble: ListenBrainz.ListenBrainzScrobble, user_id: int) -> None: track_mbid, album_mbid, artist_mbids = get_mbid(scrobble) if not (album := MusicDatabase.search_album_by_mbid(album_mbid)): @@ -55,14 +83,28 @@ def record_scrobble(scrobble: ListenBrainz.ListenBrainzScrobble) -> None: artists: list[MusicDatabase.Artist] = [] for artist_mbid in artist_mbids: - if not (artist := MusicDatabase.search_artist_by_mbid(artist_mbid)): - artists.append(MusicDatabase.insert_artist(scrobble.artist_name, artist_mbid)) + artist = MusicDatabase.search_artist_by_mbid(artist_mbid) + if not artist: + artist_id: MusicDatabase.Artist = MusicDatabase.insert_artist(scrobble.artist_name, artist_mbid) + artists.append(artist_id) - if not (track := MusicDatabase.search_song_mbid(track_mbid)) and scrobble.duration_ms: + # Ensure song exists for each artist (one row per artist) + track = MusicDatabase.search_song_mbid(track_mbid) + if not track and scrobble.duration_ms: song_id: int = MusicDatabase.get_last_song_id() + 1 - MusicDatabase.insert_song(song_id, scrobble.track_name, scrobble.duration_ms, album.id, artist.id, track_mbid) - + for artist in artists: + MusicDatabase.insert_song(song_id, scrobble.track_name, scrobble.duration_ms, album.id, artist.id, track_mbid) + track = MusicDatabase.search_song_mbid(track_mbid) + # Insert listen event + if track: + listened_at = getattr(scrobble, 'listened_at', None) + if listened_at is None and hasattr(scrobble, 'timestamp'): + listened_at = scrobble.timestamp + if listened_at is None: + import time + listened_at = int(time.time()) + MusicDatabase.insert_listen_event(track.id, user_id, listened_at, 0) # See https://listenbrainz.readthedocs.io/en/latest/users/json.html#json-doc @app.route('/1/submit-listens', methods=["POST"]) @@ -91,7 +133,7 @@ def submit_listens(): scrobble = ListenBrainz.ListenBrainzScrobble.from_json(scrobble_data) - + record_scrobble(scrobble, USER_ID) return '', 200 diff --git a/sql/insert_listen_event.sql b/sql/insert_listen_event.sql index 3358d43..181c09b 100644 --- a/sql/insert_listen_event.sql +++ b/sql/insert_listen_event.sql @@ -1 +1 @@ -INSERT INTO "listen-events" (sond_id, user_id, date, time) VALUES (?, ?, ?, ?); \ No newline at end of file +INSERT INTO "listen-events" (song_id, user_id, date, time) VALUES (?, ?, ?, ?); \ No newline at end of file