Skip to content

Commit

Permalink
chore(release): v23.11.0 (sircharlo#2270)
Browse files Browse the repository at this point in the history
* feat: prepare for new mwb

* chore: bump version
  • Loading branch information
mtdvlpr authored Nov 19, 2023
1 parent 76523cb commit a3d8935
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 29 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 23.11.0

### New or improved features

- Preparations for the new Meeting Workbook format
- Skip Bearing Witness media for Circuit Overseer visits

### Bug fixes

- Only save Meeting Workbook headings if they are actually present

## 23.10.1

### Bug fixes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meeting-media-manager",
"version": "23.10.2-beta.0",
"version": "23.11.0",
"description": "Meeting Media Manager",
"keywords": [
"",
Expand Down
51 changes: 23 additions & 28 deletions src/renderer/plugins/media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ const plugin: Plugin = (
) {
return true
}
// Always include header image of Live Forever lesson
// Always include header image of Love People lesson
else if (
extract.UniqueEnglishSymbol === 'lff' &&
extract.UniqueEnglishSymbol === 'lmd' &&
mmItem.BeginParagraphOrdinal === 1
) {
return true
Expand Down Expand Up @@ -206,22 +206,15 @@ const plugin: Plugin = (
extracts.forEach((extract) => {
let imagesOnly = false
const excludeLffImages = $getPrefs('media.excludeLffImages')
if (extract.UniqueEnglishSymbol === 'lffi') {
if (
extract.UniqueEnglishSymbol === 'lffi' ||
extract.UniqueEnglishSymbol === 'lff'
) {
imagesOnly = true
} else if (extract.UniqueEnglishSymbol === 'lff') {
const match = extracts.find(
(e) =>
e.UniqueEnglishSymbol === 'lff' &&
e.BeginParagraphOrdinal !== extract.BeginParagraphOrdinal
)
imagesOnly =
!!match && extract.BeginParagraphOrdinal < match.BeginParagraphOrdinal
}

const skipCBS =
$isCoWeek(baseDate) &&
extract.UniqueEnglishSymbol === 'lff' &&
!imagesOnly
$isCoWeek(baseDate) && extract.UniqueEnglishSymbol === 'bt'

if (!skipCBS && (!imagesOnly || !excludeLffImages)) {
promises.push(extractMediaItems(extract, setProgress, imagesOnly))
Expand Down Expand Up @@ -1191,23 +1184,25 @@ const plugin: Plugin = (
db,
'SELECT FeatureTitle FROM Document WHERE Class = 10 ORDER BY FeatureTitle'
) as { FeatureTitle: string }[]
let livingTitle = living[0].FeatureTitle
let livingTitle = living[0]?.FeatureTitle
if (living.length > 1) {
livingTitle = living[Math.floor(living.length / 2)].FeatureTitle
livingTitle = living[Math.floor(living.length / 2)]?.FeatureTitle
}

try {
writeJsonSync(
join($pubPath(), 'mwb', 'headings.json'),
{
treasures: treasures.FeatureTitle,
apply: apply.FeatureTitle,
living: livingTitle,
},
{ spaces: 2 }
)
} catch (error) {
$log.error(error)
if (treasures?.FeatureTitle && apply?.FeatureTitle && livingTitle) {
try {
writeJsonSync(
join($pubPath(), 'mwb', 'headings.json'),
{
treasures: treasures.FeatureTitle,
apply: apply.FeatureTitle,
living: livingTitle,
},
{ spaces: 2 }
)
} catch (error) {
$log.error(error)
}
}

// Get document multimedia and add them to the media list
Expand Down

0 comments on commit a3d8935

Please sign in to comment.