Some fixes (#83)

This commit is contained in:
FA Tulloh 2021-05-09 16:48:25 +08:00 committed by GitHub
parent e94b7bb104
commit 080039d3f5
Signed by untrusted user: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,14 +34,15 @@ class AriaDownloadHelper(DownloadHelper):
dl.getListener().onDownloadError(f'File is already available in drive.\n\n')
sendMarkup("Here are the search results:", dl.getListener().bot, dl.getListener().update, button)
aria2.remove([download])
return
size = download.total_length
if ENABLE_FILESIZE_LIMIT:
if size / 1024 / 1024 / 1024 > MAX_TORRENT_SIZE:
LOGGER.info(f" Download size Exceeded: {gid}")
LOGGER.info(f"Download size Exceeded: {gid}")
dl.getListener().onDownloadError(f'File size {get_readable_file_size(size)} larger than Maximum Allowed size {MAX_TORRENT_SIZE}GB')
aria2.remove([download])
return
return
update_all_messages()
def __onDownloadComplete(self, api: API, gid):