Skip to content

Commit

Permalink
tinyxml2: Fix syntax for sonarr compatibility (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
stickz authored Dec 28, 2024
1 parent 5bac501 commit 2cdf93a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rtorrent/src/rpc/xmlrpc_tinyxml2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,14 @@ print_object_xml(const torrent::Object& obj, tinyxml2::XMLPrinter* printer) {
break;
case torrent::Object::TYPE_LIST:
printer->OpenElement("array", true);
printer->OpenElement("data", true);
for (const auto& itr : obj.as_list()) {
printer->OpenElement("value", true);
print_object_xml(itr, printer);
printer->CloseElement(true);
}
printer->CloseElement(true);
printer->CloseElement(true);
break;
case torrent::Object::TYPE_MAP:
printer->OpenElement("struct", true);
Expand All @@ -175,7 +177,7 @@ print_object_xml(const torrent::Object& obj, tinyxml2::XMLPrinter* printer) {
break;
case torrent::Object::TYPE_DICT_KEY:
printer->OpenElement("array", true);

printer->OpenElement("data", true);
printer->OpenElement("value", true);
print_object_xml(obj.as_dict_key(), printer);
printer->CloseElement(true);
Expand All @@ -192,6 +194,7 @@ print_object_xml(const torrent::Object& obj, tinyxml2::XMLPrinter* printer) {
printer->CloseElement(true);
}
printer->CloseElement(true);
printer->CloseElement(true);
break;
default:
printer->OpenElement("i4", true);
Expand Down

0 comments on commit 2cdf93a

Please sign in to comment.