From 542b8d9bf4b1cb2012e545bfdeb58f32f8d0b28e Mon Sep 17 00:00:00 2001 From: Flaminel Date: Mon, 16 Mar 2026 20:12:20 +0200 Subject: [PATCH] added dummy toggle to represent replacement searches --- .../Features/Jobs/Seeker.cs | 14 +++++++------- .../features/settings/seeker/seeker.component.html | 4 +++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/code/backend/Cleanuparr.Infrastructure/Features/Jobs/Seeker.cs b/code/backend/Cleanuparr.Infrastructure/Features/Jobs/Seeker.cs index 0134bdda..8218bfa0 100644 --- a/code/backend/Cleanuparr.Infrastructure/Features/Jobs/Seeker.cs +++ b/code/backend/Cleanuparr.Infrastructure/Features/Jobs/Seeker.cs @@ -56,13 +56,13 @@ public sealed class Seeker : IHandler } // Replacement searches queued after download removal - SearchQueueItem? reactiveItem = await _dataContext.SearchQueue + SearchQueueItem? replacementItem = await _dataContext.SearchQueue .OrderBy(q => q.CreatedAt) .FirstOrDefaultAsync(); - if (reactiveItem is not null) + if (replacementItem is not null) { - await ProcessReactiveItemAsync(reactiveItem); + await ProcessReplacementItemAsync(replacementItem); return; } @@ -75,7 +75,7 @@ public sealed class Seeker : IHandler await ProcessProactiveSearchAsync(config); } - private async Task ProcessReactiveItemAsync(SearchQueueItem item) + private async Task ProcessReplacementItemAsync(SearchQueueItem item) { ArrInstance? arrInstance = await _dataContext.ArrInstances .Include(a => a.ArrConfig) @@ -84,7 +84,7 @@ public sealed class Seeker : IHandler if (arrInstance is null) { _logger.LogWarning( - "Skipping reactive search for '{Title}' — arr instance {InstanceId} no longer exists", + "Skipping replacement search for '{Title}' — arr instance {InstanceId} no longer exists", item.Title, item.ArrInstanceId); _dataContext.SearchQueue.Remove(item); await _dataContext.SaveChangesAsync(); @@ -103,7 +103,7 @@ public sealed class Seeker : IHandler await _eventPublisher.PublishSearchTriggered(arrInstance.Name, 1, [item.Title]); - _logger.LogInformation("Reactive search triggered for '{Title}' on {InstanceName}", + _logger.LogInformation("Replacement search triggered for '{Title}' on {InstanceName}", item.Title, arrInstance.Name); // Update search history for proactive search awareness @@ -111,7 +111,7 @@ public sealed class Seeker : IHandler } catch (Exception ex) { - _logger.LogError(ex, "Failed to process reactive search for '{Title}' on {InstanceName}", + _logger.LogError(ex, "Failed to process replacement search for '{Title}' on {InstanceName}", item.Title, arrInstance.Name); } finally diff --git a/code/frontend/src/app/features/settings/seeker/seeker.component.html b/code/frontend/src/app/features/settings/seeker/seeker.component.html index 23f9e6e5..d91b17e6 100644 --- a/code/frontend/src/app/features/settings/seeker/seeker.component.html +++ b/code/frontend/src/app/features/settings/seeker/seeker.component.html @@ -20,12 +20,14 @@
+ hint="Master toggle for all searching. When disabled, no replacement or proactive searches will be performed." /> @if (searchEnabled()) { } +