feat: adding title

This commit is contained in:
Rémi Heredero 2025-04-21 11:51:14 +02:00
parent 8a407a186a
commit f856d414f1
Signed by: Klagarge
GPG Key ID: 735B36B074A65F0F

View File

@ -31,12 +31,14 @@ def get_video_metadata(file_path):
data = json.loads(result.stdout)
# Extract filename
# Extract filename and title
filename = os.path.basename(file_path)
title = data.get("format", {}).get("tags", {}).get("title", filename)
# Initialize metadata structure
metadata = {
"filename": filename,
"title": title,
"audio_tracks": [],
"subtitle_tracks": []
}