Subsonic API: added common answer fields

This commit is contained in:
emeric
2023-10-06 08:41:53 +02:00
parent 06b0880a7d
commit 621e1f98db
3 changed files with 11 additions and 6 deletions
@@ -31,6 +31,7 @@ namespace API::Subsonic
};
static inline constexpr ProtocolVersion defaultServerProtocolVersion{ 1, 16, 0 };
static inline constexpr std::string_view serverVersion{ "1" };
}
namespace StringUtils
+5 -1
View File
@@ -130,7 +130,11 @@ namespace API::Subsonic
responseNode.setAttribute("status", "ok");
responseNode.setVersionAttribute(protocolVersion);
responseNode.setAttribute("type", "lms"); // non standard field to ease client hacks
// OpenSubsonic mandatory fields
responseNode.setAttribute("type", "lms");
responseNode.setAttribute("serverVersion", serverVersion);
responseNode.setAttribute("openSubsonic", true);
return response;
}