parent
acdc2aa8b7
commit
0c50bcf8ee
|
|
@ -1,7 +1,6 @@
|
|||
from bot import aria2, download_dict_lock, STOP_DUPLICATE, TORRENT_DIRECT_LIMIT, TAR_UNZIP_LIMIT
|
||||
from bot.helper.mirror_utils.upload_utils.gdriveTools import GoogleDriveHelper
|
||||
from bot.helper.ext_utils.bot_utils import *
|
||||
from .download_helper import DownloadHelper
|
||||
from bot.helper.mirror_utils.status_utils.aria_download_status import AriaDownloadStatus
|
||||
from bot.helper.telegram_helper.message_utils import *
|
||||
import threading
|
||||
|
|
@ -9,7 +8,7 @@ from aria2p import API
|
|||
from time import sleep
|
||||
|
||||
|
||||
class AriaDownloadHelper(DownloadHelper):
|
||||
class AriaDownloadHelper:
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
|
|
|||
|
|
@ -78,9 +78,7 @@ class qbittorrent:
|
|||
LOGGER.info(f"QbitDownload started: {tor_info.name}")
|
||||
self.updater = setInterval(self.update_interval, self.update)
|
||||
if BASE_URL is not None and qbitsel:
|
||||
if is_file:
|
||||
self.client.torrents_pause(torrent_hashes=self.ext_hash)
|
||||
else:
|
||||
if not is_file:
|
||||
meta = sendMessage("Downloading Metadata...Please wait then you can select files or mirror torrent file if it have low seeders", listener.bot, listener.update)
|
||||
while True:
|
||||
tor_info = self.client.torrents_info(torrent_hashes=self.ext_hash)
|
||||
|
|
@ -92,12 +90,13 @@ class qbittorrent:
|
|||
if tor_info.state == "metaDL" or tor_info.state == "checkingResumeData":
|
||||
time.sleep(0.5)
|
||||
else:
|
||||
self.client.torrents_pause(torrent_hashes=self.ext_hash)
|
||||
time.sleep(2)
|
||||
deleteMessage(listener.bot, meta)
|
||||
break
|
||||
except:
|
||||
deleteMessage(listener.bot, meta)
|
||||
return False
|
||||
self.client.torrents_pause(torrent_hashes=self.ext_hash)
|
||||
for n in str(self.ext_hash):
|
||||
if n.isdigit():
|
||||
pincode += str(n)
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import re
|
|||
import json
|
||||
import requests
|
||||
import logging
|
||||
import time
|
||||
from random import randrange
|
||||
|
||||
from google.auth.transport.requests import Request
|
||||
|
|
@ -23,7 +24,7 @@ from bot.helper.telegram_helper import button_build
|
|||
from telegraph import Telegraph
|
||||
from bot import parent_id, DOWNLOAD_DIR, IS_TEAM_DRIVE, INDEX_URL, \
|
||||
USE_SERVICE_ACCOUNTS, telegraph_token, BUTTON_FOUR_NAME, BUTTON_FOUR_URL, BUTTON_FIVE_NAME, BUTTON_FIVE_URL, BUTTON_SIX_NAME, BUTTON_SIX_URL, SHORTENER, SHORTENER_API, VIEW_LINK
|
||||
from bot.helper.ext_utils.bot_utils import *
|
||||
from bot.helper.ext_utils.bot_utils import get_readable_file_size, setInterval
|
||||
from bot.helper.ext_utils.fs_utils import get_mime_type, get_path_size
|
||||
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
|
|
|
|||
Loading…
Reference in New Issue