This commit is contained in:
Ksandr 2026-08-08 17:32:31 +00:00 • committed by GitHub
commit 88e7cdb3cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 3 deletions

View file

@ -125,9 +125,11 @@ export default async function ({ ownerId, videoId, accessKey, quality, subtitleL
if (!url) return { error: "fetch.fail" };
const fileMetadata = {
title: video.title.trim(),
}
const title = video.title?.trim()
|| video.description?.trim().split(/\r?\n/, 1)[0]
|| `vk_${ownerId}_${videoId}`;
const fileMetadata = { title }
let subtitles;
if (subtitleLang && video.subtitles?.length) {

View file

@ -30,6 +30,24 @@
"status": "tunnel"
}
},
{
"name": "clip without title",
"url": "https://vk.com/clip-227182972_456239182",
"params": {},
"expected": {
"code": 200,
"status": "tunnel"
}
},
{
"name": "clip without title or description",
"url": "https://vk.com/clip-219815090_456243369",
"params": {},
"expected": {
"code": 200,
"status": "tunnel"
}
},
{
"name": "video, defaults",
"url": "https://vk.com/video-57274055_456239399",