diff --git a/musicbrainzngs/mbxml.py b/musicbrainzngs/mbxml.py
index e85fe7cb..d8f662a0 100644
--- a/musicbrainzngs/mbxml.py
+++ b/musicbrainzngs/mbxml.py
@@ -495,7 +495,7 @@ def parse_release_group(rg):
def parse_recording(recording):
result = {}
attribs = ["id", "ext:score"]
- elements = ["title", "length", "user-rating", "disambiguation", "video"]
+ elements = ["title", "length", "user-rating", "disambiguation", "video", "first-release-date"]
inner_els = {"artist-credit": parse_artist_credit,
"release-list": parse_release_list,
"tag-list": parse_tag_list,
@@ -548,7 +548,8 @@ def parse_work(work):
"iswc-list": parse_element_list,
"relation-list": parse_relation_list,
"annotation": parse_response_message,
- "attribute-list": parse_work_attribute_list
+ "attribute-list": parse_work_attribute_list,
+ "language-list": parse_element_list,
}
result.update(parse_attributes(attribs, work))
diff --git a/test/data/recording/f606f733-c1eb-43f3-93c1-71994ea611e3-artist-rels.xml b/test/data/recording/f606f733-c1eb-43f3-93c1-71994ea611e3-artist-rels.xml
index 9905a116..9746707c 100644
--- a/test/data/recording/f606f733-c1eb-43f3-93c1-71994ea611e3-artist-rels.xml
+++ b/test/data/recording/f606f733-c1eb-43f3-93c1-71994ea611e3-artist-rels.xml
@@ -1 +1,2 @@
-Shades of Gray25960009b1131d-9803-4acf-8b3c-3438e6c2b9c7backwardTom JungJung, Tom09b1131d-9803-4acf-8b3c-3438e6c2b9c7backwardTom JungJung, Tom83c6ecce-ebc2-4064-ad28-49c7354469f4backwardpianoBilly BarberBarber, Billy83c6ecce-ebc2-4064-ad28-49c7354469f4backwardBilly BarberBarber, Billy
\ No newline at end of file
+
+Shades of Gray259600198483c6ecce-ebc2-4064-ad28-49c7354469f4backwardpianoBilly BarberBarber, Billy83c6ecce-ebc2-4064-ad28-49c7354469f4backwardBilly BarberBarber, Billy09b1131d-9803-4acf-8b3c-3438e6c2b9c7backwardTom JungJung, Tom09b1131d-9803-4acf-8b3c-3438e6c2b9c7backwardTom JungJung, Tom
diff --git a/test/data/work/72c9aad2-3c95-4e3e-8a01-3974f8fef8eb-series-rels.xml b/test/data/work/72c9aad2-3c95-4e3e-8a01-3974f8fef8eb-series-rels.xml
index 9b8fb7ef..1a523124 100644
--- a/test/data/work/72c9aad2-3c95-4e3e-8a01-3974f8fef8eb-series-rels.xml
+++ b/test/data/work/72c9aad2-3c95-4e3e-8a01-3974f8fef8eb-series-rels.xml
@@ -1 +1,2 @@
-Cantata, BuxWV 1 "Accedite gentes, accurite populi"lat0790fa51-15d9-40a2-bca9-9c8eaaa96bef1backwardnumberBuxtehude-Werke-Verzeichnis
\ No newline at end of file
+
+Cantata, BuxWV 1 "Accedite gentes, accurite populi"latlat0790fa51-15d9-40a2-bca9-9c8eaaa96bef1backwardnumberBuxtehude-Werke-Verzeichnis
diff --git a/test/test_mbxml_recording.py b/test/test_mbxml_recording.py
index c8333b07..38dd3633 100644
--- a/test/test_mbxml_recording.py
+++ b/test/test_mbxml_recording.py
@@ -19,10 +19,20 @@ def testRecordingRelationCreditedAs(self):
self.assertEqual(4, len(rels))
# Original attributes
- attributes = rels[2]["attribute-list"]
+ print(rels[0])
+ print(rels[1])
+ print(rels[2])
+ print(rels[3])
+ attributes = rels[0]["attribute-list"]
self.assertEqual("piano", attributes[0])
# New attribute dict format
- attributes = rels[2]["attributes"]
- expected = {"attribute": "piano", "credited-as": "Yamaha and Steinway pianos"}
+ attributes = rels[0]["attributes"]
+ expected = {"attribute": "piano",
+ "credited-as": "Yamaha and Steinway pianos",
+ "type-id": "b3eac5f9-7859-4416-ac39-7154e2e8d348"}
self.assertEqual(expected, attributes[0])
+
+ def testFirstReleaseDate(self):
+ res = _common.open_and_parse_test_data(self.datadir, "f606f733-c1eb-43f3-93c1-71994ea611e3-artist-rels.xml")
+ self.assertEqual(res["recording"]["first-release-date"], "1984")
diff --git a/test/test_mbxml_work.py b/test/test_mbxml_work.py
index f9dc9ecb..aebf5d6a 100644
--- a/test/test_mbxml_work.py
+++ b/test/test_mbxml_work.py
@@ -23,7 +23,6 @@ def testWorkAliases(self):
self.assertEqual(a1["alias"], 'Symphony No. 3, Op. 55 "Eroica"')
self.assertEqual(a1["sort-name"], 'Symphony No. 3, Op. 55 "Eroica"')
-
res = _common.open_and_parse_test_data(self.datadir, "3d7c7cd2-da79-37f4-98b8-ccfb1a4ac6c4-aliases.xml")
aliases = res["work"]["alias-list"]
self.assertEqual(len(aliases), 10)
@@ -65,5 +64,13 @@ def testWorkRelationAttributes(self):
# New attribute dict format
attributes = rels[0]["attributes"]
- expected = {"attribute": "number", "value": "BuxWV 1"}
+ expected = {"attribute": "number",
+ "value": "BuxWV 1",
+ "type-id": "a59c5830-5ec7-38fe-9a21-c7ea54f6650a"}
self.assertEqual(expected, attributes[0])
+
+ def testWorkLanguage(self):
+ res = _common.open_and_parse_test_data(self.datadir, "72c9aad2-3c95-4e3e-8a01-3974f8fef8eb-series-rels.xml")
+ work = res["work"]
+ self.assertEqual(work["language"], "lat")
+ self.assertEqual(work["language-list"], ["lat"])