Subsonic API: try to recognize some formats in stream endpoint (mp3, opus, vorbis)

This commit is contained in:
emeric
2023-10-15 15:42:09 +02:00
parent 806599dedb
commit 8780bbdffa
14 changed files with 670 additions and 763 deletions
+14
View File
@@ -177,6 +177,20 @@ namespace StringUtils
return oss.str();
}
bool stringCaseInsensitiveEqual(std::string_view strA, std::string_view strB)
{
if (strA.size() != strB.size())
return false;
for (std::size_t i{}; i < strA.size(); ++i)
{
if (std::tolower(strA[i]) != std::tolower(strB[i]))
return false;
}
return true;
}
void capitalize(std::string& str)
{
for (auto it{ std::begin(str) }; it != std::end(str); ++it)