mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 10:23:33 +00:00
simplify remote/media session (#632)
This commit is contained in:
parent
d57b4b4b68
commit
110a1a63f0
15 changed files with 236 additions and 230 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { IpcRendererEvent, ipcRenderer } from 'electron';
|
||||
import { SongUpdate } from '/@/renderer/types';
|
||||
import { QueueSong } from '/@/renderer/api/types';
|
||||
import { PlayerStatus } from '/@/renderer/types';
|
||||
|
||||
const requestFavorite = (
|
||||
cb: (
|
||||
|
|
@ -46,6 +47,10 @@ const updatePassword = (password: string) => {
|
|||
ipcRenderer.send('remote-password', password);
|
||||
};
|
||||
|
||||
const updatePlayback = (playback: PlayerStatus) => {
|
||||
ipcRenderer.send('update-playback', playback);
|
||||
};
|
||||
|
||||
const updateSetting = (
|
||||
enabled: boolean,
|
||||
port: number,
|
||||
|
|
@ -67,7 +72,7 @@ const updateShuffle = (shuffle: boolean) => {
|
|||
ipcRenderer.send('update-shuffle', shuffle);
|
||||
};
|
||||
|
||||
const updateSong = (args: SongUpdate) => {
|
||||
const updateSong = (args: QueueSong | undefined) => {
|
||||
ipcRenderer.send('update-song', args);
|
||||
};
|
||||
|
||||
|
|
@ -89,6 +94,7 @@ export const remote = {
|
|||
setRemotePort,
|
||||
updateFavorite,
|
||||
updatePassword,
|
||||
updatePlayback,
|
||||
updateRating,
|
||||
updateRepeat,
|
||||
updateSetting,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue