rebuild rtorrent config
This commit is contained in:
@@ -28,6 +28,20 @@ DEFAULTS = {
|
||||
"recovery_after_errors": 3,
|
||||
}
|
||||
|
||||
SAFE_FALLBACK_MINIMUMS = {
|
||||
"active_interval_seconds": 3.0,
|
||||
"idle_interval_seconds": 15.0,
|
||||
"error_interval_seconds": 30.0,
|
||||
"live_stats_interval_seconds": 3.0,
|
||||
"torrent_list_interval_seconds": 30.0,
|
||||
"system_stats_interval_seconds": 5.0,
|
||||
"tracker_stats_interval_seconds": 300.0,
|
||||
"disk_stats_interval_seconds": 60.0,
|
||||
"queue_stats_interval_seconds": 15.0,
|
||||
"slow_stats_interval_seconds": 60.0,
|
||||
"heartbeat_interval_seconds": 15.0,
|
||||
}
|
||||
|
||||
|
||||
def _key(profile_id: int) -> str:
|
||||
return f"poller.settings.{int(profile_id)}"
|
||||
@@ -67,9 +81,9 @@ def normalize_settings(data: dict | None) -> dict:
|
||||
"recovery_after_errors": int(_coerce_float(raw.get("recovery_after_errors"), 3, 1, 20)),
|
||||
}
|
||||
if settings["safe_fallback_enabled"]:
|
||||
for key in ("active_interval_seconds", "idle_interval_seconds", "error_interval_seconds", "live_stats_interval_seconds", "torrent_list_interval_seconds", "system_stats_interval_seconds", "queue_stats_interval_seconds"):
|
||||
if settings[key] <= 0:
|
||||
settings[key] = DEFAULTS[key]
|
||||
# Note: Safe fallback keeps existing functionality, but prevents very aggressive polling from overloading rTorrent or the browser.
|
||||
for key, minimum in SAFE_FALLBACK_MINIMUMS.items():
|
||||
settings[key] = max(float(settings.get(key) or DEFAULTS[key]), float(minimum))
|
||||
return settings
|
||||
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -3356,10 +3356,6 @@ body.mobile-mode .mobile-filter-bar {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#pollerRuntime {
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.planner-history-item {
|
||||
background: rgba(var(--bs-secondary-bg-rgb), 0.45);
|
||||
border: 1px solid var(--bs-border-color);
|
||||
@@ -3369,10 +3365,6 @@ body.mobile-mode .mobile-filter-bar {
|
||||
padding: 0.15rem 0.4rem;
|
||||
}
|
||||
|
||||
#pollerRuntime {
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
|
||||
.status-planner {
|
||||
align-items: center;
|
||||
background: transparent;
|
||||
@@ -5376,3 +5368,27 @@ body.compact-torrent-list .mobile-progress .torrent-progress {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
.poller-safe-preview {
|
||||
background: rgba(var(--bs-info-rgb), 0.08);
|
||||
border: 1px solid rgba(var(--bs-info-rgb), 0.22);
|
||||
border-radius: 0.7rem;
|
||||
color: var(--bs-secondary-color);
|
||||
font-size: 0.82rem;
|
||||
line-height: 1.45;
|
||||
padding: 0.55rem 0.7rem;
|
||||
}
|
||||
|
||||
.poller-diagnostic-line {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.25rem 0.45rem;
|
||||
line-height: 1.5;
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
|
||||
.poller-diagnostic-item {
|
||||
display: inline-flex;
|
||||
gap: 0.25rem;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user