minor fix
This commit is contained in:
parent
3accda6490
commit
5d2626fce6
|
|
@ -33,8 +33,8 @@ class AriaDownloadHelper(DownloadHelper):
|
||||||
gdrive = GoogleDriveHelper(None)
|
gdrive = GoogleDriveHelper(None)
|
||||||
smsg, button = gdrive.drive_list(sname)
|
smsg, button = gdrive.drive_list(sname)
|
||||||
if smsg:
|
if smsg:
|
||||||
aria2.remove([download])
|
|
||||||
dl.getListener().onDownloadError(f'File/Folder is already available in Drive.\n\n')
|
dl.getListener().onDownloadError(f'File/Folder is already available in Drive.\n\n')
|
||||||
|
aria2.remove([download])
|
||||||
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)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
@ -55,13 +55,13 @@ class AriaDownloadHelper(DownloadHelper):
|
||||||
limitint = int(limit[0])
|
limitint = int(limit[0])
|
||||||
if 'G' in limit[1] or 'g' in limit[1]:
|
if 'G' in limit[1] or 'g' in limit[1]:
|
||||||
if size > limitint * 1024**3:
|
if size > limitint * 1024**3:
|
||||||
aria2.remove([download])
|
|
||||||
dl.getListener().onDownloadError(f'{mssg}.\nYour File/Folder size is {get_readable_file_size(size)}')
|
dl.getListener().onDownloadError(f'{mssg}.\nYour File/Folder size is {get_readable_file_size(size)}')
|
||||||
|
aria2.remove([download])
|
||||||
return
|
return
|
||||||
elif 'T' in limit[1] or 't' in limit[1]:
|
elif 'T' in limit[1] or 't' in limit[1]:
|
||||||
if size > limitint * 1024**4:
|
if size > limitint * 1024**4:
|
||||||
aria2.remove([download])
|
|
||||||
dl.getListener().onDownloadError(f'{mssg}.\nYour File/Folder size is {get_readable_file_size(size)}')
|
dl.getListener().onDownloadError(f'{mssg}.\nYour File/Folder size is {get_readable_file_size(size)}')
|
||||||
|
aria2.remove([download])
|
||||||
return
|
return
|
||||||
update_all_messages()
|
update_all_messages()
|
||||||
|
|
||||||
|
|
@ -85,7 +85,7 @@ class AriaDownloadHelper(DownloadHelper):
|
||||||
|
|
||||||
@new_thread
|
@new_thread
|
||||||
def __onDownloadStopped(self, api, gid):
|
def __onDownloadStopped(self, api, gid):
|
||||||
sleep(0.5)
|
sleep(1)
|
||||||
dl = getDownloadByGid(gid)
|
dl = getDownloadByGid(gid)
|
||||||
if dl:
|
if dl:
|
||||||
dl.getListener().onDownloadError('Dead torrent!')
|
dl.getListener().onDownloadError('Dead torrent!')
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,5 @@ class AriaDownloadStatus(Status):
|
||||||
if len(download.followed_by_ids) != 0:
|
if len(download.followed_by_ids) != 0:
|
||||||
downloads = aria2.get_downloads(download.followed_by_ids)
|
downloads = aria2.get_downloads(download.followed_by_ids)
|
||||||
aria2.remove(downloads)
|
aria2.remove(downloads)
|
||||||
self.__listener.onDownloadError("Download stopped by user!")
|
|
||||||
aria2.remove([download])
|
|
||||||
self.__listener.onDownloadError("Download stopped by user!")
|
self.__listener.onDownloadError("Download stopped by user!")
|
||||||
|
aria2.remove([download])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue