Commits

Rune Halvorsen committed 6ba6257

Fixed regression where album was omitted from track results
Added test for this
(thanks Oscar)

Comments (0)

Files changed (2)

spotimeta/parser.py

             ret["length"] = float(_text(elem))
         elif name == "popularity":
             ret["popularity"] = float(_text(elem))
+        elif name == "album":
+            ret["album"] = parse_album(elem)
         elif name == "id":
             if not "ids" in ret:
                 ret["ids"] = []

tests/test_parsers.py

     assert "start_index" in res
     assert res["start_index"] == 0
 
+    assert "result" in res
+
+    hits = res["result"]
+    track = hits[0]
+
+    assert "album" in track
+
+
 def test_track_multiple_artists():
     path = join(xmldir, "tc_track_multiple_artists.xml")
     fp = open(path)