improve "done" toast

pull/841/head
Mikael Finstad 2021-08-25 22:54:13 +07:00
rodzic a9d966cae8
commit a0a7ba33b5
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 25AB36E3E81CBC26
1 zmienionych plików z 7 dodań i 5 usunięć

Wyświetl plik

@ -1054,19 +1054,21 @@ const App = memo(() => {
});
}
const msgs = [i18n.t('Done! Note: cutpoints may be inaccurate. Make sure you test the output files in your desired player/editor before you delete the source. If output does not look right, see the HELP page.')];
// https://github.com/mifi/lossless-cut/issues/329
if (isIphoneHevc(fileFormatData, mainStreams)) msgs.push(i18n.t('There is a known issue with cutting iPhone HEVC videos. The output file may not work in all players.'));
if (exportExtraStreams && enabledOutSegments.length > 1) {
try {
await extractStreams({ filePath, customOutDir, streams: nonCopiedExtraStreams });
msgs.push(i18n.t('Unprocessable streams were exported as separate files.'));
} catch (err) {
console.error('Extra stream export failed', err);
}
}
// https://github.com/mifi/lossless-cut/issues/329
const extraIphoneMsg = isIphoneHevc(fileFormatData, mainStreams) ? ` ${i18n.t('There is a known issue with cutting iPhone HEVC videos. The output file may not work in all players.')}` : '';
const extraStreamsMsg = exportExtraStreams ? ` ${i18n.t('Unprocessable streams were exported as separate files.')}` : '';
if (!hideAllNotifications) openDirToast({ dirPath: outputDir, text: `${i18n.t('Done! Note: cutpoints may be inaccurate. Make sure you test the output files in your desired player/editor before you delete the source. If output does not look right, see the HELP page.')}${extraIphoneMsg}${extraStreamsMsg}`, timer: 15000 });
if (!hideAllNotifications) openDirToast({ dirPath: outputDir, text: msgs.join(' '), timer: 15000 });
} catch (err) {
console.error('stdout:', err.stdout);
console.error('stderr:', err.stderr);