This commit adds support for viewing a user's AllDebrid magnet list. AllDebrid does not save unlocked links, but they do save which magnets a user has queried. Also clean up various functions in DebridManager. Signed-off-by: kingbri <bdashore3@proton.me>
39 lines
925 B
Swift
39 lines
925 B
Swift
//
|
|
// DebridCloudView.swift
|
|
// Ferrite
|
|
//
|
|
// Created by Brian Dashore on 12/31/22.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct DebridCloudView: View {
|
|
@EnvironmentObject var debridManager: DebridManager
|
|
|
|
var body: some View {
|
|
NavView {
|
|
VStack {
|
|
List {
|
|
switch debridManager.selectedDebridType {
|
|
case .realDebrid:
|
|
RealDebridCloudView()
|
|
case .premiumize:
|
|
PremiumizeCloudView()
|
|
case .allDebrid:
|
|
AllDebridCloudView()
|
|
case .none:
|
|
EmptyView()
|
|
}
|
|
}
|
|
.inlinedList()
|
|
.listStyle(.grouped)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
struct DebridCloudView_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
DebridCloudView()
|
|
}
|
|
}
|