Skip to content

Commit

Permalink
Merge pull request #687 from podverse/develop
Browse files Browse the repository at this point in the history
Release v4.14.10
  • Loading branch information
mitchdowney authored Oct 28, 2023
2 parents 55cffe3 + 1b05c5d commit 79b528f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
10 changes: 9 additions & 1 deletion src/controllers/episode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 79b528f

Please sign in to comment.