feat(config): add configuration window (#70)

This commit is contained in:
2026-05-21 04:16:21 -07:00
committed by GitHub
parent a54f03f0cd
commit dc52bc2fba
287 changed files with 14507 additions and 8134 deletions
+16 -1
View File
@@ -186,12 +186,12 @@ export class MpvIpcClient implements MpvClient {
this.connected = true;
this.connecting = false;
this.socket = this.transport.getSocket();
this.emit('connection-change', { connected: true });
this.reconnectAttempt = 0;
this.hasConnectedOnce = true;
this.setSecondarySubVisibility(false);
subscribeToMpvProperties(this.send.bind(this));
requestMpvInitialState(this.send.bind(this));
this.emit('connection-change', { connected: true });
const shouldAutoStart =
this.deps.autoStartOverlay || this.deps.getResolvedConfig().auto_start_overlay === true;
@@ -275,6 +275,21 @@ export class MpvIpcClient implements MpvClient {
this.transport.connect();
}
reconnect(): void {
logger.debug('MPV IPC reconnect requested.');
const wasConnected = this.connected;
this.transport.shutdown();
this.connected = false;
this.connecting = false;
this.socket = null;
this.playbackPaused = null;
if (wasConnected) {
this.emit('connection-change', { connected: false });
}
this.failPendingRequests();
this.connect();
}
private scheduleReconnect(): void {
this.reconnectAttempt = scheduleMpvReconnect({
attempt: this.reconnectAttempt,