mirror of
https://github.com/tgbot-collection/ytdlbot.git
synced 2025-02-24 23:34:44 +08:00
fix local mode
This commit is contained in:
parent
f7243a4a93
commit
62342ee350
1 changed files with 2 additions and 1 deletions
|
@ -71,7 +71,7 @@ def get_messages(chat_id: int, message_id: int):
|
||||||
try:
|
try:
|
||||||
return bot.get_messages(chat_id, message_id)
|
return bot.get_messages(chat_id, message_id)
|
||||||
except ConnectionError as e:
|
except ConnectionError as e:
|
||||||
logging.critical("CRITICAL ERROR: %s", e)
|
logging.critical("BOT IS NOT STARTED YET: %s", e)
|
||||||
bot.start()
|
bot.start()
|
||||||
return bot.get_messages(chat_id, message_id)
|
return bot.get_messages(chat_id, message_id)
|
||||||
|
|
||||||
|
@ -141,6 +141,7 @@ def ytdl_download_entrance(bot_msg: types.Message, url: str, mode=None):
|
||||||
if ENABLE_CELERY and mode in [None, "Celery"]:
|
if ENABLE_CELERY and mode in [None, "Celery"]:
|
||||||
ytdl_download_task.delay(chat_id, bot_msg.id, url)
|
ytdl_download_task.delay(chat_id, bot_msg.id, url)
|
||||||
else:
|
else:
|
||||||
|
get_messages(chat_id, bot_msg.id)
|
||||||
ytdl_normal_download(bot_msg, url)
|
ytdl_normal_download(bot_msg, url)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error("Failed to download %s, error: %s", url, e)
|
logging.error("Failed to download %s, error: %s", url, e)
|
||||||
|
|
Loading…
Reference in a new issue