Browse Source

feat: always search Soulseek in parallel with cloud (chunk 2)

Remove the early return that skipped Soulseek when cloud results were
found. Now both sources are searched every time, giving users the
option to download a higher quality version even when the album exists
in their ChadMusic library.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
aldiss 2 tháng trước cách đây
mục cha
commit
0797d71349
1 tập tin đã thay đổi với 2 bổ sung8 xóa
  1. 2 8
      Sources/Services/UnifiedSearchCoordinator.swift

+ 2 - 8
Sources/Services/UnifiedSearchCoordinator.swift

@@ -103,7 +103,7 @@ struct ScoredSoulseekSource: Identifiable {
 
 // MARK: - Coordinator
 
-/// Orchestrates cloud-first, Soulseek-fallback search.
+/// Orchestrates parallel cloud + Soulseek search.
 /// NOT a singleton — create one per search session.
 @MainActor
 @Observable
@@ -230,13 +230,7 @@ final class UnifiedSearchCoordinator {
             (album.artist?.lowercased().contains(lowerQuery) ?? false)
         }
 
-        // If we found cloud results, we're done
-        if !cloudResults.isEmpty {
-            phase = .done
-            return
-        }
-
-        // Step 2: No cloud results — try Soulseek if configured
+        // Step 2: Always search Soulseek in parallel (not just as fallback)
         guard slskd.isConfigured else {
             phase = .done
             return