[DB] Added detection for duplicated audio files (mbid or checksum)
This commit is contained in:
@@ -118,4 +118,16 @@ stringToUTF8(const std::string& str)
|
||||
return boost::locale::conv::to_utf<char>(str, "UTF-8");
|
||||
}
|
||||
|
||||
std::string
|
||||
bufferToString(const std::vector<unsigned char>& data)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
||||
for (unsigned char c : data)
|
||||
{
|
||||
oss << std::setw(2) << std::setfill('0') << std::hex << (int)c;
|
||||
}
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,9 @@ stringTrim(const std::string& str, const std::string& whitespace = " \t");
|
||||
std::string
|
||||
stringToUTF8(const std::string& str);
|
||||
|
||||
std::string
|
||||
bufferToString(const std::vector<unsigned char>& data);
|
||||
|
||||
template<typename T>
|
||||
static inline bool readAs(const std::string& str, T& data)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user