diff --git a/whipper/test/test_common_mbngs.py b/whipper/test/test_common_mbngs.py index 231fba7..aa5b01b 100644 --- a/whipper/test/test_common_mbngs.py +++ b/whipper/test/test_common_mbngs.py @@ -12,13 +12,15 @@ from whipper.common import mbngs class MetadataTestCase(unittest.TestCase): # Generated with rip -R cd info - def testJeffEverybodySingle(self): - filename = 'whipper.release.3451f29c-9bb8-4cc5-bfcc-bd50104b94f8.json' + def testMissingReleaseDate(self): + # Using: The KLF - Space & Chill Out + # https://musicbrainz.org/release/c56ff16e-1d81-47de-926f-ba22891bd2bd + filename = 'whipper.release.c56ff16e-1d81-47de-926f-ba22891bd2bd.json' path = os.path.join(os.path.dirname(__file__), filename) handle = open(path, "rb") response = json.loads(handle.read()) handle.close() - discid = "wbjbST2jUHRZaB1inCyxxsL7Eqc-" + discid = "b.yqPuCBdsV5hrzDvYrw52iK_jE-" metadata = mbngs._getMetadata({}, response['release'], discid) diff --git a/whipper/test/whipper.release.3451f29c-9bb8-4cc5-bfcc-bd50104b94f8.json b/whipper/test/whipper.release.3451f29c-9bb8-4cc5-bfcc-bd50104b94f8.json deleted file mode 100644 index 700a959..0000000 --- a/whipper/test/whipper.release.3451f29c-9bb8-4cc5-bfcc-bd50104b94f8.json +++ /dev/null @@ -1 +0,0 @@ -{"release": {"status": "Official", "artist-credit": [{"artist": {"sort-name": "Buckley, Jeff", "id": "e6e879c0-3d56-4f12-b3c5-3ce459661a8e", "name": "Jeff Buckley"}}], "barcode": "9399700053173", "asin": "B00000891P", "label-info-count": 1, "label-info-list": [{"catalog-number": "665848.2", "label": {"label-code": "162", "sort-name": "Columbia", "disambiguation": "imprint owned by CBS between 1938\u20131990 within US/CA/MX; owned worldwide by Sony Music Entertainment since 1991 except in JP", "id": "011d1192-6f65-45bd-85c4-0400dd45693e", "name": "Columbia"}}], "cover-art-archive": {"count": "0", "front": "false", "back": "false", "artwork": "false"}, "release-event-list": [{"date": "1998", "area": {"sort-name": "Australia", "iso-3166-1-code-list": ["AU"], "id": "106e0bec-b638-3b37-b731-f53d507dc00e", "name": "Australia"}}], "packaging": "Jewel Case", "text-representation": {"language": "eng", "script": "Latn"}, "date": "1998", "quality": "normal", "id": "3451f29c-9bb8-4cc5-bfcc-bd50104b94f8", "release-event-count": 1, "title": "Everybody Here Wants You", "country": "AU", "medium-count": 1, "artist-credit-phrase": "Jeff Buckley", "medium-list": [{"position": "1", "track-count": 5, "format": "CD", "disc-list": [{"offset-list": [150, 21640, 36996, 58631, 101683], "id": "C6N7.QADBQ968Qr8OOjxfQlGtA8-", "sectors": "122983", "offset-count": 5}, {"offset-list": [150, 21640, 36996, 58631, 101683], "id": "wbjbST2jUHRZaB1inCyxxsL7Eqc-", "sectors": "122833", "offset-count": 5}], "track-list": [{"artist-credit": [{"artist": {"sort-name": "Buckley, Jeff", "id": "e6e879c0-3d56-4f12-b3c5-3ce459661a8e", "name": "Jeff Buckley"}}], "number": "1", "artist-credit-phrase": "Jeff Buckley", "recording": {"artist-credit": [{"artist": {"sort-name": "Buckley, Jeff", "id": "e6e879c0-3d56-4f12-b3c5-3ce459661a8e", "name": "Jeff Buckley"}}], "length": "285480", "artist-credit-phrase": "Jeff Buckley", "id": "8f8c284b-6818-4a66-a517-37dc8c04a881", "title": "Everybody Here Wants You"}, "length": "286533", "position": "1", "id": "0e611773-a7f2-3dfb-82f9-7f7915d3406e", "track_or_recording_length": "286533"}, {"artist-credit": [{"artist": {"sort-name": "Buckley, Jeff", "id": "e6e879c0-3d56-4f12-b3c5-3ce459661a8e", "name": "Jeff Buckley"}}], "number": "2", "artist-credit-phrase": "Jeff Buckley", "recording": {"artist-credit": [{"artist": {"sort-name": "Buckley, Jeff", "id": "e6e879c0-3d56-4f12-b3c5-3ce459661a8e", "name": "Jeff Buckley"}}], "length": "204746", "artist-credit-phrase": "Jeff Buckley", "id": "7d939d14-06a2-478e-b279-ebe20fae8b2f", "title": "Thousand Fold"}, "length": "204746", "position": "2", "id": "1f2c5c05-c364-33f9-8845-5c14b1893bba", "track_or_recording_length": "204746"}, {"artist-credit": [{"artist": {"sort-name": "Buckley, Jeff", "id": "e6e879c0-3d56-4f12-b3c5-3ce459661a8e", "name": "Jeff Buckley"}}], "number": "3", "artist-credit-phrase": "Jeff Buckley", "recording": {"artist-credit": [{"artist": {"sort-name": "Buckley, Jeff", "id": "e6e879c0-3d56-4f12-b3c5-3ce459661a8e", "name": "Jeff Buckley"}}], "length": "288466", "artist-credit-phrase": "Jeff Buckley", "id": "54323c4c-e0f6-4a81-8b80-e1c0b822a3f7", "title": "Eternal Life (road version)"}, "length": "288466", "position": "3", "id": "5158457a-091e-3923-b1c3-8b37038234ad", "track_or_recording_length": "288466"}, {"artist-credit": [{"artist": {"sort-name": "Buckley, Jeff", "id": "e6e879c0-3d56-4f12-b3c5-3ce459661a8e", "name": "Jeff Buckley"}}], "number": "4", "artist-credit-phrase": "Jeff Buckley", "recording": {"artist-credit": [{"artist": {"sort-name": "Buckley, Jeff", "id": "e6e879c0-3d56-4f12-b3c5-3ce459661a8e", "name": "Jeff Buckley"}}], "length": "574026", "artist-credit-phrase": "Jeff Buckley", "id": "4dda67d1-8123-4545-9a78-7b4232089e96", "title": "Hallelujah (live)"}, "length": "574026", "position": "4", "id": "200de0b9-9221-351f-8109-8e53fc289fd5", "track_or_recording_length": "574026"}, {"artist-credit": [{"artist": {"sort-name": "Buckley, Jeff", "id": "e6e879c0-3d56-4f12-b3c5-3ce459661a8e", "name": "Jeff Buckley"}}], "number": "5", "artist-credit-phrase": "Jeff Buckley", "recording": {"artist-credit": [{"artist": {"sort-name": "Buckley, Jeff", "id": "e6e879c0-3d56-4f12-b3c5-3ce459661a8e", "name": "Jeff Buckley"}}], "length": "284000", "artist-credit-phrase": "Jeff Buckley", "id": "5db42013-aa5c-4eb4-a549-46ca721990cf", "title": "Last Goodbye (live from Sydney)"}, "length": "284000", "position": "5", "id": "8ad80590-99d6-3c13-bf6b-8cc7f3b4998d", "track_or_recording_length": "284000"}], "disc-count": 2}]}} \ No newline at end of file diff --git a/whipper/test/whipper.release.c56ff16e-1d81-47de-926f-ba22891bd2bd.json b/whipper/test/whipper.release.c56ff16e-1d81-47de-926f-ba22891bd2bd.json new file mode 100644 index 0000000..09f5b83 --- /dev/null +++ b/whipper/test/whipper.release.c56ff16e-1d81-47de-926f-ba22891bd2bd.json @@ -0,0 +1 @@ +{"release": {"status": "Bootleg", "artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "label-info-list": [], "title": "Space & Chill Out", "label-info-count": 0, "medium-count": 1, "cover-art-archive": {"count": "0", "front": "false", "back": "false", "artwork": "false"}, "medium-list": [{"position": "1", "track-count": 12, "format": "CD", "disc-list": [{"offset-list": [182, 8067, 14985, 28407, 39920, 74532, 79825, 93370, 135732, 162415, 168137, 182882], "id": "b.yqPuCBdsV5hrzDvYrw52iK_jE-", "sectors": "355532", "offset-count": 12}], "track-list": [{"recording": {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "length": "107066", "artist-credit-phrase": "The KLF", "id": "254c95dd-71e2-4a38-8267-bdbe046c5ace", "title": "Brownsville Turnaround on the Tex-Mex Border"}, "artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "length": "105133", "title": "Brownsville Turnaround", "position": "1", "artist-credit-phrase": "The KLF", "track_or_recording_length": "105133", "id": "1f417f2b-e049-3ff1-9a08-d787dfd47b19", "number": "1"}, {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "number": "2", "artist-credit-phrase": "The KLF", "recording": {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "length": "89000", "artist-credit-phrase": "The KLF", "id": "cfe7f2bb-ce37-434f-9d26-b0d523cd8e6e", "title": "Pulling Out of Ricardo and the Dusk Is Falling Fast"}, "length": "92240", "position": "2", "id": "2b6c44dc-e1bd-3feb-b889-746c0bb22eb9", "track_or_recording_length": "92240"}, {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "number": "3", "artist-credit-phrase": "The KLF", "recording": {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "length": "181040", "artist-credit-phrase": "The KLF", "id": "b8fcd38a-59df-4f1c-a944-f836e8592b94", "title": "Six Hours to Louisiana, Black Coffee Going Cold"}, "length": "178960", "position": "3", "id": "13639dfc-3332-31c6-8fb5-4d0241e81dde", "track_or_recording_length": "178960"}, {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "number": "4", "artist-credit-phrase": "The KLF", "recording": {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "length": "155333", "artist-credit-phrase": "The KLF", "id": "20a3421a-36cd-4b60-8dfb-118caef8c6d8", "title": "Dream Time in Lake Jackson"}, "length": "153506", "position": "4", "id": "1b222630-1cc6-3f7e-9dc8-14d0d88ac054", "track_or_recording_length": "153506"}, {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "number": "5", "artist-credit-phrase": "The KLF", "recording": {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "length": "460866", "artist-credit-phrase": "The KLF", "id": "bd90d2bf-fff9-4aaa-9c3f-7bacbc9d5421", "title": "Madrugada Eterna"}, "length": "461493", "position": "5", "id": "576a010d-1ea7-3525-a32b-2dce207d0ce3", "track_or_recording_length": "461493"}, {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "number": "6", "artist-credit-phrase": "The KLF", "recording": {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "length": "68560", "artist-credit-phrase": "The KLF", "id": "5ea8a91d-5425-49ae-90f6-6acfefda4a59", "title": "Justified and Ancient Seems a Long Time Ago"}, "length": "70573", "position": "6", "id": "9e29c06a-c74b-3b0f-a170-98a1c0ea51d9", "track_or_recording_length": "70573"}, {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "number": "7", "artist-credit-phrase": "The KLF", "recording": {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "length": "181440", "artist-credit-phrase": "The KLF", "id": "f246f658-49c4-4efe-840e-c624b7850bc9", "title": "Elvis on the Radio, Steel Guitar in My Soul"}, "length": "180600", "position": "7", "id": "cdd8ed03-4b32-3c39-81f6-cd513369225e", "track_or_recording_length": "180600"}, {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "number": "8", "artist-credit-phrase": "The KLF", "recording": {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "length": "564933", "artist-credit-phrase": "The KLF", "id": "a173d428-4e12-4513-8df2-eb7f098e6364", "title": "3 A.M. Somewhere Out of Beaumont"}, "length": "564826", "position": "8", "id": "58a8cbf9-10a1-32c8-8cd7-f6893c5050ab", "track_or_recording_length": "564826"}, {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "number": "9", "artist-credit-phrase": "The KLF", "recording": {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "length": "356000", "artist-credit-phrase": "The KLF", "id": "b7bc1dc2-a468-4948-b628-e03fc9265d41", "title": "Wichita Lineman Was a Song I Once Heard"}, "length": "355773", "position": "9", "id": "42679959-2e1a-3085-842a-a443ebc37733", "track_or_recording_length": "355773"}, {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "number": "10", "artist-credit-phrase": "The KLF", "recording": {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "length": "76026", "artist-credit-phrase": "The KLF", "id": "035e349d-b581-4c0e-818f-ae14e10bc26f", "title": "Trancentral Lost in My Mind"}, "length": "76293", "position": "10", "id": "716fe2c9-47b8-3719-8586-e4ed47694a10", "track_or_recording_length": "76293"}, {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "number": "11", "artist-credit-phrase": "The KLF", "recording": {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "length": "214266", "artist-credit-phrase": "The KLF", "id": "d9dd3bc7-ae2a-4b62-a545-8a60f5704a7d", "title": "The Lights of Baton Rouge Pass By"}, "length": "196600", "position": "11", "id": "3220c725-d7cb-3d81-8fb9-91e5a2f94cc9", "track_or_recording_length": "196600"}, {"artist-credit": [{"artist": {"sort-name": "KLF, The", "disambiguation": "British electronic band", "id": "8092b8b7-235e-4844-9f72-95a9d5a73dbf", "name": "The KLF"}}], "recording": {"artist-credit": [{"artist": {"sort-name": "Space", "disambiguation": "Jimmy Cauty's ambient off-shoot of The Orb/The KLF", "id": "22240df3-8dcc-4272-9294-d127442e7f36", "name": "Space"}}], "length": "2302560", "artist-credit-phrase": "Space", "id": "42391d00-df70-4014-83f8-e980a6b695b3", "title": "Mercury / Venus / Mars / Jupiter / Saturn / Uranus / Neptune / Pluto"}, "length": "2302000", "title": "Space", "position": "12", "artist-credit-phrase": "The KLF", "track_or_recording_length": "2302000", "id": "b65aa927-6edf-340b-82b4-fbc34a5f5a0b", "number": "12"}], "disc-count": 1}], "text-representation": {"language": "eng", "script": "Latn"}, "artist-credit-phrase": "The KLF", "quality": "normal", "id": "c56ff16e-1d81-47de-926f-ba22891bd2bd"}} \ No newline at end of file