2021-10-20 22:21:50 +00:00
|
|
|
import Foundation
|
|
|
|
|
|
|
|
enum VideosApp: String, CaseIterable {
|
|
|
|
case invidious, piped
|
2022-10-26 11:11:35 +00:00
|
|
|
case demoApp
|
2021-10-20 22:21:50 +00:00
|
|
|
|
|
|
|
var name: String {
|
|
|
|
rawValue.capitalized
|
|
|
|
}
|
|
|
|
|
|
|
|
var supportsAccounts: Bool {
|
2021-11-14 23:06:01 +00:00
|
|
|
true
|
|
|
|
}
|
|
|
|
|
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 {
|
2022-04-10 15:07:10 +00:00
|
|
|
true
|
|
|
|
}
|
|
|
|
|
|
|
|
var userPlaylistsEndpointIncludesVideos: Bool {
|
2021-10-20 22:21:50 +00:00
|
|
|
self == .invidious
|
|
|
|
}
|
2021-10-27 21:11:38 +00:00
|
|
|
|
2022-08-21 14:05:26 +00:00
|
|
|
var userPlaylistsUseChannelPlaylistEndpoint: Bool {
|
|
|
|
self == .piped
|
|
|
|
}
|
|
|
|
|
2022-05-21 22:29:51 +00:00
|
|
|
var userPlaylistsHaveVisibility: Bool {
|
|
|
|
self == .invidious
|
|
|
|
}
|
|
|
|
|
|
|
|
var userPlaylistsAreEditable: Bool {
|
|
|
|
self == .invidious
|
|
|
|
}
|
|
|
|
|
2021-10-27 21:11:38 +00:00
|
|
|
var hasFrontendURL: Bool {
|
|
|
|
self == .piped
|
|
|
|
}
|
2021-12-04 19:35:41 +00:00
|
|
|
|
2022-01-04 23:18:01 +00:00
|
|
|
var searchUsesIndexedPages: Bool {
|
|
|
|
self == .invidious
|
|
|
|
}
|
2022-06-24 22:48:57 +00:00
|
|
|
|
|
|
|
var supportsOpeningChannelsByName: Bool {
|
|
|
|
self == .piped
|
|
|
|
}
|
2022-07-21 21:52:09 +00:00
|
|
|
|
|
|
|
var allowsDisablingVidoesProxying: Bool {
|
|
|
|
self == .invidious
|
|
|
|
}
|
2022-11-10 17:11:28 +00:00
|
|
|
|
|
|
|
var supportsOpeningVideosByID: Bool {
|
|
|
|
self != .demoApp
|
|
|
|
}
|
2021-10-20 22:21:50 +00:00
|
|
|
}
|