From 0d8089ea1765faafa07dce320e5f69c59b1e9f96 Mon Sep 17 00:00:00 2001 From: Justin Bollinger Date: Sat, 25 Apr 2026 20:27:33 -0400 Subject: [PATCH] fix(api): increase watch-dir polling timeout from 10s to 30s Transmission's watch dir scanner runs every ~10s, so a 10s deadline could expire before the first scan completes. 30s gives 2-3 scan cycles of headroom. Co-Authored-By: Claude Sonnet 4.6 --- README.md | 3 +++ hate_crack/api.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 06991ae..de289eb 100644 --- a/README.md +++ b/README.md @@ -918,6 +918,9 @@ Interactive menu for downloading and managing wordlists from Weakpass.com via Bi ------------------------------------------------------------------- ### Version History +Version 2.9.4 + - Fixed torrent add timeout: increased watch-dir polling window from 10s to 30s to give transmission's scanner (which runs every ~10s) enough time to pick up new .torrent files + Version 2.9.3 - Routed `.torrent` metadata files through a daemon-watched temp directory instead of the wordlist directory; actual wordlist content still lands in the configured wordlist directory - Suppressed `transmission-daemon` stdout/stderr so daemon log messages no longer appear in the terminal diff --git a/hate_crack/api.py b/hate_crack/api.py index 34c94bf..5adffdc 100644 --- a/hate_crack/api.py +++ b/hate_crack/api.py @@ -347,7 +347,7 @@ class TransmissionSession: def add(self, torrent_path: str) -> int: before_ids = {e["id"] for e in self.list()} shutil.copy2(torrent_path, self._watch_dir) - deadline = time.monotonic() + 10.0 + deadline = time.monotonic() + 30.0 while time.monotonic() < deadline: after_entries = self.list() new_ids = [e["id"] for e in after_entries if e["id"] not in before_ids]