[DB] Added detection for duplicated audio files (mbid or checksum)

This commit is contained in:
emeric
2016-02-01 20:48:58 +01:00
parent e912b1bad7
commit b9a7707849
6 changed files with 65 additions and 1 deletions
+12
View File
@@ -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();
}