Skip to content

Commit

Permalink
Disable YT transcript, add more export logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksonh committed Oct 30, 2024
1 parent 818ba1a commit 2fe65c4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
4 changes: 4 additions & 0 deletions packages/api/src/jobs/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
36 changes: 18 additions & 18 deletions packages/api/src/jobs/process-youtube-video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 (updatedContent) {
updatedLibraryItem.readableContent = updatedContent
}

await enqueueProcessYouTubeTranscript({
videoId,
...jobData,
})
}
// 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
// }

// await enqueueProcessYouTubeTranscript({
// videoId,
// ...jobData,
// })
// }

if (updatedLibraryItem !== {}) {
await updateLibraryItem(
Expand Down

0 comments on commit 2fe65c4

Please sign in to comment.