From 6a1fa789959a529f4003cfb77fe4bfa9d363c8af Mon Sep 17 00:00:00 2001 From: BoulderBadgeDad Date: Fri, 26 Jun 2026 10:15:23 -0700 Subject: [PATCH] video wishlist processor: show the actual slskd error on 'search didn't run' surface why start_search failed (slskd error string) in the automation log instead of a generic 'not responding?'. seam now returns (candidates, error); handler tolerates bare list/None too (test fakes). so we can see the real reason. --- core/automation/handlers/video_process_wishlist.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/core/automation/handlers/video_process_wishlist.py b/core/automation/handlers/video_process_wishlist.py index 5abc43df..03c87ec9 100644 --- a/core/automation/handlers/video_process_wishlist.py +++ b/core/automation/handlers/video_process_wishlist.py @@ -133,10 +133,10 @@ def _default_search(item: Dict[str, Any], media_type: str): season=ctx.get("season"), episode=ctx.get("episode")) res = _search_for_retry(query) or {} if res.get("started") is False: - return None # slskd didn't accept the search + return None, res.get("error") # slskd didn't accept the search — pass the reason profile = load_profile(get_video_db()) return _evaluate_hits(res.get("hits") or [], profile, ctx["scope"], - ctx.get("season"), ctx.get("episode")) + ctx.get("season"), ctx.get("episode")), None def _default_enqueue(item: Dict[str, Any], best: Dict[str, Any], candidates: List[Dict[str, Any]], @@ -223,7 +223,9 @@ def auto_video_process_wishlist( lock = threading.Lock() def _one(it): - cands = search(it, media_type) + found = search(it, media_type) + # the seam returns (candidates, error); tolerate a bare list/None too (test fakes) + cands, err = found if isinstance(found, tuple) else (found, None) didnt_run = cands is None # slskd not configured / errored / rate-limited cands = cands or [] best = pick_best(cands) @@ -236,7 +238,9 @@ def auto_video_process_wishlist( if ok: msg, lt = "Grabbed '%s'" % name, 'success' elif didnt_run: - msg, lt = "Search didn't run for '%s' — slskd not responding?" % name, 'warning' + msg = ("Search didn't run for '%s' — slskd error: %s" % (name, err)) if err \ + else ("Search didn't run for '%s' — slskd not responding?" % name) + lt = 'warning' elif not cands: msg, lt = "No search results for '%s'" % name, 'info' else: