diff --git a/shared/ipc-commands.ts b/shared/ipc-commands.ts index 2567ae0e0..1ccb938cc 100644 --- a/shared/ipc-commands.ts +++ b/shared/ipc-commands.ts @@ -6,6 +6,7 @@ export const EPG_GET_PROGRAM = 'EPG:GET_PROGRAM'; export const EPG_GET_PROGRAM_DONE = 'EPG:GET_PROGRAM_DONE'; // Playlist related commands +export const PLAYLIST_GET_ALL = 'PLAYLIST:GET_ALL'; export const PLAYLIST_SAVE_DETAILS = 'PLAYLIST:SAVE_DETAILS'; export const PLAYLIST_PARSE = 'PLAYLIST:PARSE_PLAYLIST'; export const PLAYLIST_PARSE_RESPONSE = 'PLAYLIST:PARSE_PLAYLIST_RESPONSE'; @@ -15,11 +16,11 @@ export const PLAYLIST_UPDATE_POSITIONS = 'PLAYLIST:UPDATE_POSITIONS'; // General export const SHOW_WHATS_NEW = 'SHOW_WHATS_NEW'; -export const ERROR = 'error'; +export const ERROR = 'ERROR'; // Channels export const CHANNEL_SET_USER_AGENT = 'CHANNEL:SET_USER_AGENT'; // Views -export const VIEW_SETTINGS = 'settings-view'; -export const VIEW_ADD_PLAYLIST = 'add-playlist-view'; +export const VIEW_SETTINGS = 'VIEW:SETTINGS'; +export const VIEW_ADD_PLAYLIST = 'VIEW:PLAYLISTS'; diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts index 5b17ecc65..957dbdad7 100644 --- a/src/app/home/home.component.ts +++ b/src/app/home/home.component.ts @@ -5,7 +5,6 @@ import { ChannelStore, createChannel } from '../state'; import { Router } from '@angular/router'; import { MatSnackBar } from '@angular/material/snack-bar'; import { Playlist } from '../../../shared/playlist.interface'; -import { ElectronService } from '../services/electron.service'; import { ERROR, PLAYLIST_PARSE, @@ -61,7 +60,7 @@ export class HomeComponent { this.snackBar.open('Done! Playlist was removed.', null, { duration: 2000, }); - // this.electronService.sendIpcEvent('playlists-all'); + this.electronService.sendIpcEvent('playlists-all'); }, }, { diff --git a/src/app/services/electron.service.ts b/src/app/services/electron.service.ts index 499a18e51..1566007e6 100644 --- a/src/app/services/electron.service.ts +++ b/src/app/services/electron.service.ts @@ -31,13 +31,6 @@ export class ElectronService extends DataService { /* this.webFrame = window.require('electron').webFrame */ // need to test whether remote is available /* this.childProcess = window.require('child_process'); this.fs = window.require('fs'); */ - - // create custom title bar - /* new Titlebar({ - backgroundColor: Color.fromHex('#000'), - itemBackgroundColor: Color.fromHex('#222'), - enableMnemonics: true, - }); */ } } @@ -54,7 +47,7 @@ export class ElectronService extends DataService { * @param payload data payload */ sendIpcEvent(type: string, payload?: unknown): void { - this.sendIpcEvent(type, payload); + this.ipcRenderer.send(type, payload); } /**