Skip to content

The swiss army knife of lossless video/audio editing

improve logic

Mikael Finstad42d3a8981ac0
diff --git a/src/ExportConfirm.jsx b/src/ExportConfirm.jsx
index a3a056a5..5b347812 100644
--- a/src/ExportConfirm.jsx
+++ b/src/ExportConfirm.jsx
@@ -99,6 +99,8 @@ const ExportConfirm = memo(({
const willMerge = autoMerge && enabledOutSegments.length >= 2;
+ const canEditTemplate = !autoDeleteMergedSegments && !segmentsToChaptersOnly && enabledOutSegments.length >= 2;
+
// https://stackoverflow.com/questions/33454533/cant-scroll-to-top-of-flex-item-that-is-overflowing-container
return (
<AnimatePresence>
@@ -129,7 +131,7 @@ const ExportConfirm = memo(({
<li>
{t('Save output to path:')} <span role="button" onClick={changeOutDir} style={outDirStyle}>{outputDir}</span>
</li>
- {!willMerge && !segmentsToChaptersOnly && (
+ {canEditTemplate && (
<li>
<OutSegTemplateEditor filePath={filePath} helpIcon={outSegTemplateHelpIcon} outSegTemplate={outSegTemplate} setOutSegTemplate={setOutSegTemplate} generateOutSegFileNames={generateOutSegFileNames} currentSegIndexSafe={currentSegIndexSafe} isOutSegFileNamesValid={isOutSegFileNamesValid} safeOutputFileName={safeOutputFileName} toggleSafeOutputFileName={toggleSafeOutputFileName} />
</li>
diff --git a/src/components/MergeExportButton.jsx b/src/components/MergeExportButton.jsx
index fac2a253..a08e57e6 100644
--- a/src/components/MergeExportButton.jsx
+++ b/src/components/MergeExportButton.jsx
@@ -1,5 +1,5 @@
import React, { memo } from 'react';
-import { Button } from 'evergreen-ui';
+import { BookmarkIcon, Button } from 'evergreen-ui';
import { useTranslation } from 'react-i18next';
import { MdCallSplit, MdCallMerge } from 'react-icons/md';
@@ -18,7 +18,8 @@ const MergeExportButton = memo(({ autoMerge, enabledOutSegments, setAutoMerge, a
if (segmentsToChaptersOnly) {
effectiveMode = 'sesgments_to_chapters';
title = t('Chapters only');
- description = t('Don\'t cut the file, but instead create chapters from segments');
+ AutoMergeIcon = BookmarkIcon;
+ description = t('Don\'t cut the file, but instead export an unmodified original with segments as chapters');
} else if (autoMerge && autoDeleteMergedSegments) {
effectiveMode = 'merge';
AutoMergeIcon = MdCallMerge;