Never get downloads from the cache.
This is a workaround for corrupted files because Qt somehow reads them from the cache wrongly. See https://bugreports.qt-project.org/browse/QTBUG-42757 This might fix a part of #78 - but we'll leave this open for now, since it might also be another issue.
This commit is contained in:
parent
b8b31fd914
commit
283cedff15
@ -411,6 +411,10 @@ class DownloadManager(QAbstractListModel):
|
|||||||
urlutils.invalid_url_error(self._win_id, url, "start download")
|
urlutils.invalid_url_error(self._win_id, url, "start download")
|
||||||
return
|
return
|
||||||
req = QNetworkRequest(url)
|
req = QNetworkRequest(url)
|
||||||
|
# WORKAROUND for Qt corrupting data loaded from cache:
|
||||||
|
# https://bugreports.qt-project.org/browse/QTBUG-42757
|
||||||
|
req.setAttribute(QNetworkRequest.CacheLoadControlAttribute,
|
||||||
|
QNetworkRequest.AlwaysNetwork)
|
||||||
if page is None:
|
if page is None:
|
||||||
nam = self._networkmanager
|
nam = self._networkmanager
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user