Check sessionTypes instead of persistentState when denying, just like the real CDM

This commit is contained in:
Ingan121
2025-08-30 20:44:07 +09:00
parent 11637a784f
commit 5d7991f9fa

View File

@@ -298,8 +298,8 @@
_args[0] = "com.ingan121.vineless.invalid";
await _target.apply(_this, _args); // should throw here
}
if (!profileConfig.allowPersistence && (origConfig[0].persistentState === "required")) {
console.warn("[Vineless] Denying persistentState: required due to user preference");
if (!profileConfig.allowPersistence && !origConfig.some(c => !c.sessionTypes || (c.sessionTypes.length === 1 && c.sessionTypes.includes('temporary')))) {
console.warn("[Vineless] Denying persistent-license due to user preference");
_args[0] = "com.ingan121.vineless.invalid";
await _target.apply(_this, _args); // should throw here
}