diff --git a/.gitignore b/.gitignore index 112be1b34..8632844de 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ preload.js shared/*.js playwright-report .nx +server.js # dependencies /node_modules diff --git a/electron/api.ts b/electron/api.ts index c523b348c..f12b1373e 100644 --- a/electron/api.ts +++ b/electron/api.ts @@ -32,6 +32,7 @@ import { PLAYLIST_UPDATE_RESPONSE, SET_MPV_PLAYER_PATH, SET_VLC_PLAYER_PATH, + SETTINGS_UPDATE, STALKER_REQUEST, STALKER_RESPONSE, XTREAM_REQUEST, @@ -40,6 +41,7 @@ import { import { Playlist } from '../shared/playlist.interface'; import { createPlaylistObject } from '../shared/playlist.utils'; import { ParsedPlaylist } from '../src/typings.d'; +import { Server } from './server'; const fs = require('fs'); const https = require('https'); @@ -88,7 +90,12 @@ export class Api { mpv; + settings; + + server; + constructor(store) { + this.server = new Server(this); this.store = store; this.mpv = this.createMpvInstance(); this.mpv @@ -286,7 +293,11 @@ export class Api { .on(SET_VLC_PLAYER_PATH, (_event, vlcPlayerPath) => { console.log('... setting vlc player path', vlcPlayerPath); store.set(VLC_PLAYER_PATH, vlcPlayerPath); - }); + }) + .on(SETTINGS_UPDATE, (_event, arg) => { + this.settings = arg; + this.server.updateSettings(); + }) ; // listeners for EPG events ipcMain @@ -625,4 +636,5 @@ export class Api { } }); } + } diff --git a/electron/main.ts b/electron/main.ts index 380c4ccd5..4900d05ba 100644 --- a/electron/main.ts +++ b/electron/main.ts @@ -120,7 +120,7 @@ try { const menu = new AppMenu(win); Menu.setApplicationMenu(menu.getMenu()); api.setMainWindow(win); - + // create hidden window for epg worker createEpgWorkerWindow(); }); diff --git a/electron/remote-control/index.sqrl b/electron/remote-control/index.sqrl new file mode 100644 index 000000000..233f4ce3e --- /dev/null +++ b/electron/remote-control/index.sqrl @@ -0,0 +1,85 @@ + +
+{{ 'SETTINGS.REMOTE_CONTROL_DESCRIPTION' | translate }}
+{{ 'SETTINGS.REMOTE_CONTROL_PORT_DESCRIPTION' | translate }}
+