fix(subsonic): AttributeError when getting user profile

This commit is contained in:
Alexandra Parker 2021-09-05 13:56:34 +00:00 committed by Georg Krause
commit 79587b801e
3 changed files with 9 additions and 2 deletions

View file

@ -75,7 +75,12 @@ def dict_to_xml_tree(root_tag, d, parent=None):
root.append(dict_to_xml_tree(key, value, parent=root))
elif isinstance(value, list):
for obj in value:
root.append(dict_to_xml_tree(key, obj, parent=root))
if isinstance(obj, dict):
el = dict_to_xml_tree(key, obj, parent=root)
else:
el = ET.Element(key)
el.text = str(obj)
root.append(el)
else:
if key == "value":
root.text = str(value)