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
@@ -3,6 +3,10 @@ type MpvVisibilityClient = {
requestProperty: (name: string) => Promise<unknown>;
};
type RestoreOverlayMpvSubtitlesOptions = {
force?: boolean;
};
function parseSubVisibility(value: unknown): boolean {
if (typeof value === 'string') {
const normalized = value.trim().toLowerCase();
@@ -81,11 +85,11 @@ export function createRestoreOverlayMpvSubtitlesHandler(deps: {
shouldKeepSuppressedFromVisibleOverlayBinding: () => boolean;
setMpvSubVisibility: (visible: boolean) => void;
}) {
return (): void => {
return (options: RestoreOverlayMpvSubtitlesOptions = {}): void => {
deps.setRevision(deps.getRevision() + 1);
const savedVisibility = deps.getSavedSubVisibility();
if (deps.shouldKeepSuppressedFromVisibleOverlayBinding()) {
if (!options.force && deps.shouldKeepSuppressedFromVisibleOverlayBinding()) {
deps.setMpvSubVisibility(false);
return;
}