Repository navigation
fix: premature torrent removals, HnR clear mode, tests, .cursor in gi… - #308
Merged
Merged
Conversation
for more information, see https://pre-commit.ci
… release date - Use instance name as-is when it already starts with 'qbit' - Update docs index latest release date to February 2026
for more information, see https://pre-commit.ci
…found' warning
has_internet() was given qBitManager in PlaceHolderArr and FreeSpaceManager
loops; it then called transfer_info() with default instance_name='default'.
Config uses section names (e.g. 'qBit'), so get_client('default') logged a
warning. Use manager.client (first available client) at both call sites.
added 3 commits
February 26, 2026 14:13
Run PRAGMA integrity_check before first connect; if not ok, attempt WAL checkpoint then full dump/restore repair. Ensures corrupted qbitrr.db is repaired automatically on restart without manual steps.
…mit < 0 When tracker DownloadRateLimit is negative (unlimited), the elif branch was incorrectly calling set_upload_limit(limit=-1) instead of set_download_limit(limit=-1), resetting upload instead of download.
…ir fails - Wrap repair_database() in try/except so startup does not crash on 'database disk image is malformed' or other repair failures. - On DatabaseRecoveryError, move corrupt DB to qbitrr.db.corrupt.<ts> so a fresh database is created on connect (avoids repeated failures).
added 3 commits
February 26, 2026 14:30
…ailed repair - Docker: add tini as PID 1 so SIGTERM reaches Python (enables checkpoint on stop) - docker-compose: stop_grace_period: 30s so cleanup runs before SIGKILL - database: on failed repair delete corrupt DB (not move) so fresh DB is created - docs: document why corruption happens, tini/stop_grace_period, prevention
Pass arr_categories | qbit_managed_categories to FreeSpaceManager so torrents in ManagedCategories (e.g. autobrr) are included in free-space checks and can be paused when disk is low.
- requirements.docs.txt: pin mkdocs<2.0 for Material compatibility - mkdocs.yml: use logo SVG, update copyright to 2026 - disk-space.md: document Arr + qBit-managed categories for FSM; add troubleshooting step for unmonitored categories
- pull_requests: skip docker_image job on fork PRs (no secrets); use brew install sdl2 on macOS instead of full Homebrew installer - mkdocs: remove missing favicon reference so --strict build passes in CI - requirements.docs: pin mkdocs<1.6 to avoid 2.x incompatibility warning
added 5 commits
February 26, 2026 16:46
… fix CI AssertionError
- Remove kind badges from qBit process cards and Arr/qBit badge from category chips - Ensure a card is shown for every qBit instance in status, even with no processes - Show instance alive status when a qBit card has no processes - Hide Restart All footer when card has no processes
added 2 commits
February 26, 2026 18:10
- Correct all references from /api/health to /health (actual route is GET /health) - Update index Built With: replace Mantine with custom CSS (no external UI runtime) - Update webui/index.md intro to say TypeScript and custom CSS
- config-file: ConfigVersion string/default, FreeSpaceFolder default CHANGE_ME, WebUI ViewDensity, qBit ManagedCategories, minimal config without ConfigVersion - config-editor: ViewDensity key fields/reload table, rate limits KB/s, MaximumDeletablePercentage decimal 0-1 - environment: SearchLoopDelay -1 = 30s delay not disabled, note on process/WebUI env - api: document GET /web/qbit/categories (public only) - disk-space: clarify pause only managed categories - health-monitoring: note [Settings.FFprobe] not in gen-config - process-management: fix env var name, shutdown wording, process API example - tooltips: add WebUI.ViewDensity - gen_config: IgnoreTorrentsYoungerThan default 180 in settings_defaults
- Docker: add entrypoint that chowns /config to PUID/PGID so app can write (fixes 'attempt to write a readonly database' on mounted volumes) - Dockerfile: install gosu, use entrypoint, remove USER so root can chown at start - home_path/logger: make chmod non-fatal when volume does not allow it - database: ensure db dir writable, retry on readonly with clear error message - WebUI: fix ProcessesView.tsx QUALITY_TOKEN_REGEX name and usage - WebUI: add Hashable index signature to RadarrMovie and LidarrAlbumEntry
added 2 commits
March 1, 2026 09:06
- Backend: add lines/offset params to log API for efficient tail and pagination - Logs view: Live checkbox disables polling; Refresh fetches current tail - Load older logs button to prepend older lines (scroll up indefinitely) - Auto-scroll remains separate from Live
- WelcomeModal: use ReactMarkdown for release notes instead of pre - Check Updates: show popup after check - either 'already on latest' with current version changelog (markdown) or update-available modal with latest changelog (markdown) - refreshMeta now returns fetched MetaResponse for callers - Add AlreadyUpToDateModal for Check Updates when no update available
added 2 commits
March 1, 2026 10:04
- AGENTS.md: correct locked_database() to database_lock() - config: load from CONFIG_FILE or resolved CONFIG_PATH after copy - database: wrap init (connect, create_tables) in database_lock() - search_activity_store: wrap all DB ops in database_lock() - arss: wrap TorrentLibrary/tagless, db_reset_*, queue cleanup in database_lock() - webui: wrap Radarr/Lidarr/Sonarr DB access in database_lock() - webui: add debug logging to remaining silent except blocks - webui: harden _resolve_log_file (sanitize name, log on exception)
Owner
Author
Contributor
|
Could not push Autofix changes. The PR branch has conflicting changes. |
Owner
Author
Applied via @cursor push command
…ents PlaceHolderArr._process_failed was unioning original to_delete_all into the cleanup set even when the qBit delete API failed, causing torrents to be removed from name_cache/cache while still in qBittorrent. Now only cleaned_hashes = deleted_hashes | temp_to_delete are used for cache cleanup, matching Arr._process_failed behavior.
…rArr._process_failed
- Add explicit permissions to pre-commit and dockerhub-description workflows - Mask qBit username in debug log (main.py) to avoid clear-text logging - Stop exposing exception/stack trace in WebUI API error responses (webui.py)
The CodeQL security fix (37b6dcf) accidentally removed the @app.get('/web/config') decorator when editing exception handling, so the Config tab received 405 Method Not Allowed and users could not load or adjust config. Re-add the decorator so GET /web/config is registered again.
- Always strip sensitive keys in GET /api/config and GET /web/config - Skip overwriting secrets when update sends redaction placeholder - Add REDACTED_PLACEHOLDER and _is_sensitive_dotted_key helper
added 3 commits
March 1, 2026 23:28
- Add comparison-huntarr.md focusing on missing-item search and torrent handling - Add nav entry under Getting Started and From Huntarr subsection in migration.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes premature torrent removals (removed before meeting max seeding/ratio and tracker minimums), adds configurable HnR clear mode, and includes operational hardening (DB repair, FSM category monitoring, Docker/CI/docs fixes) plus WebUI and docs consistency updates.
Changes
Sentinel / removal logic
<= 0(e.g.-5) are treated as unset; seeding-based removal only runs when at least one limit is set and met.Logging
HitAndRunClearMode
HitAndRunClearMode = "and" | "or" | "disabled"(default"disabled").HitAndRunMode = true→HitAndRunClearMode = "and"for backwards compatibility.Database
PRAGMA integrity_checkat startup; on failure, attempt WAL checkpoint and repair via db_recovery; on unrecoverable corruption, offer fresh DB (delete corrupt DB so a new one is created).FreeSpaceManager
qBit.ManagedCategoriesin addition to Arr-managed paths; disk-usage path handling improved (incl. Docker mount warnings).qBit / config
set_download_limitwhenDownloadRateLimit < 0.WebUI
Docker & CI
tinifor proper SIGTERM forwarding.docs/changelog.md, ensuredocs/changelog.mdexists in CI (copy CHANGELOG.md when missing), remove symlink before copying changelog in CI.Docs
docs/changelog.mdincludes rootCHANGELOG.mdfor MkDocs build./health; Built With stack updated./web/qbit/categoriesand related webui API.Code quality
(bool, int, bool, dict | None, dict | None).tests/unit/test_torrent_limit_check.pyfor removal modes 1–4 and unset/partial limits (5 tests)..cursor.Config & schema
_migrate_hnr_clear_mode.Note
Medium Risk
Medium risk due to Docker runtime changes (new
tini/gosuentrypoint, non-root user setup, permission/chown behavior) and CI workflow adjustments that can affect build/publish pipelines; most other changes are documentation-only.Overview
Improves operational reliability and release/CI hygiene by updating GitHub Actions workflows (CodeQL adds JS/TS scanning, pre-commit installs the package for import resolution, PR Docker builds are skipped for forks, nightly builds are multi-arch, and version detection no longer relies on
setup.py).Hardens the Docker image by switching to
python:3.12-slim, installingtini/gosu/curl, creating a dedicatedqbitrruser, and using a newdocker-entrypoint.shto fix/configownership and properly forward signals.Fixes MkDocs/docsite build issues by replacing the
docs/changelog.mdsymlink with aninclude-markdowninclude, ensuring the changelog file exists in docs CI, adjusting MkDocs plugins/nav/logo, and updating documentation consistency (notably using/healthinstead of/api/health, plus new/updated configuration and troubleshooting pages).Written by Cursor Bugbot for commit 29de695. This will update automatically on new commits. Configure here.