Some fixes (#83)
This commit is contained in:
parent
e94b7bb104
commit
080039d3f5
|
|
@ -34,14 +34,15 @@ class AriaDownloadHelper(DownloadHelper):
|
||||||
dl.getListener().onDownloadError(f'File is already available in drive.\n\n')
|
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)
|
sendMarkup("Here are the search results:", dl.getListener().bot, dl.getListener().update, button)
|
||||||
aria2.remove([download])
|
aria2.remove([download])
|
||||||
|
return
|
||||||
|
|
||||||
size = download.total_length
|
size = download.total_length
|
||||||
if ENABLE_FILESIZE_LIMIT:
|
if ENABLE_FILESIZE_LIMIT:
|
||||||
if size / 1024 / 1024 / 1024 > MAX_TORRENT_SIZE:
|
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')
|
dl.getListener().onDownloadError(f'File size {get_readable_file_size(size)} larger than Maximum Allowed size {MAX_TORRENT_SIZE}GB')
|
||||||
aria2.remove([download])
|
aria2.remove([download])
|
||||||
return
|
return
|
||||||
update_all_messages()
|
update_all_messages()
|
||||||
|
|
||||||
def __onDownloadComplete(self, api: API, gid):
|
def __onDownloadComplete(self, api: API, gid):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue