- Second series gets its own guide (Resources page card, download page, admin fields) - When a series ends (scheduled or manual) its guide moves onto its Finished Book, which shows a guide button; the main series' guide is cleared unless the launch supplies a new one - Lane B launch schedule can supply the incoming series' guide - Download lookup covers second-series and finished-book guides; guide URLs are sanitized on save and on use Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
39691aedb3
commit
e2150e1cd7
7 files changed
+244
-4
No files matched your search
@@ -66,11 +66,24 @@ function readCurrentSeries(content, lane) {
|
||||
return {
|
||||
title: s.title ?? '', description: s.description ?? '', imageUrl: s.imageUrl ?? '',
|
||||
season: s.season, studySlug: s.studySlug ?? '',
|
||||
guide: s.guide?.title ? s.guide : undefined,
|
||||
}
|
||||
}
|
||||
return {
|
||||
title: content.seriesTitle ?? '', description: content.seriesDescription ?? '', imageUrl: content.seriesImageUrl ?? '',
|
||||
season: content.seriesSeason, studySlug: content.seriesStudySlug ?? '',
|
||||
// The main series' guide lives in the flat studyGuide* fields
|
||||
guide: content.studyGuideTitle?.trim()
|
||||
? {
|
||||
title: content.studyGuideTitle,
|
||||
description: content.studyGuideDescription ?? '',
|
||||
downloadUrl: content.studyGuideDownloadUrl ?? '',
|
||||
amazonUrl: content.studyGuideUrl ?? '',
|
||||
amazonLabel: content.studyGuideAmazonButtonLabel ?? '',
|
||||
appleBooksUrl: content.studyGuideAppleBooksUrl ?? '',
|
||||
appleBooksLabel: content.studyGuideAppleBooksLabel ?? '',
|
||||
}
|
||||
: undefined,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,6 +109,7 @@ function applySeriesTransition(content, sched, lane = 'primary') {
|
||||
imageUrl: current.imageUrl,
|
||||
season: current.season ?? ((newSeason ?? 2) - 1 || 1),
|
||||
...(current.studySlug ? { studySlug: current.studySlug } : {}),
|
||||
...(current.guide ? { guide: current.guide } : {}),
|
||||
...(endingHighlights.length > 0 ? { highlights: endingHighlights.map(({ lane: _lane, ...link }) => link) } : {}),
|
||||
}
|
||||
: null
|
||||
@@ -142,6 +156,8 @@ function applySeriesTransition(content, sched, lane = 'primary') {
|
||||
description: sched.newDescription?.trim() ?? '',
|
||||
imageUrl: sched.newImageUrl?.trim() || content.secondSeries?.imageUrl || '',
|
||||
studySlug: newStudySlug,
|
||||
// The ending series' guide moved onto its Finished Book; the incoming series brings its own
|
||||
guide: sched.newGuide?.title?.trim() ? sched.newGuide : undefined,
|
||||
...(newSeason ? { season: newSeason } : {}),
|
||||
},
|
||||
}
|
||||
@@ -152,6 +168,13 @@ function applySeriesTransition(content, sched, lane = 'primary') {
|
||||
seriesLabel: 'Now Playing',
|
||||
seriesStudySlug: newStudySlug,
|
||||
...(newSeason ? { seriesSeason: newSeason } : {}),
|
||||
// The ending series' guide moved onto its Finished Book; unless the launch brings a new one, clear it
|
||||
...(current.guide && !sched.newStudyGuideTitle?.trim()
|
||||
? {
|
||||
studyGuideTitle: '', studyGuideDescription: '', studyGuideDownloadUrl: '', studyGuideUrl: '',
|
||||
studyGuideAmazonButtonLabel: '', studyGuideAppleBooksUrl: '', studyGuideAppleBooksLabel: '',
|
||||
}
|
||||
: {}),
|
||||
}
|
||||
|
||||
const next = sanitizeSiteContent({
|
||||
|
||||
Reference in new issue
Block a user