mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2024-08-17 09:10:26 +03:00
Fixes issue #2105 by using the original url for the download. This fix is
valid because we expect the url to contain the actual filename at the end. This also allows huggingface to track the download as happening. Signed-off-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
parent
a6a3e0048a
commit
0daf37ab8a
@ -1922,7 +1922,7 @@ void ModelList::handleDiscoveryItemFinished()
|
||||
QString repoCommit = QString::fromUtf8(repoCommitHeader);
|
||||
QString linkedSize = QString::fromUtf8(linkedSizeHeader);
|
||||
QString linkedEtag = QString::fromUtf8(linkedEtagHeader);
|
||||
QString url = locationHeader;
|
||||
|
||||
QString modelFilename = reply->request().attribute(QNetworkRequest::UserMax).toString();
|
||||
QString modelFilesize = linkedSize;
|
||||
modelFilesize = ModelList::toFileSize(modelFilesize.toULongLong());
|
||||
@ -1953,7 +1953,7 @@ void ModelList::handleDiscoveryItemFinished()
|
||||
{ ModelList::FilesizeRole, modelFilesize },
|
||||
{ ModelList::DescriptionRole, description },
|
||||
{ ModelList::IsDiscoveredRole, true },
|
||||
{ ModelList::UrlRole, url },
|
||||
{ ModelList::UrlRole, reply->request().url() },
|
||||
{ ModelList::LikesRole, likes },
|
||||
{ ModelList::DownloadsRole, downloads },
|
||||
{ ModelList::RecencyRole, lastModified },
|
||||
|
Loading…
Reference in New Issue
Block a user