Disable YT transcript, add more export logging

This commit is contained in:
Jackson Harper
2024-10-30 20:30:22 +08:00
parent 818ba1a88b
commit cf03179d87
2 changed files with 20 additions and 16 deletions

View File

@ -127,6 +127,10 @@ const uploadToBucket = async (
export const exportJob = async (jobData: ExportJobData) => {
const { userId, exportId } = jobData
logger.info('starting export job', {
userId,
exportId,
})
try {
const user = await findActiveUser(userId)

View File

@ -281,24 +281,24 @@ export const processYouTubeVideo = async (
updatedLibraryItem.publishedAt = new Date(video.uploadDate)
}
if ('getTranscript' in video && duration > 0 && duration < 1801) {
// If the video has a transcript available, put a placehold in and
// enqueue a job to process the full transcript
const updatedContent = await addTranscriptToReadableContent(
libraryItem.originalUrl,
libraryItem.readableContent,
TRANSCRIPT_PLACEHOLDER_TEXT
)
// if ('getTranscript' in video && duration > 0 && duration < 1801) {
// // If the video has a transcript available, put a placehold in and
// // enqueue a job to process the full transcript
// const updatedContent = await addTranscriptToReadableContent(
// libraryItem.originalUrl,
// libraryItem.readableContent,
// TRANSCRIPT_PLACEHOLDER_TEXT
// )
if (updatedContent) {
updatedLibraryItem.readableContent = updatedContent
}
// if (updatedContent) {
// updatedLibraryItem.readableContent = updatedContent
// }
await enqueueProcessYouTubeTranscript({
videoId,
...jobData,
})
}
// await enqueueProcessYouTubeTranscript({
// videoId,
// ...jobData,
// })
// }
if (updatedLibraryItem !== {}) {
await updateLibraryItem(