Added a config parameter to set the read style used by the metadata parser. Default value switched from fast to accurate

This commit is contained in:
emeric
2022-08-21 14:17:20 +02:00
parent 1fb838c8d0
commit 5324d1fd15
12 changed files with 137 additions and 14 deletions
+15
View File
@@ -23,6 +23,8 @@
#include <iomanip>
#include <sstream>
#include "utils/Exception.hpp"
namespace MetaData::Utils
{
Wt::WDate
@@ -56,5 +58,18 @@ namespace MetaData::Utils
return {};
}
std::string_view
readStyleToString(ParserReadStyle readStyle)
{
switch (readStyle)
{
case ParserReadStyle::Fast: return "fast";
case ParserReadStyle::Average: return "average";
case ParserReadStyle::Accurate: return "accurate";
}
throw LmsException {"Unknown read style"};
}
}