|
|
@@ -693,6 +693,7 @@ private struct SlskdSettings: View {
|
|
|
@State private var soulseekPassword: String = SlskdCredentials.shared.password ?? ""
|
|
|
@State private var connectionStatus: SlskdConnectionStatus = .unknown
|
|
|
@State private var isTesting = false
|
|
|
+ @AppStorage("slskd.qualityThreshold") private var qualityThreshold: Int = 80
|
|
|
/// H-6: Track whether credentials have unsaved changes.
|
|
|
@State private var hasUnsavedCredentials = false
|
|
|
/// H-6: Debounce timer to avoid saving on every keystroke.
|
|
|
@@ -733,6 +734,25 @@ private struct SlskdSettings: View {
|
|
|
externalModeSection
|
|
|
}
|
|
|
|
|
|
+ // Quality threshold (both modes)
|
|
|
+ VStack(alignment: .leading, spacing: 6) {
|
|
|
+ HStack {
|
|
|
+ Text("Quality Threshold")
|
|
|
+ .font(.headline)
|
|
|
+ Spacer()
|
|
|
+ Text("\(qualityThreshold)")
|
|
|
+ .font(.system(.body, design: .monospaced))
|
|
|
+ .foregroundStyle(.secondary)
|
|
|
+ }
|
|
|
+ Slider(value: Binding(
|
|
|
+ get: { Double(qualityThreshold) },
|
|
|
+ set: { qualityThreshold = Int($0) }
|
|
|
+ ), in: 30...150, step: 10)
|
|
|
+ Text("Sources scoring below \(qualityThreshold) are grayed out. Higher = stricter (FLAC preferred). Lower = more results.")
|
|
|
+ .font(.caption)
|
|
|
+ .foregroundStyle(.secondary)
|
|
|
+ }
|
|
|
+
|
|
|
Divider()
|
|
|
|
|
|
// Connection test (both modes)
|