Fix Telegram file tar

This commit is contained in:
Hafitz Setya 2021-03-18 09:00:51 +07:00 committed by GitHub
parent fed9c80ade
commit 101505752c
Signed by untrusted user: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -236,7 +236,7 @@ def _mirror(bot, update, isTar=False, extract=False):
if not bot_utils.is_url(link) and not bot_utils.is_magnet(link) or len(link) == 0: if not bot_utils.is_url(link) and not bot_utils.is_magnet(link) or len(link) == 0:
if file is not None: if file is not None:
if file.mime_type != "application/x-bittorrent": if file.mime_type != "application/x-bittorrent":
listener = MirrorListener(bot, update, isTar, tag, extract) listener = MirrorListener(bot, update, pswd, isTar, tag, extract)
tg_downloader = TelegramDownloadHelper(listener) tg_downloader = TelegramDownloadHelper(listener)
tg_downloader.add_download(reply_to, f'{DOWNLOAD_DIR}{listener.uid}/', name) tg_downloader.add_download(reply_to, f'{DOWNLOAD_DIR}{listener.uid}/', name)
sendStatusMessage(update, bot) sendStatusMessage(update, bot)