From e859f5d5180529f40c5d0992cc62f94ec48b0218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Wed, 24 Feb 2021 17:05:49 +0100 Subject: [PATCH] Fix opening files from web application It was trying to send GioFiles over WebSocket. The idea of doing that seems so dumb, that I do not know why I did not notice this issue earlier. --- src/playerRemote.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/playerRemote.js b/src/playerRemote.js index e9098d9c..090abc7e 100644 --- a/src/playerRemote.js +++ b/src/playerRemote.js @@ -20,9 +20,20 @@ class ClapperPlayerRemote extends GObject.Object set_playlist(playlist) { + const uris = []; + + /* We can not send GioFiles via WebSocket */ + for(let source of playlist) { + const uri = (source.get_uri != null) + ? source.get_uri() + : source; + + uris.push(uri); + } + this.webclient.sendMessage({ action: 'set_playlist', - value: playlist + value: uris }); } });