mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
feat: simple remote control support on http
This commit is contained in:
1 parent
5a4cdd848f
commit
d6a07cc0cd
14 files changed
+146
-19
No files matched your search
+13
-1
@@ -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 {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user