fix: handle download not found exception in HttpDownloader and enforce IPv4 in HTTP agents

This commit is contained in:
Moyasee
2026-01-03 01:08:25 +02:00
parent 2bc0266775
commit de483da51c
5 changed files with 29 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
import aria2p
from aria2p.client import ClientException as DownloadNotFound
class HttpDownloader:
def __init__(self):
@@ -36,7 +37,11 @@ class HttpDownloader:
if self.download == None:
return None
download = self.aria2.get_download(self.download.gid)
try:
download = self.aria2.get_download(self.download.gid)
except DownloadNotFound:
self.download = None
return None
response = {
'folderName': download.name,