Premiumize is another debrid provider. Add support in addition to other debrid services. Add a unified Magnet type that encloses both the link and hash when needed for certain services. A universal ASAuthenticationSession has been added to make implicit authentication easier for services that support it. Clean up declarations of certain variables that were mismanaged during the debrid decentralization process. Signed-off-by: kingbri <bdashore3@proton.me>
47 lines
1.1 KiB
Swift
47 lines
1.1 KiB
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")
|
|
}
|
|
|
|
if debridManager.selectedDebridType == .premiumize {
|
|
DebridLabelView(result: result, debridAbbreviation: "PM")
|
|
}
|
|
}
|
|
.font(.caption)
|
|
}
|
|
}
|