validate metadata on launch
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
4aa2e5b85d
commit
2af6902b42
30 changed files with 253 additions and 215 deletions
|
@ -283,8 +283,7 @@ Net::NetRequest::Ptr AssetObject::getDownloadAction()
|
|||
if ((!objectFile.isFile()) || (objectFile.size() != size)) {
|
||||
auto objectDL = Net::ApiDownload::makeFile(getUrl(), objectFile.filePath());
|
||||
if (hash.size()) {
|
||||
auto rawHash = QByteArray::fromHex(hash.toLatin1());
|
||||
objectDL->addValidator(new Net::ChecksumValidator(QCryptographicHash::Sha1, rawHash));
|
||||
objectDL->addValidator(new Net::ChecksumValidator(QCryptographicHash::Sha1, hash));
|
||||
}
|
||||
objectDL->setProgress(objectDL->getProgress(), size);
|
||||
return objectDL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue