mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 18:33:33 +00:00
Attempt to fix player unresponsive on first start
This commit is contained in:
parent
2f105956b9
commit
9a43ea0e4a
3 changed files with 9 additions and 8 deletions
|
|
@ -323,13 +323,16 @@ ipcMain.on('player-set-queue', async (_event, data: PlayerData, pause?: boolean)
|
|||
await getMpvInstance()?.load(data.queue.next.streamUrl, 'append');
|
||||
}
|
||||
}
|
||||
|
||||
if (pause) {
|
||||
await getMpvInstance()?.pause();
|
||||
} else if (pause === false) {
|
||||
// Only force play if pause is explicitly false
|
||||
await getMpvInstance()?.play();
|
||||
}
|
||||
} catch (err: NodeMpvError | any) {
|
||||
mpvLog({ action: `Failed to set play queue` }, err);
|
||||
}
|
||||
|
||||
if (pause) {
|
||||
getMpvInstance()?.pause();
|
||||
}
|
||||
});
|
||||
|
||||
// Replaces the queue in position 1 to the given data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue