It's version 0.6.2 I clear code

This commit is contained in:
Niken
2025-11-23 23:17:00 +03:00
parent b6c1c60609
commit 7495062a8a
15 changed files with 183 additions and 97 deletions
@@ -13,7 +13,7 @@ from mutagen.id3 import ID3, APIC, error
logger = logging.getLogger(__name__)
async def get_video_info(url: str) -> dict:
async def get_video_info(url: str) -> Optional[dict]:
"""Получает информацию о видео через yt-dlp"""
try:
process = await asyncio.create_subprocess_exec(
@@ -63,8 +63,8 @@ def apply_metadata(mp3_path: str, metadata: dict):
# Сначала удаляем старые теги ID3 если есть
try:
ID3(mp3_path).delete()
except:
pass
except Exception as e:
logger.warning(f"Не удалось удалить старые ID3 теги: {e}")
# Добавляем текстовые теги
try: