Capture YouTube titles from Discord's embed cache
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user