Skip to content

Commit

Permalink
Fix tg torrent file mirror broken
Browse files Browse the repository at this point in the history
since 7d74cf2

Signed-off-by: lzzy12 <[email protected]>
  • Loading branch information
lzzy12 committed Mar 30, 2020
1 parent 0ec499f commit 3754e8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bot/modules/mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,16 @@ 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}/')
sendStatusMessage(update, bot)
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):
Expand Down

0 comments on commit 3754e8b

Please sign in to comment.