[PR #1580] api/vk: handle clips without titles #38158

Open
opened 2026-08-25 20:07:59 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/imputnet/cobalt/pull/1580
Author: @Rexarrior
Created: 8/8/2026
Status: 🔄 Open

Base: main ← Head: fix/vk-video-response-items


📝 Commits (1)

  • b034fc9 api/vk: handle clips without titles

📊 Changes

2 files changed (+23 additions, -3 deletions)

View changed files

📝 api/src/processing/services/vk.js (+5 -3)
📝 api/src/util/tests/vk.json (+18 -0)

📄 Description

VK's video.get currently returns title: null for some clips. This caused
video.title.trim() to throw, and the error was reported as
error.api.fetch.critical.

This falls back to the first line of the video description, or to a stable
vk_<owner>_<video> identifier when the description is empty.

I added regression cases using the links from both reported issues.
fixes #1557
fixes #1547
Tested with:

pnpm --filter @imput/cobalt-api test -- run-tests-for vk


---

<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
## 📋 Pull Request Information **Original PR:** https://github.com/imputnet/cobalt/pull/1580 **Author:** [@Rexarrior](https://github.com/Rexarrior) **Created:** 8/8/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/vk-video-response-items` --- ### 📝 Commits (1) - [`b034fc9`](https://github.com/imputnet/cobalt/commit/b034fc94bedf9056149883b81c43ba20e05432e7) api/vk: handle clips without titles ### 📊 Changes **2 files changed** (+23 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `api/src/processing/services/vk.js` (+5 -3) 📝 `api/src/util/tests/vk.json` (+18 -0) </details> ### 📄 Description VK's `video.get` currently returns `title: null` for some clips. This caused `video.title.trim()` to throw, and the error was reported as `error.api.fetch.critical`. This falls back to the first line of the video description, or to a stable `vk_<owner>_<video>` identifier when the description is empty. I added regression cases using the links from both reported issues. fixes #1557 fixes #1547 Tested with: ```sh pnpm --filter @imput/cobalt-api test -- run-tests-for vk --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-08-25 20:07:59 -05:00
Sign in to join this conversation.