mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-11 11:06:16 -08:00
refactor: code improvements
This commit is contained in:
3 files changed
+6
-13
No files matched your search
@@ -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';
|
||||
@@ -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');
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user