2021-10-21 03:51:50 +05:30
|
|
|
import Foundation
|
|
|
|
|
|
|
|
enum VideosApp: String, CaseIterable {
|
|
|
|
case invidious, piped
|
|
|
|
|
|
|
|
var name: String {
|
|
|
|
rawValue.capitalized
|
|
|
|
}
|
|
|
|
|
|
|
|
var supportsAccounts: Bool {
|
2021-11-15 04:36:01 +05:30
|
|
|
true
|
|
|
|
}
|
|
|
|
|
|
|
|
var accountsUsePassword: Bool {
|
|
|
|
self == .piped
|
2021-10-21 03:51:50 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
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-28 02:41:38 +05:30
|
|
|
|
|
|
|
var hasFrontendURL: Bool {
|
|
|
|
self == .piped
|
|
|
|
}
|
2021-12-05 01:05:41 +05:30
|
|
|
|
|
|
|
var supportsComments: Bool {
|
|
|
|
self == .piped
|
|
|
|
}
|
2022-01-05 04:48:01 +05:30
|
|
|
|
|
|
|
var searchUsesIndexedPages: Bool {
|
|
|
|
self == .invidious
|
|
|
|
}
|
2021-10-21 03:51:50 +05:30
|
|
|
}
|