feat: adding title
This commit is contained in:
parent
8a407a186a
commit
f856d414f1
@ -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": []
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user