Capture YouTube titles from Discord's embed cache

This commit is contained in:
Fisto
2026-09-20 19:50:34 +02:00
parent f22ab5ea5f
commit cc3d62336c
9 changed files with 122 additions and 5 deletions
+12
View File
@@ -2669,6 +2669,18 @@
}
meta.replaceChildren();
// The clip title matters most for finding footage; show it big when we have one.
const heading =
item.title || (item.titleError && (item.provider ?? "").toLowerCase().includes("youtube"))
? item.title
? `${item.title}${item.titleAuthor ? ` — ${item.titleAuthor}` : ""}`
: "Video unavailable (removed or private)"
: "";
if (heading) {
meta.append(el("div", "vk-media-viewer-title", heading));
}
const values = metaValues(item);
for (const [key, label] of META_FIELDS) {
if (!values[key]) continue;