Signed-off-by: anasty17 <e.anastayyar@gmail.com>
This commit is contained in:
anasty17 2023-11-06 03:27:03 +02:00
parent 0f76a27d75
commit fcd11e8012
5 changed files with 6 additions and 6 deletions

View File

@ -74,7 +74,7 @@ class DirectListener:
async def cancel_task(self):
self._is_cancelled = True
LOGGER.info(f"Cancelling Download: {self.name}")
LOGGER.info(f"Cancelling Download: {self._listener.name}")
await self._listener.onDownloadError("Download Cancelled by User!")
if self.task:
await sync_to_async(self.task.remove, force=True, files=True)

View File

@ -35,7 +35,7 @@ class MegaAppListener(MegaListener):
self._bytes_transferred = 0
self._speed = 0
self._name = ""
super()._init_()
super().__init__()
@property
def speed(self):

View File

@ -27,7 +27,7 @@ class DirectStatus:
return f"{get_readable_file_size(self._obj.speed)}/s"
def name(self):
return self._obj.name
return self.listener.name
def size(self):
return get_readable_file_size(self._obj.total_size)

View File

@ -106,7 +106,7 @@ class Clone(TaskListener):
self.run_multi(input_list, "", Clone)
if len(self.link) == 0:
await sendMessage(self.message, CLONE_HELP_MESSAGE)
await sendMessage(self.message, "Open this link for usage help!", COMMAND_USAGE["clone"])
return
await self.beforeStart()
await self._proceedToClone()

View File

@ -258,7 +258,7 @@ async def _mdisk(link, name):
class YtDlp(TaskListener):
def _init_(
def __init__(
self,
client,
message,
@ -273,7 +273,7 @@ class YtDlp(TaskListener):
sameDir = {}
if bulk is None:
bulk = []
super()._init_(message)
super().__init__(message)
self.client = client
self.isLeech = isLeech
self.isYtDlp = True