Added album sort name in subsonic responses, fixes #419

This commit is contained in:
emeric
2024-03-02 23:05:20 +01:00
parent f20db00417
commit b45513a611
17 changed files with 56 additions and 18 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ namespace API::Subsonic::Utils
throw NotImplementedGenericError{};
}
std::string makeNameFilesystemCompatible(const std::string& name)
std::string makeNameFilesystemCompatible(std::string_view name)
{
return StringUtils::replaceInString(name, "/", "_");
}
+2 -1
View File
@@ -20,9 +20,10 @@
#pragma once
#include <string>
#include <string_view>
namespace API::Subsonic::Utils
{
void checkSetPasswordImplemented();
std::string makeNameFilesystemCompatible(const std::string& name);
std::string makeNameFilesystemCompatible(std::string_view name);
}
@@ -106,6 +106,8 @@ namespace API::Subsonic
return albumNode;
// OpenSubsonic specific fields (must always be set)
albumNode.setAttribute("sortName", release->getSortName());
if (!id3)
albumNode.setAttribute("mediaType", "album");