mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-11 06:00:15 -07:00
YT Transcript: warn of broken downloads
This commit is contained in:
@@ -73,7 +73,7 @@ export async function attachmentLoadInputAsync(source: Readonly<AttachmentDraftS
|
||||
// [YouTube] user is attaching a link to a video: try to download this as a transcript rather than a webpage
|
||||
const asYoutubeVideoId = extractYoutubeVideoIDFromURL(source.refUrl);
|
||||
if (asYoutubeVideoId) {
|
||||
const videoData = await youTubeGetVideoData(asYoutubeVideoId).catch(() => null);
|
||||
const videoData = await youTubeGetVideoData(asYoutubeVideoId).catch(console.warn);
|
||||
if (videoData?.videoTitle && videoData?.transcript) {
|
||||
edit({
|
||||
label: videoData.videoTitle,
|
||||
|
||||
Reference in New Issue
Block a user