Persist collector state and stabilize download controls
Persist collector packages and disclosure state through validated atomic AppData storage with backup recovery and shutdown synchronization. Align download sidebar metrics with the hidden-extracted presentation scope and keep Start available through temporary Real-Debrid cooldowns while preserving hard account blocks.
This commit is contained in:
@@ -773,6 +773,11 @@ function getRealDebridAccountCooldown(accountId: string, now = Date.now()): Real
|
||||
return detail;
|
||||
}
|
||||
|
||||
export function isRealDebridAccountBlockedForStart(accountId: string, now = Date.now()): boolean {
|
||||
const cooldown = getRealDebridAccountCooldown(accountId, now);
|
||||
return Boolean(cooldown && cooldown.category !== "temporary");
|
||||
}
|
||||
|
||||
export function getAvailableRealDebridAccounts(settings: AppSettings, now = Date.now()): RealDebridAccountEntry[] {
|
||||
return getConfiguredRealDebridAccounts(settings).filter((account) => account.enabled
|
||||
&& !isRealDebridAccountDailyLimitReached(settings, account.id, now)
|
||||
|
||||
Reference in New Issue
Block a user