Added embedded/external lyrics support: parsing + indexing, ref #379

This commit is contained in:
emeric
2024-10-26 16:58:13 +02:00
parent 74a1a3063f
commit 72b1367ea6
51 changed files with 2034 additions and 253 deletions
+2 -2
View File
@@ -21,8 +21,8 @@
#include <filesystem>
#include <functional>
#include <span>
#include <string>
#include <vector>
#include <Wt/WDateTime.h>
@@ -41,7 +41,7 @@ namespace lms::core::pathUtils
bool exploreFilesRecursive(const std::filesystem::path& directory, std::function<bool(std::error_code, const std::filesystem::path&)> cb, const std::filesystem::path* excludeDirFileName = {});
// Check if file's extension is one of provided extensions
bool hasFileAnyExtension(const std::filesystem::path& file, const std::vector<std::filesystem::path>& extensions);
bool hasFileAnyExtension(const std::filesystem::path& file, std::span<const std::filesystem::path> extensions);
// Check if a path is within a directory (excludeDirFileName is a relative can be used to exclude a whole directory and its subdirectory, must not have parent_path)
// Caller responsibility to call with normalized paths
+2 -2
View File
@@ -51,8 +51,8 @@ namespace lms::core::stringUtils
[[nodiscard]] std::string escapeAndJoinStrings(std::span<const std::string_view> strings, char delimiter, char escapeChar);
[[nodiscard]] std::vector<std::string> splitEscapedStrings(std::string_view string, char delimiter, char escapeChar);
[[nodiscard]] std::string_view stringTrim(std::string_view str, std::string_view whitespaces = " \t");
[[nodiscard]] std::string_view stringTrimEnd(std::string_view str, std::string_view whitespaces = " \t");
[[nodiscard]] std::string_view stringTrim(std::string_view str, std::string_view whitespaces = " \t\r");
[[nodiscard]] std::string_view stringTrimEnd(std::string_view str, std::string_view whitespaces = " \t\r");
[[nodiscard]] std::string stringToLower(std::string_view str);
void stringToLower(std::string& str);