1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-22 02:12:30 +01:00

don't use timer if have warnings

closes #1658
This commit is contained in:
Mikael Finstad 2023-07-19 00:11:10 +02:00
parent 1c1ed1e6b4
commit 5ee1df97fa
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26
2 changed files with 4 additions and 4 deletions

View File

@ -73,7 +73,7 @@ import { formatDuration } from './util/duration';
import { adjustRate } from './util/rate-calculator';
import { askExtractFramesAsImages } from './dialogs/extractFrames';
import { askForHtml5ifySpeed } from './dialogs/html5ify';
import { askForOutDir, askForImportChapters, promptTimeOffset, askForFileOpenAction, confirmExtractAllStreamsDialog, showCleanupFilesDialog, showDiskFull, showExportFailedDialog, showConcatFailedDialog, openYouTubeChaptersDialog, showRefuseToOverwrite, openDirToast, openCutFinishedToast, openConcatFinishedToast, showOpenDialog } from './dialogs';
import { askForOutDir, askForImportChapters, promptTimeOffset, askForFileOpenAction, confirmExtractAllStreamsDialog, showCleanupFilesDialog, showDiskFull, showExportFailedDialog, showConcatFailedDialog, openYouTubeChaptersDialog, showRefuseToOverwrite, openDirToast, openExportFinishedToast, openConcatFinishedToast, showOpenDialog } from './dialogs';
import { openSendReportDialog } from './reporting';
import { fallbackLng } from './i18n';
import { createSegment, getCleanCutSegments, findSegmentsAtCursor, sortSegments, convertSegmentsToChapters, hasAnySegmentOverlap, isDurationValid, playOnlyCurrentSegment } from './segments';
@ -1174,7 +1174,7 @@ const App = memo(() => {
if (areWeCutting) notices.push(i18n.t('Cutpoints may be inaccurate.'));
const revealPath = concatOutPath || outFiles[0];
if (!hideAllNotifications) openCutFinishedToast({ filePath: revealPath, warnings, notices });
if (!hideAllNotifications) openExportFinishedToast({ filePath: revealPath, warnings, notices });
if (cleanupChoices.cleanupAfterExport) await cleanupFiles(cleanupChoices);
} catch (err) {

View File

@ -545,7 +545,7 @@ const Notices = ({ notices }) => notices.map((msg) => <ListItem key={msg} icon={
const Warnings = ({ warnings }) => warnings.map((msg) => <ListItem key={msg} icon={WarningSignIcon} iconColor="warning">{msg}</ListItem>);
const OutputIncorrectSeeHelpMenu = () => <ListItem icon={HelpIcon}>{i18n.t('If output does not look right, see the Help menu.')}</ListItem>;
export async function openCutFinishedToast({ filePath, warnings, notices }) {
export async function openExportFinishedToast({ filePath, warnings, notices }) {
const hasWarnings = warnings.length > 0;
const html = (
<UnorderedList>
@ -557,7 +557,7 @@ export async function openCutFinishedToast({ filePath, warnings, notices }) {
</UnorderedList>
);
await openDirToast({ filePath, html, width: 800, position: 'center', timer: 30000 });
await openDirToast({ filePath, html, width: 800, position: 'center', timer: hasWarnings ? undefined : 30000 });
}
export async function openConcatFinishedToast({ filePath, warnings, notices }) {