Skip to content

The swiss army knife of lossless video/audio editing

improve save/load project

Mikael Finstadfcf1f0561cf2
diff --git a/public/menu.js b/public/menu.js
index ff3f57ff..72697ab2 100644
--- a/public/menu.js
+++ b/public/menu.js
@@ -30,13 +30,13 @@ module.exports = (app, mainWindow, newVersion) => {
},
{ type: 'separator' },
{
- label: 'Import CSV cut file',
+ label: 'Load project (CSV)',
click() {
mainWindow.webContents.send('importEdlFile');
},
},
{
- label: 'Export CSV cut file',
+ label: 'Save project (CSV)',
click() {
mainWindow.webContents.send('exportEdlFile');
},
diff --git a/src/App.jsx b/src/App.jsx
index 8a80b7dd..b5b0f5d7 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -1499,6 +1499,7 @@ const App = memo(() => {
async function exportEdlFile() {
try {
+ if (!isFileOpened) return;
const { canceled, filePath: fp } = await dialog.showSaveDialog({ defaultPath: `${new Date().getTime()}.csv`, filters: [{ name: i18n.t('CSV files'), extensions: ['csv'] }] });
if (canceled || !fp) return;
if (await exists(fp)) {
@@ -1513,7 +1514,10 @@ const App = memo(() => {
}
async function importEdlFile() {
- if (!isFileOpened) return;
+ if (!isFileOpened) {
+ toast.fire({ icon: 'info', title: i18n.t('You need to open a media file first') });
+ return;
+ }
const { canceled, filePaths } = await dialog.showOpenDialog({ properties: ['openFile'], filters: [{ name: i18n.t('CSV files'), extensions: ['csv'] }] });
if (canceled || filePaths.length < 1) return;
await loadEdlFile(filePaths[0]);