core: MP4 add sanitize path

This commit is contained in:
Lovi 2025-03-23 09:59:23 +01:00
parent a376556f60
commit 74218e3101

View File

@ -21,7 +21,7 @@ from rich.panel import Panel
from StreamingCommunity.Util.headers import get_userAgent
from StreamingCommunity.Util.color import Colors
from StreamingCommunity.Util.config_json import config_manager
from StreamingCommunity.Util.os import internet_manager
from StreamingCommunity.Util.os import internet_manager, os_manager
from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance
@ -80,6 +80,7 @@ def MP4_downloader(url: str, path: str, referer: str = None, headers_: dict = No
bot = get_bot_instance()
console.log("####")
path = os_manager.get_sanitize_path(path)
if os.path.exists(path):
console.log("[red]Output file already exists.")
if TELEGRAM_BOT: