mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-25 00:11:26 -07:00
Overlay 2.0 (#12)
This commit is contained in:
@@ -18,6 +18,7 @@ type MpvEventClient = {
|
||||
export function createHandleMpvConnectionChangeHandler(deps: {
|
||||
reportJellyfinRemoteStopped: () => void;
|
||||
refreshDiscordPresence: () => void;
|
||||
syncOverlayMpvSubtitleSuppression: () => void;
|
||||
hasInitialJellyfinPlayArg: () => boolean;
|
||||
isOverlayRuntimeInitialized: () => boolean;
|
||||
isQuitOnDisconnectArmed: () => boolean;
|
||||
@@ -27,7 +28,10 @@ export function createHandleMpvConnectionChangeHandler(deps: {
|
||||
}) {
|
||||
return ({ connected }: { connected: boolean }): void => {
|
||||
deps.refreshDiscordPresence();
|
||||
if (connected) return;
|
||||
if (connected) {
|
||||
deps.syncOverlayMpvSubtitleSuppression();
|
||||
return;
|
||||
}
|
||||
deps.reportJellyfinRemoteStopped();
|
||||
if (!deps.hasInitialJellyfinPlayArg()) return;
|
||||
if (deps.isOverlayRuntimeInitialized()) return;
|
||||
|
||||
Reference in New Issue
Block a user