[enhancement]: Support disabling MPV entirely

Supports running Feishin solely using web audio (useful for clients with problems with MPV).
Also moves save/restore queue to utils, as MPV object is now optional
This commit is contained in:
Kendall Garner
2024-02-11 13:56:29 -08:00
parent ae8fc6df13
commit f82da2e76b
10 changed files with 127 additions and 74 deletions
+2 -2
View File
@@ -316,7 +316,7 @@ const createWindow = async () => {
}
const queue = JSON.parse(data.toString());
getMainWindow()?.webContents.send('renderer-player-restore-queue', queue);
getMainWindow()?.webContents.send('renderer-restore-queue', queue);
});
});
});
@@ -362,7 +362,7 @@ const createWindow = async () => {
event.preventDefault();
saved = true;
getMainWindow()?.webContents.send('renderer-player-save-queue');
getMainWindow()?.webContents.send('renderer-save-queue');
ipcMain.once('player-save-queue', async (_event, data: Record<string, any>) => {
const queueLocation = join(app.getPath('userData'), 'queue');