diff --git a/Ferrite/API/OffCloudWrapper.swift b/Ferrite/API/OffCloudWrapper.swift index 2bee0d2..62e1e08 100644 --- a/Ferrite/API/OffCloudWrapper.swift +++ b/Ferrite/API/OffCloudWrapper.swift @@ -14,9 +14,12 @@ import Foundation // Delete torrent (website URL, not API URL): /cloud/remove/\(torrentId) class OffCloud: DebridSource, ObservableObject { - var id: String = "OffCloud" - var abbreviation: String = "OC" - var website: String = "https://offcloud.com" + let id = "OffCloud" + let abbreviation = "OC" + let website = "https://offcloud.com" + let description = "OffCloud is a debrid service that is used for downloads and media playback. " + + "You must pay to access this service. \n\n" + + "This service does not inform if a torrent is a batch before downloading." @Published var authProcessing: Bool = false var isLoggedIn: Bool { diff --git a/Ferrite/API/PremiumizeWrapper.swift b/Ferrite/API/PremiumizeWrapper.swift index 9fafa4c..ad4aedd 100644 --- a/Ferrite/API/PremiumizeWrapper.swift +++ b/Ferrite/API/PremiumizeWrapper.swift @@ -11,6 +11,8 @@ class Premiumize: OAuthDebridSource, ObservableObject { let id = "Premiumize" let abbreviation = "PM" let website = "https://premiumize.me" + let description = "Premiumize is a debrid service that is used for downloads and media playback with seeding. " + + "You must pay to access the service." @Published var authProcessing: Bool = false var isLoggedIn: Bool { diff --git a/Ferrite/API/TorBoxWrapper.swift b/Ferrite/API/TorBoxWrapper.swift index c76409f..9037db6 100644 --- a/Ferrite/API/TorBoxWrapper.swift +++ b/Ferrite/API/TorBoxWrapper.swift @@ -14,9 +14,12 @@ import Foundation // Unrestrict: /torrents/requestdl class TorBox: DebridSource, ObservableObject { - var id: String = "TorBox" - var abbreviation: String = "TB" - var website: String = "https://torbox.app" + let id = "TorBox" + let abbreviation = "TB" + let website = "https://torbox.app" + let description = "TorBox is a debrid service that is used for downloads and media playback with seeding. " + + "Both free and paid plans are available. \n\n" + + "This service does not inform if a torrent is a batch before downloading." @Published var authProcessing: Bool = false var isLoggedIn: Bool { diff --git a/Ferrite/Protocols/Debrid.swift b/Ferrite/Protocols/Debrid.swift index 0c396d8..5ead94e 100644 --- a/Ferrite/Protocols/Debrid.swift +++ b/Ferrite/Protocols/Debrid.swift @@ -13,6 +13,7 @@ protocol DebridSource: AnyObservableObject { var id: String { get } var abbreviation: String { get } var website: String { get } + var description: String? { get } // Auth variables var authProcessing: Bool { get set } @@ -54,6 +55,12 @@ protocol DebridSource: AnyObservableObject { func deleteTorrent(torrentId: String?) async throws } +extension DebridSource { + var description: String? { + nil + } +} + protocol PollingDebridSource: DebridSource { // Task reference for polling var authTask: Task? { get set } diff --git a/Ferrite/Views/ComponentViews/Settings/SettingsDebridInfoView.swift b/Ferrite/Views/ComponentViews/Settings/SettingsDebridInfoView.swift index 0296eef..479acb9 100644 --- a/Ferrite/Views/ComponentViews/Settings/SettingsDebridInfoView.swift +++ b/Ferrite/Views/ComponentViews/Settings/SettingsDebridInfoView.swift @@ -18,7 +18,9 @@ struct SettingsDebridInfoView: View { List { Section(header: InlineHeader("Description")) { VStack(alignment: .leading, spacing: 10) { - Text("\(debridSource.id) is a debrid service that is used for unrestricting downloads and media playback. You must pay to access the service.") + Text(debridSource.description ?? + "\(debridSource.id) is a debrid service that is used for downloads and media playback. You must pay to access the service." + ) Link("Website", destination: URL(string: debridSource.website) ?? URL(string: "https://kingbri.dev/ferrite")!) }