diff --git a/bot/modules/mirror.py b/bot/modules/mirror.py index a92623b..da49283 100644 --- a/bot/modules/mirror.py +++ b/bot/modules/mirror.py @@ -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):