mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-02 19:01:40 +00:00
slightly better error handling
This commit is contained in:
parent
43fe1a235e
commit
e68847f50a
1 changed files with 5 additions and 5 deletions
|
|
@ -328,11 +328,11 @@ ipcMain.on('player-set-queue', async (_event, data: PlayerData, pause?: boolean)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (data.queue.current?.streamUrl) {
|
if (data.queue.current?.streamUrl) {
|
||||||
await getMpvInstance()
|
try {
|
||||||
?.load(data.queue.current.streamUrl, 'replace')
|
await getMpvInstance()?.load(data.queue.current.streamUrl, 'replace');
|
||||||
.catch(() => {
|
} catch (error) {
|
||||||
getMpvInstance()?.play();
|
await getMpvInstance()?.play();
|
||||||
});
|
}
|
||||||
|
|
||||||
if (data.queue.next?.streamUrl) {
|
if (data.queue.next?.streamUrl) {
|
||||||
await getMpvInstance()?.load(data.queue.next.streamUrl, 'append');
|
await getMpvInstance()?.load(data.queue.next.streamUrl, 'append');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue