2021-10-20 22:21:50 +00:00
|
|
|
import Foundation
|
|
|
|
|
|
|
|
enum VideosApp: String, CaseIterable {
|
|
|
|
case invidious, piped
|
|
|
|
|
|
|
|
var name: String {
|
|
|
|
rawValue.capitalized
|
|
|
|
}
|
|
|
|
|
|
|
|
var supportsAccounts: Bool {
|
2021-11-14 23:06:01 +00:00
|
|
|
true
|
|
|
|
}
|
|
|
|
|
|
|
|
var accountsUsePassword: Bool {
|
|
|
|
self == .piped
|
2021-10-20 22:21:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
var supportsPopular: Bool {
|
|
|
|
self == .invidious
|
|
|
|
}
|
|
|
|
|
|
|
|
var supportsSearchFilters: Bool {
|
|
|
|
self == .invidious
|
|
|
|
}
|
|
|
|
|
|
|
|
var supportsSubscriptions: Bool {
|
|
|
|
supportsAccounts
|
|
|
|
}
|
|
|
|
|
|
|
|
var supportsTrendingCategories: Bool {
|
|
|
|
self == .invidious
|
|
|
|
}
|
|
|
|
|
|
|
|
var supportsUserPlaylists: Bool {
|
|
|
|
self == .invidious
|
|
|
|
}
|
2021-10-27 21:11:38 +00:00
|
|
|
|
|
|
|
var hasFrontendURL: Bool {
|
|
|
|
self == .piped
|
|
|
|
}
|
2021-10-20 22:21:50 +00:00
|
|
|
}
|