fix: restore support for episode transcription/timestamps sections

This commit is contained in:
Hossein Mehrabi 2023-08-21 14:20:23 +03:30
parent 1280824c1f
commit 6b4a81ce11
No known key found for this signature in database
GPG Key ID: 45C04964191AFAA1
2 changed files with 10 additions and 3 deletions

View File

@ -9,7 +9,9 @@
"lint": "next lint",
"prepare": "husky install",
"codegen": "dotenv -e ./.env -c -- yarn graphql-code-generator --debug --verbose ./codegen.ts",
"codegen:watch": "dotenv -e ./.env -c -- yarn graphql-code-generator --debug --verbose --watch ./codegen.ts"
"codegen:watch": "dotenv -e ./.env -c -- yarn graphql-code-generator --debug --verbose --watch ./codegen.ts",
"codegenx": "dotenv -e ./.env -c -- yarn graphql-code-generator --debug --verbose ./codegen.ts",
"codegenx:watch": "dotenv -e ./.env -c -- yarn graphql-code-generator --debug --verbose ./codegen.ts"
},
"lint-staged": {
"*.{ts,tsx}": [

View File

@ -61,7 +61,10 @@ export const PodcastEpisodeDataType: UnbodyDataTypeConfig<
})
if (context?.parseContent) {
const sections = findSections(['Credits', 'Content'], allBlocks)
const sections = findSections(
['Credits', 'Content', 'Timestamps', 'Transcription'],
allBlocks,
)
const textBlocks = allBlocks.filter(
(block) => block.type === 'text',
@ -79,7 +82,9 @@ export const PodcastEpisodeDataType: UnbodyDataTypeConfig<
break
}
case 'Content': {
case 'Content':
case 'Timestamps':
case 'Transcription': {
content.push(...section.blocks)
break