diff --git a/package.json b/package.json index da86cbac..2ddfa5bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "podverse-api", - "version": "4.14.9", + "version": "4.14.10", "description": "Data API, database migration scripts, and backend services for all Podverse models.", "contributors": [ "Mitch Downey" diff --git a/src/controllers/episode.ts b/src/controllers/episode.ts index 32a1993a..24212990 100644 --- a/src/controllers/episode.ts +++ b/src/controllers/episode.ts @@ -547,7 +547,7 @@ const retrieveLatestChapters = async (id) => { const response = await request(chaptersUrl) const trimmedResponse = (response && response.trim()) || {} const parsedResponse = JSON.parse(trimmedResponse) - const { chapters: newChapters } = parsedResponse + let { chapters: newChapters } = parsedResponse if (newChapters) { const qb = mediaRefRepository @@ -578,6 +578,14 @@ const retrieveLatestChapters = async (id) => { ) } + // NOTE: we are temporarily removing `toc: false` chapters until we add + // proper UX support in our client-side applications. + // chapters with `toc: false` are not considered part of the "table of contents", + // but our client-side apps currently expect chapters to behave as a table of contents. + newChapters = newChapters.filter((chapter) => { + return chapter.toc !== false + }) + for (const newChapter of newChapters) { try { const startTime = Math.round(newChapter.startTime)