mirror of
https://github.com/imputnet/cobalt.git
synced 2026-10-24 02:52:18 +00:00
Merge b034fc94be into a636575b09
This commit is contained in:
commit
88e7cdb3cb
2 changed files with 23 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue