limit ffmpeg

This commit is contained in:
BennyThink 2022-03-12 15:47:34 +08:00
parent 49095af268
commit ff5259367b
No known key found for this signature in database
GPG Key ID: 6CD0DBDA5235D481
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ MULTIPLY = os.getenv("MULTIPLY", 5) # VIP1 is 5*5-25G, VIP2 is 50G
USD2CNY = os.getenv("USD2CNY", 6) # $5 --> ¥30
ENABLE_VIP = os.getenv("VIP", False)
MAX_DURATION = int(os.getenv("MAX_DURATION", 300))
MAX_DURATION = int(os.getenv("MAX_DURATION", 0))
AFD_LINK = os.getenv("AFD_LINK", "https://afdian.net/@BennyThink")
COFFEE_LINK = os.getenv("COFFEE_LINK", "https://www.buymeacoffee.com/bennythink")
COFFEE_TOKEN = os.getenv("COFFEE_TOKEN")

View File

@ -138,7 +138,7 @@ def convert_to_mp4(resp: dict, bot_msg):
logging.warning("Conversion abort for non VIP %s", bot_msg.chat.id)
bot_msg._client.send_message(
bot_msg.chat.id,
"You're not VIP, so you can't convert longer video to streaming formats.")
f"You're not VIP, so you can't convert video {MAX_DURATION}s to streaming formats.")
break
edit_text(bot_msg, f"{current_time()}: Converting {path.name} to mp4. Please wait.")
new_file_path = path.with_suffix(".mp4")