Fix tg torrent file mirror broken
since 7d74cf29d8
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
This commit is contained in:
parent
0ec499ff4a
commit
3754e8b3ce
|
|
@ -156,9 +156,7 @@ def _mirror(bot, update, isTar=False):
|
|||
|
||||
if len(link) == 0:
|
||||
if file is not None:
|
||||
if file.file_size <= 20 * 1024 * 1024:
|
||||
link = file.get_file().file_path
|
||||
else:
|
||||
if file.mime_type != "application/x-bittorrent":
|
||||
listener = MirrorListener(bot, update, isTar, tag)
|
||||
tg_downloader = TelegramDownloadHelper(listener)
|
||||
tg_downloader.add_download(reply_to, f'{DOWNLOAD_DIR}{listener.uid}/')
|
||||
|
|
@ -166,6 +164,8 @@ def _mirror(bot, update, isTar=False):
|
|||
if len(Interval) == 0:
|
||||
Interval.append(setInterval(DOWNLOAD_STATUS_UPDATE_INTERVAL, update_all_messages))
|
||||
return
|
||||
else:
|
||||
link = file.get_file().file_path
|
||||
else:
|
||||
tag = None
|
||||
if not bot_utils.is_url(link) and not bot_utils.is_magnet(link):
|
||||
|
|
|
|||
Loading…
Reference in New Issue