Improve how video descriptions are retrieved from Bunny.net
Update BunnyService to consistently check metaTags for video descriptions, ensuring that the 'description' property within metaTags is correctly extracted and utilized when available. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 2eb1084e-b728-4449-9231-f1665924c8d5 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/2eb1084e-b728-4449-9231-f1665924c8d5/lLmu7SJ
This commit is contained in:
parent
1c2ebde84a
commit
d6273e70cf
@ -84,13 +84,12 @@ export class BunnyService {
|
||||
// Extract description from BunnyVideoDetails if available
|
||||
let description = 'description' in bunnyVideo ? bunnyVideo.description || "" : "";
|
||||
|
||||
// If no description, check metaTags for description
|
||||
if (!description && bunnyVideo.metaTags && bunnyVideo.metaTags.length > 0) {
|
||||
// Always check metaTags for description since Bunny.net stores it there
|
||||
if (bunnyVideo.metaTags && bunnyVideo.metaTags.length > 0) {
|
||||
const descriptionTag = bunnyVideo.metaTags.find((tag: any) =>
|
||||
tag.property?.toLowerCase().includes('description') ||
|
||||
tag.property?.toLowerCase().includes('summary')
|
||||
tag.property?.toLowerCase() === 'description'
|
||||
);
|
||||
if (descriptionTag) {
|
||||
if (descriptionTag && descriptionTag.value) {
|
||||
description = descriptionTag.value;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user