AllDebrid is another debrid provider. Add support to Ferrite in addition to RealDebrid. The overall debrid login backend has changed to accomodate for a more agnostic app structure where more services can be added as needed. Also add some cosmetic changes to search so filters can be added while searching for a phrase. Signed-off-by: kingbri <bdashore3@proton.me>
43 lines
960 B
Swift
43 lines
960 B
Swift
//
|
|
// SearchResultRDView.swift
|
|
// Ferrite
|
|
//
|
|
// Created by Brian Dashore on 7/26/22.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct SearchResultInfoView: View {
|
|
@EnvironmentObject var debridManager: DebridManager
|
|
|
|
var result: SearchResult
|
|
|
|
var body: some View {
|
|
HStack {
|
|
Text(result.source)
|
|
|
|
Spacer()
|
|
|
|
if let seeders = result.seeders {
|
|
Text("S: \(seeders)")
|
|
}
|
|
|
|
if let leechers = result.leechers {
|
|
Text("L: \(leechers)")
|
|
}
|
|
|
|
if let size = result.size {
|
|
Text(size)
|
|
}
|
|
|
|
if debridManager.selectedDebridType == .realDebrid {
|
|
DebridLabelView(result: result, debridAbbreviation: "RD")
|
|
}
|
|
|
|
if debridManager.selectedDebridType == .allDebrid {
|
|
DebridLabelView(result: result, debridAbbreviation: "AD")
|
|
}
|
|
}
|
|
.font(.caption)
|
|
}
|
|
}
|