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

warn when falling back to default template

#2188
This commit is contained in:
Mikael Finstad 2024-10-09 11:40:29 +00:00
parent ed559691ab
commit ca5a678793
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26

View File

@ -999,9 +999,13 @@ function App() {
console.log('outSegTemplateOrDefault', outSegTemplateOrDefault);
const notices: string[] = [];
const warnings: string[] = [];
const { fileNames: outSegFileNames, problems: outSegProblems } = await generateOutSegFileNames({ segments: segmentsToExport, template: outSegTemplateOrDefault });
if (outSegProblems.error != null) {
console.warn('Output segments file name invalid, using default instead', outSegFileNames);
warnings.push(t('Fell back to default output file name'), outSegProblems.error);
}
// throw (() => { const err = new Error('test'); err.code = 'ENOENT'; return err; })();
@ -1044,6 +1048,7 @@ function App() {
const { fileNames, problems } = await generateMergedFileNames({ template: mergedFileTemplateOrDefault });
if (problems.error != null) {
console.warn('Merged file name invalid, using default instead', fileNames[0]);
warnings.push(t('Fell back to default output file name'), problems.error);
}
const [fileName] = fileNames;
@ -1065,9 +1070,6 @@ function App() {
});
}
const notices = [];
const warnings = [];
if (!enableOverwriteOutput) warnings.push(i18n.t('Overwrite output setting is disabled and some files might have been skipped.'));
if (!exportConfirmEnabled) notices.push(i18n.t('Export options are not shown. You can enable export options by clicking the icon right next to the export button.'));