Mention error in the message while informing the user about cancellation
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
This commit is contained in:
parent
6d4cfcaf43
commit
def54aca87
|
|
@ -8,6 +8,7 @@ from bot.helper.message_utils import *
|
|||
from bot.helper.bot_utils import get_readable_message, KillThreadException
|
||||
from bot.helper.download_status import DownloadStatus
|
||||
|
||||
|
||||
class MirrorListener(listeners.MirrorListeners):
|
||||
def __init__(self, context, update, reply_message):
|
||||
super().__init__(context, update, reply_message)
|
||||
|
|
@ -32,7 +33,8 @@ class MirrorListener(listeners.MirrorListeners):
|
|||
|
||||
def onDownloadError(self, error, progress_status_list: list, index: int):
|
||||
LOGGER.error(error)
|
||||
msg = "@{} your download has been cancelled!".format(self.message.from_user.username)
|
||||
|
||||
msg = "@{} your download has been cancelled due to: {}".format(self.message.from_user.username, error)
|
||||
sendMessage(msg, self.context, self.update)
|
||||
del download_dict[self.message.message_id]
|
||||
fs_utils.clean_download(progress_status_list[index].path())
|
||||
|
|
@ -75,8 +77,6 @@ def mirror(update, context):
|
|||
aria.add_download(link)
|
||||
|
||||
|
||||
|
||||
|
||||
@run_async
|
||||
def cancel_mirror(update, context):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Reference in New Issue