Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
5hojib authored Jun 6, 2024
1 parent b8b36e5 commit 707d03e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions bot/helper/mirror_leech_utils/status_utils/qbit_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,12 @@ def hash(self):
self.__update()
return self.__info.hash

def client(self):
return self.__client

def listener(self):
return self.__listener

async def cancel_download(self):
self.__update()
await sync_to_async(self.__client.torrents_pause, torrent_hashes=self.__info.hash)
await sync_to_async(xnox_client.torrents_pause, torrent_hashes=self.__info.hash)
if not self.seeding:
if self.queued:
LOGGER.info(f'Cancelling QueueDL: {self.name()}')
Expand All @@ -109,7 +106,7 @@ async def cancel_download(self):
LOGGER.info(f"Cancelling Download: {self.__info.name}")
msg = 'Download stopped by user!'
await sleep(0.3)
await sync_to_async(self.__client.torrents_delete, torrent_hashes=self.__info.hash, delete_files=True)
await sync_to_async(xnox_client.torrents_delete, torrent_hashes=self.__info.hash, delete_files=True)
async with qb_listener_lock:
if self.__info.tags in QbTorrents:
del QbTorrents[self.__info.tags]
Expand Down

0 comments on commit 707d03e

Please sign in to comment.