Add a stop-gap solution for AssertionError when retrying downloads
See #3847
This commit is contained in:
parent
2b6b4e82a7
commit
979b7cfaba
@ -90,6 +90,7 @@ Fixed
|
|||||||
- `@match` in Greasemonkey scripts now more closely matches the proper pattern
|
- `@match` in Greasemonkey scripts now more closely matches the proper pattern
|
||||||
syntax.
|
syntax.
|
||||||
- Searching via `/` or `?` now doesn't handle any characters in a special way.
|
- Searching via `/` or `?` now doesn't handle any characters in a special way.
|
||||||
|
- Fixed crash when trying to retry some failed downloads on QtWebEngine.
|
||||||
|
|
||||||
v1.2.1
|
v1.2.1
|
||||||
------
|
------
|
||||||
|
@ -101,7 +101,11 @@ class DownloadItem(downloads.AbstractDownloadItem):
|
|||||||
|
|
||||||
def retry(self):
|
def retry(self):
|
||||||
state = self._qt_item.state()
|
state = self._qt_item.state()
|
||||||
assert state == QWebEngineDownloadItem.DownloadInterrupted, state
|
if state != QWebEngineDownloadItem.DownloadInterrupted:
|
||||||
|
log.downloads.warning(
|
||||||
|
"Trying to retry download in state {}".format(
|
||||||
|
debug.qenum_key(QWebEngineDownloadItem, state)))
|
||||||
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self._qt_item.resume()
|
self._qt_item.resume()
|
||||||
|
Loading…
Reference in New Issue
Block a user