From e2cdc0886d3a66ccef3ebc03c65f871ccb275f59 Mon Sep 17 00:00:00 2001 From: Hossein Mehrabi Date: Fri, 18 Aug 2023 18:51:19 +0330 Subject: [PATCH] feat: parse episode document content --- .../PodcastEpisodeDocument.dataType.ts | 34 +++++++++---------- src/types/lpe.types.ts | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/services/unbody/dataTypes/PodcastEpisodeDocument.dataType.ts b/src/services/unbody/dataTypes/PodcastEpisodeDocument.dataType.ts index 96e307c..5525747 100644 --- a/src/services/unbody/dataTypes/PodcastEpisodeDocument.dataType.ts +++ b/src/services/unbody/dataTypes/PodcastEpisodeDocument.dataType.ts @@ -47,15 +47,23 @@ export const PodcastEpisodeDataType: UnbodyDataTypeConfig< const channels: LPE.Podcast.Content['channels'] = [] const credits: LPE.Podcast.Content['credits'] = [] const transcription: LPE.Podcast.Content['transcription'] = [] - const timestamps: LPE.Podcast.Content['timestamps'] = [] + const content: LPE.Podcast.Content['content'] = [] + + const allBlocks = data.content.filter((block) => { + if ( + ((block.type === 'text' && block.html) || '').match( + `