Skip to content

Commit

Permalink
Some fixes (breakdowns#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
yourtulloh authored May 9, 2021
1 parent e94b7bb commit 080039d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bot/helper/mirror_utils/download_utils/aria2_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ def __onDownloadStarted(self, api, gid):
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):
Expand Down

0 comments on commit 080039d

Please sign in to comment.