mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 05:23:41 +00:00
Use Siesta framework
This commit is contained in:
parent
8d89d7cc08
commit
b840974f08
@ -1,24 +1,24 @@
|
||||
import Siesta
|
||||
import SwiftUI
|
||||
|
||||
struct ChannelView: View {
|
||||
@ObservedObject private var provider = ChannelVideosProvider()
|
||||
@EnvironmentObject private var state: AppState
|
||||
@ObservedObject private var store = Store<[Video]>()
|
||||
|
||||
var id: String
|
||||
|
||||
var resource: Resource {
|
||||
InvidiousAPI.shared.channelVideos(id)
|
||||
}
|
||||
|
||||
init(id: String) {
|
||||
self.id = id
|
||||
resource.addObserver(store)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
VideosListView(videos: videos)
|
||||
}
|
||||
|
||||
var listRowInsets: EdgeInsets {
|
||||
EdgeInsets(top: .zero, leading: .zero, bottom: .zero, trailing: 30)
|
||||
}
|
||||
|
||||
var videos: [Video] {
|
||||
if state.channelID != provider.channelID {
|
||||
provider.videos = []
|
||||
provider.channelID = state.channelID
|
||||
provider.load()
|
||||
}
|
||||
|
||||
return provider.videos
|
||||
VideosListView(videos: store.collection)
|
||||
.onAppear {
|
||||
resource.loadIfNeeded()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,16 @@
|
||||
import AVKit
|
||||
import Foundation
|
||||
import Siesta
|
||||
import SwiftUI
|
||||
|
||||
struct PlayerView: View {
|
||||
@ObservedObject private var provider: VideoDetailsProvider
|
||||
@ObservedObject private var store = Store<Video>()
|
||||
|
||||
let resource: Resource
|
||||
|
||||
init(id: String) {
|
||||
provider = VideoDetailsProvider(id)
|
||||
resource = InvidiousAPI.shared.video(id)
|
||||
resource.addObserver(store)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
@ -14,18 +18,16 @@ struct PlayerView: View {
|
||||
pvc?
|
||||
.edgesIgnoringSafeArea(.all)
|
||||
}
|
||||
.task {
|
||||
Task {
|
||||
provider.load()
|
||||
}
|
||||
.onAppear {
|
||||
resource.loadIfNeeded()
|
||||
}
|
||||
}
|
||||
|
||||
var pvc: PlayerViewController? {
|
||||
guard provider.video != nil else {
|
||||
guard store.item != nil else {
|
||||
return nil
|
||||
}
|
||||
|
||||
return PlayerViewController(video: provider.video!)
|
||||
return PlayerViewController(video: store.item!)
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,19 @@
|
||||
import Siesta
|
||||
import SwiftUI
|
||||
|
||||
struct PlaylistsView: View {
|
||||
@EnvironmentObject private var state: AppState
|
||||
|
||||
@ObservedObject private var provider = PlaylistsProvider()
|
||||
@ObservedObject private var store = Store<[Playlist]>()
|
||||
|
||||
@State private var selectedPlaylist: Playlist?
|
||||
|
||||
var resource: Resource {
|
||||
InvidiousAPI.shared.playlists
|
||||
}
|
||||
|
||||
init() {
|
||||
resource.addObserver(store)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
Section {
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
@ -19,39 +26,34 @@ struct PlaylistsView: View {
|
||||
}
|
||||
.padding(.bottom, 5)
|
||||
|
||||
Spacer()
|
||||
|
||||
VStack {
|
||||
if selectedPlaylist != nil {
|
||||
VideosView(videos: selectedPlaylist!.videos)
|
||||
if currentPlaylist != nil {
|
||||
VideosView(videos: currentPlaylist!.videos)
|
||||
}
|
||||
}
|
||||
}
|
||||
}.task {
|
||||
Task {
|
||||
provider.load { playlists in
|
||||
selectedPlaylist = playlists.first
|
||||
}
|
||||
}
|
||||
}
|
||||
.onAppear {
|
||||
resource.loadIfNeeded()
|
||||
}
|
||||
}
|
||||
|
||||
var playlists: [Playlist] {
|
||||
if provider.playlists.isEmpty {
|
||||
provider.load()
|
||||
}
|
||||
|
||||
return provider.playlists
|
||||
var currentPlaylist: Playlist? {
|
||||
selectedPlaylist ?? store.collection.first
|
||||
}
|
||||
|
||||
var selectPlaylistButton: some View {
|
||||
Button(selectedPlaylist?.title ?? "Select playlist") {
|
||||
guard selectedPlaylist != nil else {
|
||||
Button(currentPlaylist?.title ?? "Select playlist") {
|
||||
guard currentPlaylist != nil else {
|
||||
return
|
||||
}
|
||||
|
||||
selectedPlaylist = playlists.next(after: selectedPlaylist!)
|
||||
selectedPlaylist = store.collection.next(after: currentPlaylist!)
|
||||
}
|
||||
.contextMenu {
|
||||
ForEach(provider.playlists) { playlist in
|
||||
ForEach(store.collection) { playlist in
|
||||
Button(playlist.title) {
|
||||
selectedPlaylist = playlist
|
||||
}
|
||||
@ -59,17 +61,3 @@ struct PlaylistsView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Array where Element: Equatable {
|
||||
func next(after element: Element) -> Element? {
|
||||
let idx = firstIndex(of: element)
|
||||
|
||||
if idx == nil {
|
||||
return first
|
||||
}
|
||||
|
||||
let next = index(after: idx!)
|
||||
|
||||
return self[next == endIndex ? startIndex : next]
|
||||
}
|
||||
}
|
||||
|
@ -1,17 +1,19 @@
|
||||
import Siesta
|
||||
import SwiftUI
|
||||
|
||||
struct PopularVideosView: View {
|
||||
@ObservedObject private var provider = PopularVideosProvider()
|
||||
@ObservedObject private var store = Store<[Video]>()
|
||||
|
||||
var resource = InvidiousAPI.shared.popular
|
||||
|
||||
init() {
|
||||
resource.addObserver(store)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
VideosView(videos: videos)
|
||||
}
|
||||
|
||||
var videos: [Video] {
|
||||
if provider.videos.isEmpty {
|
||||
provider.load()
|
||||
}
|
||||
|
||||
return provider.videos
|
||||
VideosView(videos: store.collection)
|
||||
.onAppear {
|
||||
resource.loadIfNeeded()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,22 +1,29 @@
|
||||
import Siesta
|
||||
import SwiftUI
|
||||
|
||||
struct SearchView: View {
|
||||
@ObservedObject private var provider = SearchedVideosProvider()
|
||||
@EnvironmentObject private var profile: Profile
|
||||
@EnvironmentObject private var state: AppState
|
||||
|
||||
@State private var query = ""
|
||||
|
||||
@ObservedObject private var store = Store<[Video]>()
|
||||
|
||||
var body: some View {
|
||||
VideosView(videos: videos)
|
||||
.environmentObject(state)
|
||||
.environmentObject(profile)
|
||||
VideosView(videos: store.collection)
|
||||
.searchable(text: $query)
|
||||
.onChange(of: query) { newQuery in
|
||||
queryChanged(query, newQuery)
|
||||
}
|
||||
}
|
||||
|
||||
var videos: [Video] {
|
||||
provider.load(query)
|
||||
func queryChanged(_ old: String, _ new: String) {
|
||||
let oldResource = resource(old)
|
||||
oldResource.removeObservers(ownedBy: store)
|
||||
|
||||
return provider.videos
|
||||
let resource = resource(new)
|
||||
resource.addObserver(store)
|
||||
resource.loadIfNeeded()
|
||||
}
|
||||
|
||||
func resource(_ query: String) -> Resource {
|
||||
InvidiousAPI.shared.search(query)
|
||||
}
|
||||
}
|
||||
|
@ -1,17 +1,18 @@
|
||||
import SwiftUI
|
||||
|
||||
struct SubscriptionsView: View {
|
||||
@ObservedObject private var provider = SubscriptionVideosProvider()
|
||||
@ObservedObject private var store = Store<[Video]>()
|
||||
|
||||
var resource = InvidiousAPI.shared.subscriptions
|
||||
|
||||
init() {
|
||||
resource.addObserver(store)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
VideosView(videos: videos)
|
||||
}
|
||||
|
||||
var videos: [Video] {
|
||||
if provider.videos.isEmpty {
|
||||
provider.load()
|
||||
}
|
||||
|
||||
return provider.videos
|
||||
VideosView(videos: store.collection)
|
||||
.onAppear {
|
||||
resource.loadIfNeeded()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,31 +1,27 @@
|
||||
import SwiftUI
|
||||
|
||||
struct TrendingCountrySelectionView: View {
|
||||
@Environment(\.presentationMode) private var presentationMode
|
||||
@ObservedObject private var provider = TrendingCountriesProvider()
|
||||
|
||||
@State private var query: String = ""
|
||||
|
||||
@ObservedObject private var store = Store<[Country]>()
|
||||
@Binding var selectedCountry: Country
|
||||
|
||||
@Environment(\.dismiss) private var dismiss
|
||||
|
||||
var body: some View {
|
||||
ScrollView(.vertical) {
|
||||
ForEach(countries) { country in
|
||||
ForEach(store.collection) { country in
|
||||
Button(country.name) {
|
||||
selectedCountry = country
|
||||
presentationMode.wrappedValue.dismiss()
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
.frame(width: 800)
|
||||
}
|
||||
.searchable(text: $query)
|
||||
.searchable(text: $query, prompt: Text("Country name or two letter code"))
|
||||
.onChange(of: query) { newQuery in
|
||||
store.replace(Country.search(newQuery))
|
||||
}
|
||||
.background(.thinMaterial)
|
||||
}
|
||||
|
||||
var countries: [Country] {
|
||||
provider.load(query)
|
||||
|
||||
return provider.countries
|
||||
}
|
||||
}
|
||||
|
@ -1,15 +1,23 @@
|
||||
import Siesta
|
||||
import SwiftUI
|
||||
|
||||
struct TrendingView: View {
|
||||
@EnvironmentObject private var state: AppState
|
||||
|
||||
@ObservedObject private var videosProvider = TrendingVideosProvider()
|
||||
|
||||
@SceneStorage("category") var category: TrendingCategory = .default
|
||||
@SceneStorage("country") var country: Country = .pl
|
||||
|
||||
@State private var category: TrendingCategory = .default
|
||||
@State private var country: Country = .pl
|
||||
@State private var selectingCountry = false
|
||||
|
||||
@ObservedObject private var store = Store<[Video]>()
|
||||
|
||||
var resource: Resource {
|
||||
InvidiousAPI.shared.trending(category: category, country: country)
|
||||
}
|
||||
|
||||
init() {
|
||||
resource.addObserver(store)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
Section {
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
@ -24,26 +32,20 @@ struct TrendingView: View {
|
||||
}
|
||||
.scaleEffect(0.85)
|
||||
|
||||
VideosView(videos: videos)
|
||||
VideosView(videos: store.collection)
|
||||
}
|
||||
}.onAppear {
|
||||
resource.loadIfNeeded()
|
||||
}
|
||||
}
|
||||
|
||||
var videos: [Video] {
|
||||
videosProvider.load(category: category, country: country)
|
||||
|
||||
return videosProvider.videos
|
||||
}
|
||||
|
||||
var categoryButton: some View {
|
||||
Button(category.name) {
|
||||
category = category.next()
|
||||
setCategory(category.next())
|
||||
}
|
||||
.contextMenu {
|
||||
ForEach(TrendingCategory.allCases) { category in
|
||||
Button(category.name) {
|
||||
self.category = category
|
||||
}
|
||||
Button(category.name) { setCategory(category) }
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -56,9 +58,23 @@ struct TrendingView: View {
|
||||
var countryButton: some View {
|
||||
Button(country.rawValue) {
|
||||
selectingCountry.toggle()
|
||||
resource.removeObservers(ownedBy: store)
|
||||
}
|
||||
.fullScreenCover(isPresented: $selectingCountry) {
|
||||
.fullScreenCover(isPresented: $selectingCountry, onDismiss: { setCountry(country) }) {
|
||||
TrendingCountrySelectionView(selectedCountry: $country)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate func setCategory(_ category: TrendingCategory) {
|
||||
resource.removeObservers(ownedBy: store)
|
||||
self.category = category
|
||||
resource.addObserver(store)
|
||||
resource.loadIfNeeded()
|
||||
}
|
||||
|
||||
fileprivate func setCountry(_ country: Country) {
|
||||
self.country = country
|
||||
resource.addObserver(store)
|
||||
resource.loadIfNeeded()
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import SwiftUI
|
||||
|
||||
struct VideoCellView: View {
|
||||
var video: Video
|
||||
|
||||
var body: some View {
|
||||
NavigationLink(destination: PlayerView(id: video.id)) {
|
||||
VStack(alignment: .leading) {
|
||||
|
13
Extensions/Array+Next.swift
Normal file
13
Extensions/Array+Next.swift
Normal file
@ -0,0 +1,13 @@
|
||||
extension Array where Element: Equatable {
|
||||
func next(after element: Element) -> Element? {
|
||||
let idx = firstIndex(of: element)
|
||||
|
||||
if idx == nil {
|
||||
return first
|
||||
}
|
||||
|
||||
let next = index(after: idx!)
|
||||
|
||||
return self[next == endIndex ? startIndex : next]
|
||||
}
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
import Foundation
|
||||
import SwiftyJSON
|
||||
|
||||
final class ChannelVideosProvider: DataProvider {
|
||||
@Published var videos = [Video]()
|
||||
|
||||
var channelID: String? = ""
|
||||
|
||||
func load() {
|
||||
guard channelID != nil else {
|
||||
return
|
||||
}
|
||||
|
||||
let searchPath = "channels/\(channelID!)"
|
||||
DataProvider.request(searchPath).responseJSON { response in
|
||||
switch response.result {
|
||||
case let .success(value):
|
||||
if let channelVideos = JSON(value).dictionaryValue["latestVideos"] {
|
||||
self.videos = channelVideos.arrayValue.map { Video($0) }
|
||||
}
|
||||
case let .failure(error):
|
||||
print(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
import Alamofire
|
||||
import Foundation
|
||||
|
||||
// swiftlint:disable:next final_class
|
||||
class DataProvider: ObservableObject {
|
||||
static let instance = "https://invidious.home.arekf.net"
|
||||
|
||||
static func proxyURLForAsset(_ url: String) -> URL? {
|
||||
guard let instanceURLComponents = URLComponents(string: DataProvider.instance),
|
||||
var urlComponents = URLComponents(string: url) else { return nil }
|
||||
|
||||
urlComponents.scheme = instanceURLComponents.scheme
|
||||
urlComponents.host = instanceURLComponents.host
|
||||
|
||||
return urlComponents.url
|
||||
}
|
||||
|
||||
static func request(_ path: String, headers: HTTPHeaders? = nil) -> DataRequest {
|
||||
AF.request(apiURLString(path), headers: headers)
|
||||
}
|
||||
|
||||
static func apiURLString(_ path: String) -> String {
|
||||
"\(instance)/api/v1/\(path)"
|
||||
}
|
||||
}
|
132
Model/InvidiousAPI.swift
Normal file
132
Model/InvidiousAPI.swift
Normal file
@ -0,0 +1,132 @@
|
||||
import Foundation
|
||||
import Siesta
|
||||
import SwiftyJSON
|
||||
|
||||
extension TypedContentAccessors {
|
||||
var json: JSON { typedContent(ifNone: JSON.null) }
|
||||
}
|
||||
|
||||
let SwiftyJSONTransformer =
|
||||
ResponseContentTransformer(transformErrors: true) { JSON($0.content as AnyObject) }
|
||||
|
||||
final class InvidiousAPI: Service {
|
||||
static let shared = InvidiousAPI()
|
||||
|
||||
static let instance = "https://invidious.home.arekf.net"
|
||||
|
||||
static func proxyURLForAsset(_ url: String) -> URL? {
|
||||
guard let instanceURLComponents = URLComponents(string: InvidiousAPI.instance),
|
||||
var urlComponents = URLComponents(string: url) else { return nil }
|
||||
|
||||
urlComponents.scheme = instanceURLComponents.scheme
|
||||
urlComponents.host = instanceURLComponents.host
|
||||
|
||||
return urlComponents.url
|
||||
}
|
||||
|
||||
init() {
|
||||
SiestaLog.Category.enabled = .all
|
||||
|
||||
super.init(baseURL: "\(InvidiousAPI.instance)/api/v1")
|
||||
|
||||
configure {
|
||||
$0.pipeline[.parsing].add(SwiftyJSONTransformer, contentTypes: ["*/json"])
|
||||
}
|
||||
|
||||
configure("/auth/**") {
|
||||
$0.headers["Cookie"] = self.authHeader
|
||||
}
|
||||
|
||||
configure("**", requestMethods: [.post]) {
|
||||
$0.pipeline[.parsing].removeTransformers()
|
||||
}
|
||||
|
||||
configureTransformer("/popular", requestMethods: [.get]) { (content: Entity<JSON>) -> [Video] in
|
||||
content.json.arrayValue.map(Video.init)
|
||||
}
|
||||
|
||||
configureTransformer("/trending", requestMethods: [.get]) { (content: Entity<JSON>) -> [Video] in
|
||||
content.json.arrayValue.map(Video.init)
|
||||
}
|
||||
|
||||
configureTransformer("/search", requestMethods: [.get]) { (content: Entity<JSON>) -> [Video] in
|
||||
content.json.arrayValue.map(Video.init)
|
||||
}
|
||||
|
||||
configureTransformer("/auth/playlists", requestMethods: [.get]) { (content: Entity<JSON>) -> [Playlist] in
|
||||
content.json.arrayValue.map(Playlist.init)
|
||||
}
|
||||
|
||||
configureTransformer("/auth/feed", requestMethods: [.get]) { (content: Entity<JSON>) -> [Video] in
|
||||
if let feedVideos = content.json.dictionaryValue["videos"] {
|
||||
return feedVideos.arrayValue.map { Video($0) }
|
||||
}
|
||||
|
||||
return []
|
||||
}
|
||||
|
||||
configureTransformer("/channels/*", requestMethods: [.get]) { (content: Entity<JSON>) -> [Video] in
|
||||
if let channelVideos = content.json.dictionaryValue["latestVideos"] {
|
||||
return channelVideos.arrayValue.map { Video($0) }
|
||||
}
|
||||
|
||||
return []
|
||||
}
|
||||
|
||||
configureTransformer("/videos/*", requestMethods: [.get]) { (content: Entity<JSON>) -> Video in
|
||||
Video(content.json)
|
||||
}
|
||||
}
|
||||
|
||||
var authHeader: String? = "SID=\(Profile().sid)"
|
||||
|
||||
var popular: Resource {
|
||||
resource("/popular")
|
||||
}
|
||||
|
||||
func trending(category: TrendingCategory, country: Country) -> Resource {
|
||||
resource("/trending")
|
||||
.withParam("type", category.name)
|
||||
.withParam("region", country.rawValue)
|
||||
}
|
||||
|
||||
var subscriptions: Resource {
|
||||
resource("/auth/feed")
|
||||
}
|
||||
|
||||
func channelVideos(_ id: String) -> Resource {
|
||||
resource("/channels/\(id)")
|
||||
}
|
||||
|
||||
func video(_ id: String) -> Resource {
|
||||
resource("/videos/\(id)")
|
||||
}
|
||||
|
||||
var playlists: Resource {
|
||||
resource("/auth/playlists")
|
||||
}
|
||||
|
||||
func search(_ query: String) -> Resource {
|
||||
resource("/search")
|
||||
.withParam("q", searchQuery(query))
|
||||
}
|
||||
|
||||
private func searchQuery(_ query: String) -> String {
|
||||
var searchQuery = query
|
||||
|
||||
let url = URLComponents(string: query)
|
||||
|
||||
if url != nil,
|
||||
url!.host == "youtu.be"
|
||||
{
|
||||
searchQuery = url!.path.replacingOccurrences(of: "/", with: "")
|
||||
}
|
||||
|
||||
let queryItem = url?.queryItems?.first { item in item.name == "v" }
|
||||
if let id = queryItem?.value {
|
||||
searchQuery = id
|
||||
}
|
||||
|
||||
return searchQuery.addingPercentEncoding(withAllowedCharacters: .alphanumerics)!
|
||||
}
|
||||
}
|
@ -51,13 +51,13 @@ final class PlayerState: ObservableObject {
|
||||
return playerItem
|
||||
}
|
||||
|
||||
var segmentsProvider: SponsorBlockSegmentsProvider
|
||||
var segmentsProvider: SponsorBlockAPI
|
||||
var timeObserver: Any?
|
||||
|
||||
init(_ video: Video) {
|
||||
self.video = video
|
||||
segmentsProvider = SponsorBlockSegmentsProvider(video.id)
|
||||
|
||||
segmentsProvider = SponsorBlockAPI(video.id)
|
||||
segmentsProvider.load()
|
||||
}
|
||||
|
||||
|
@ -1,18 +0,0 @@
|
||||
import Alamofire
|
||||
import Foundation
|
||||
import SwiftyJSON
|
||||
|
||||
final class PopularVideosProvider: DataProvider {
|
||||
@Published var videos = [Video]()
|
||||
|
||||
func load() {
|
||||
DataProvider.request("popular").responseJSON { response in
|
||||
switch response.result {
|
||||
case let .success(value):
|
||||
self.videos = JSON(value).arrayValue.map { Video($0) }
|
||||
case let .failure(error):
|
||||
print(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
import Foundation
|
||||
import SwiftyJSON
|
||||
|
||||
final class SearchedVideosProvider: DataProvider {
|
||||
@Published var videos = [Video]()
|
||||
|
||||
var currentQuery: String = ""
|
||||
|
||||
func load(_ query: String) {
|
||||
var newQuery = query
|
||||
|
||||
if let url = URLComponents(string: query),
|
||||
let queryItem = url.queryItems?.first(where: { item in item.name == "v" }),
|
||||
let id = queryItem.value
|
||||
{
|
||||
newQuery = id
|
||||
}
|
||||
|
||||
if newQuery == currentQuery {
|
||||
return
|
||||
}
|
||||
|
||||
currentQuery = newQuery
|
||||
|
||||
let searchPath = "search?q=\(currentQuery.addingPercentEncoding(withAllowedCharacters: .alphanumerics)!)"
|
||||
DataProvider.request(searchPath).responseJSON { response in
|
||||
switch response.result {
|
||||
case let .success(value):
|
||||
self.videos = JSON(value).arrayValue.map { Video($0) }
|
||||
case let .failure(error):
|
||||
print(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -2,7 +2,7 @@ import Alamofire
|
||||
import Foundation
|
||||
import SwiftyJSON
|
||||
|
||||
final class SponsorBlockSegmentsProvider: ObservableObject {
|
||||
final class SponsorBlockAPI: ObservableObject {
|
||||
static let categories = ["sponsor", "selfpromo", "outro", "intro", "music_offtopic", "interaction"]
|
||||
|
||||
@Published var video: Video?
|
||||
@ -29,7 +29,7 @@ final class SponsorBlockSegmentsProvider: ObservableObject {
|
||||
private var parameters: [String: String] {
|
||||
[
|
||||
"videoID": id,
|
||||
"categories": JSON(SponsorBlockSegmentsProvider.categories).rawString(String.Encoding.utf8)!
|
||||
"categories": JSON(SponsorBlockAPI.categories).rawString(String.Encoding.utf8)!
|
||||
]
|
||||
}
|
||||
}
|
19
Model/Store.swift
Normal file
19
Model/Store.swift
Normal file
@ -0,0 +1,19 @@
|
||||
import Foundation
|
||||
import Siesta
|
||||
|
||||
final class Store<Data>: ResourceObserver, ObservableObject {
|
||||
@Published private var all: Data?
|
||||
|
||||
var collection: Data { all ?? ([] as! Data) }
|
||||
var item: Data? { all }
|
||||
|
||||
func resourceChanged(_ resource: Resource, event _: ResourceEvent) {
|
||||
if let items: Data = resource.typedContent() {
|
||||
replace(items)
|
||||
}
|
||||
}
|
||||
|
||||
func replace(_ items: Data) {
|
||||
all = items
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
import Alamofire
|
||||
import Foundation
|
||||
import SwiftyJSON
|
||||
|
||||
final class SubscriptionVideosProvider: DataProvider {
|
||||
@Published var videos = [Video]()
|
||||
|
||||
let profile = Profile()
|
||||
|
||||
func load() {
|
||||
let headers = HTTPHeaders([HTTPHeader(name: "Cookie", value: "SID=\(profile.sid)")])
|
||||
DataProvider.request("auth/feed", headers: headers).responseJSON { response in
|
||||
switch response.result {
|
||||
case let .success(value):
|
||||
if let feedVideos = JSON(value).dictionaryValue["videos"] {
|
||||
self.videos = feedVideos.arrayValue.map { Video($0) }
|
||||
}
|
||||
case let .failure(error):
|
||||
print(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
import Alamofire
|
||||
import Foundation
|
||||
import SwiftyJSON
|
||||
|
||||
final class TrendingCountriesProvider: DataProvider {
|
||||
@Published var countries = [Country]()
|
||||
|
||||
private var query: String = ""
|
||||
|
||||
func load(_ query: String) {
|
||||
guard query != self.query else {
|
||||
return
|
||||
}
|
||||
|
||||
self.query = query
|
||||
countries = Country.search(query)
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
import Alamofire
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
import SwiftyJSON
|
||||
|
||||
final class TrendingVideosProvider: DataProvider {
|
||||
@Published var videos = [Video]()
|
||||
|
||||
var currentCategory: TrendingCategory?
|
||||
var currentCountry: Country?
|
||||
|
||||
func load(category: TrendingCategory, country: Country) {
|
||||
if category == currentCategory, country == currentCountry {
|
||||
return
|
||||
}
|
||||
|
||||
DataProvider.request("trending?type=\(category.name)®ion=\(country.rawValue)").responseJSON { response in
|
||||
switch response.result {
|
||||
case let .success(value):
|
||||
self.videos = JSON(value).arrayValue.map { Video($0) }
|
||||
case let .failure(error):
|
||||
print(error)
|
||||
}
|
||||
}
|
||||
|
||||
currentCategory = category
|
||||
currentCountry = country
|
||||
|
||||
videos = []
|
||||
}
|
||||
}
|
@ -108,7 +108,7 @@ final class Video: Identifiable, ObservableObject {
|
||||
private func extractFormatStreams(from streams: [JSON]) -> [Stream] {
|
||||
streams.map {
|
||||
AudioVideoStream(
|
||||
avAsset: AVURLAsset(url: DataProvider.proxyURLForAsset($0["url"].stringValue)!),
|
||||
avAsset: AVURLAsset(url: InvidiousAPI.proxyURLForAsset($0["url"].stringValue)!),
|
||||
resolution: StreamResolution.from(resolution: $0["resolution"].stringValue)!,
|
||||
type: .stream,
|
||||
encoding: $0["encoding"].stringValue
|
||||
@ -126,8 +126,8 @@ final class Video: Identifiable, ObservableObject {
|
||||
|
||||
return videoAssetsURLs.map {
|
||||
Stream(
|
||||
audioAsset: AVURLAsset(url: DataProvider.proxyURLForAsset(audioAssetURL!["url"].stringValue)!),
|
||||
videoAsset: AVURLAsset(url: DataProvider.proxyURLForAsset($0["url"].stringValue)!),
|
||||
audioAsset: AVURLAsset(url: InvidiousAPI.proxyURLForAsset(audioAssetURL!["url"].stringValue)!),
|
||||
videoAsset: AVURLAsset(url: InvidiousAPI.proxyURLForAsset($0["url"].stringValue)!),
|
||||
resolution: StreamResolution.from(resolution: $0["resolution"].stringValue)!,
|
||||
type: .adaptive,
|
||||
encoding: $0["encoding"].stringValue
|
||||
|
@ -1,25 +0,0 @@
|
||||
import Alamofire
|
||||
import Foundation
|
||||
import SwiftyJSON
|
||||
|
||||
final class VideoDetailsProvider: DataProvider {
|
||||
@Published var video: Video?
|
||||
|
||||
var id: String
|
||||
|
||||
init(_ id: String) {
|
||||
self.id = id
|
||||
super.init()
|
||||
}
|
||||
|
||||
func load() {
|
||||
DataProvider.request("videos/\(id)").responseJSON { response in
|
||||
switch response.result {
|
||||
case let .success(value):
|
||||
self.video = Video(JSON(value))
|
||||
case let .failure(error):
|
||||
print(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -23,12 +23,6 @@
|
||||
37141673267A8E10006CA35D /* Country.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37141672267A8E10006CA35D /* Country.swift */; };
|
||||
37141674267A8E10006CA35D /* Country.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37141672267A8E10006CA35D /* Country.swift */; };
|
||||
37141675267A8E10006CA35D /* Country.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37141672267A8E10006CA35D /* Country.swift */; };
|
||||
3714167B267AA1CF006CA35D /* TrendingCountriesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3714167A267AA1CF006CA35D /* TrendingCountriesProvider.swift */; };
|
||||
3714167C267AA1CF006CA35D /* TrendingCountriesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3714167A267AA1CF006CA35D /* TrendingCountriesProvider.swift */; };
|
||||
3714167D267AA1CF006CA35D /* TrendingCountriesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3714167A267AA1CF006CA35D /* TrendingCountriesProvider.swift */; };
|
||||
3714167F267AB55D006CA35D /* TrendingVideosProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3714167E267AB55D006CA35D /* TrendingVideosProvider.swift */; };
|
||||
37141680267AB55D006CA35D /* TrendingVideosProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3714167E267AB55D006CA35D /* TrendingVideosProvider.swift */; };
|
||||
37141681267AB55D006CA35D /* TrendingVideosProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3714167E267AB55D006CA35D /* TrendingVideosProvider.swift */; };
|
||||
372915E42687E33E00F5A35B /* Defaults in Frameworks */ = {isa = PBXBuildFile; productRef = 372915E32687E33E00F5A35B /* Defaults */; };
|
||||
372915E62687E3B900F5A35B /* Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 372915E52687E3B900F5A35B /* Defaults.swift */; };
|
||||
372915E72687E3B900F5A35B /* Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 372915E52687E3B900F5A35B /* Defaults.swift */; };
|
||||
@ -43,9 +37,6 @@
|
||||
376578892685471400D4EA09 /* Playlist.swift in Sources */ = {isa = PBXBuildFile; fileRef = 376578882685471400D4EA09 /* Playlist.swift */; };
|
||||
3765788A2685471400D4EA09 /* Playlist.swift in Sources */ = {isa = PBXBuildFile; fileRef = 376578882685471400D4EA09 /* Playlist.swift */; };
|
||||
3765788B2685471400D4EA09 /* Playlist.swift in Sources */ = {isa = PBXBuildFile; fileRef = 376578882685471400D4EA09 /* Playlist.swift */; };
|
||||
3765788D2685487700D4EA09 /* PlaylistsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3765788C2685487700D4EA09 /* PlaylistsProvider.swift */; };
|
||||
3765788E2685487700D4EA09 /* PlaylistsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3765788C2685487700D4EA09 /* PlaylistsProvider.swift */; };
|
||||
3765788F2685487700D4EA09 /* PlaylistsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3765788C2685487700D4EA09 /* PlaylistsProvider.swift */; };
|
||||
376578912685490700D4EA09 /* PlaylistsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 376578902685490700D4EA09 /* PlaylistsView.swift */; };
|
||||
376578922685490700D4EA09 /* PlaylistsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 376578902685490700D4EA09 /* PlaylistsView.swift */; };
|
||||
376578932685490700D4EA09 /* PlaylistsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 376578902685490700D4EA09 /* PlaylistsView.swift */; };
|
||||
@ -73,15 +64,19 @@
|
||||
377FC7EF267A0A0800A6BBAF /* URLImage in Frameworks */ = {isa = PBXBuildFile; productRef = 377FC7EE267A0A0800A6BBAF /* URLImage */; };
|
||||
377FC7F1267A0A0800A6BBAF /* URLImageStore in Frameworks */ = {isa = PBXBuildFile; productRef = 377FC7F0267A0A0800A6BBAF /* URLImageStore */; };
|
||||
377FC7F3267A0A0800A6BBAF /* Logging in Frameworks */ = {isa = PBXBuildFile; productRef = 377FC7F2267A0A0800A6BBAF /* Logging */; };
|
||||
3797757D268922D100DD52A8 /* Siesta in Frameworks */ = {isa = PBXBuildFile; productRef = 3797757C268922D100DD52A8 /* Siesta */; };
|
||||
37977583268922F600DD52A8 /* InvidiousAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37977582268922F600DD52A8 /* InvidiousAPI.swift */; };
|
||||
37977584268922F600DD52A8 /* InvidiousAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37977582268922F600DD52A8 /* InvidiousAPI.swift */; };
|
||||
37977585268922F600DD52A8 /* InvidiousAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37977582268922F600DD52A8 /* InvidiousAPI.swift */; };
|
||||
3797758B2689345500DD52A8 /* Store.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3797758A2689345500DD52A8 /* Store.swift */; };
|
||||
3797758C2689345500DD52A8 /* Store.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3797758A2689345500DD52A8 /* Store.swift */; };
|
||||
3797758D2689345500DD52A8 /* Store.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3797758A2689345500DD52A8 /* Store.swift */; };
|
||||
379775932689365600DD52A8 /* Array+Next.swift in Sources */ = {isa = PBXBuildFile; fileRef = 379775922689365600DD52A8 /* Array+Next.swift */; };
|
||||
379775942689365600DD52A8 /* Array+Next.swift in Sources */ = {isa = PBXBuildFile; fileRef = 379775922689365600DD52A8 /* Array+Next.swift */; };
|
||||
379775952689365600DD52A8 /* Array+Next.swift in Sources */ = {isa = PBXBuildFile; fileRef = 379775922689365600DD52A8 /* Array+Next.swift */; };
|
||||
37AAF27E26737323007FC770 /* PopularVideosView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF27D26737323007FC770 /* PopularVideosView.swift */; };
|
||||
37AAF28026737550007FC770 /* SearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF27F26737550007FC770 /* SearchView.swift */; };
|
||||
37AAF2822673791F007FC770 /* SearchedVideosProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF2812673791F007FC770 /* SearchedVideosProvider.swift */; };
|
||||
37AAF2832673791F007FC770 /* SearchedVideosProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF2812673791F007FC770 /* SearchedVideosProvider.swift */; };
|
||||
37AAF2842673791F007FC770 /* SearchedVideosProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF2812673791F007FC770 /* SearchedVideosProvider.swift */; };
|
||||
37AAF28A2673AB89007FC770 /* ChannelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF2892673AB89007FC770 /* ChannelView.swift */; };
|
||||
37AAF28C2673ABD3007FC770 /* ChannelVideosProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF28B2673ABD3007FC770 /* ChannelVideosProvider.swift */; };
|
||||
37AAF28D2673ABD3007FC770 /* ChannelVideosProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF28B2673ABD3007FC770 /* ChannelVideosProvider.swift */; };
|
||||
37AAF28E2673ABD3007FC770 /* ChannelVideosProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF28B2673ABD3007FC770 /* ChannelVideosProvider.swift */; };
|
||||
37AAF29026740715007FC770 /* AppState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF28F26740715007FC770 /* AppState.swift */; };
|
||||
37AAF29126740715007FC770 /* AppState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF28F26740715007FC770 /* AppState.swift */; };
|
||||
37AAF29226740715007FC770 /* AppState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF28F26740715007FC770 /* AppState.swift */; };
|
||||
@ -89,9 +84,6 @@
|
||||
37AAF2952674086B007FC770 /* TabSelection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF2932674086B007FC770 /* TabSelection.swift */; };
|
||||
37AAF2962674086B007FC770 /* TabSelection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF2932674086B007FC770 /* TabSelection.swift */; };
|
||||
37AAF29A26740A01007FC770 /* VideosListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF29926740A01007FC770 /* VideosListView.swift */; };
|
||||
37AAF29C26741B5F007FC770 /* SubscriptionVideosProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF29B26741B5F007FC770 /* SubscriptionVideosProvider.swift */; };
|
||||
37AAF29D26741B5F007FC770 /* SubscriptionVideosProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF29B26741B5F007FC770 /* SubscriptionVideosProvider.swift */; };
|
||||
37AAF29E26741B5F007FC770 /* SubscriptionVideosProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF29B26741B5F007FC770 /* SubscriptionVideosProvider.swift */; };
|
||||
37AAF2A026741C97007FC770 /* SubscriptionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF29F26741C97007FC770 /* SubscriptionsView.swift */; };
|
||||
37AAF2A126741C97007FC770 /* SubscriptionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF29F26741C97007FC770 /* SubscriptionsView.swift */; };
|
||||
37AAF2A226741C97007FC770 /* SubscriptionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AAF29F26741C97007FC770 /* SubscriptionsView.swift */; };
|
||||
@ -137,24 +129,15 @@
|
||||
37D4B1862671691600C925CA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 37D4B0C42671614800C925CA /* Assets.xcassets */; };
|
||||
37D4B18E26717B3800C925CA /* VideoListRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D4B18B26717B3800C925CA /* VideoListRow.swift */; };
|
||||
37D4B19126717C6900C925CA /* Alamofire in Frameworks */ = {isa = PBXBuildFile; productRef = 37D4B19026717C6900C925CA /* Alamofire */; };
|
||||
37D4B19326717CE100C925CA /* PopularVideosProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D4B19226717CE100C925CA /* PopularVideosProvider.swift */; };
|
||||
37D4B19426717CE100C925CA /* PopularVideosProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D4B19226717CE100C925CA /* PopularVideosProvider.swift */; };
|
||||
37D4B19526717CE100C925CA /* PopularVideosProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D4B19226717CE100C925CA /* PopularVideosProvider.swift */; };
|
||||
37D4B19726717E1500C925CA /* Video.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D4B19626717E1500C925CA /* Video.swift */; };
|
||||
37D4B19826717E1500C925CA /* Video.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D4B19626717E1500C925CA /* Video.swift */; };
|
||||
37D4B19926717E1500C925CA /* Video.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D4B19626717E1500C925CA /* Video.swift */; };
|
||||
37D4B19D2671817900C925CA /* SwiftyJSON in Frameworks */ = {isa = PBXBuildFile; productRef = 37D4B19C2671817900C925CA /* SwiftyJSON */; };
|
||||
37D4B1AB2672580400C925CA /* URLImage in Frameworks */ = {isa = PBXBuildFile; productRef = 37D4B1AA2672580400C925CA /* URLImage */; };
|
||||
37D4B1AD2672580400C925CA /* URLImageStore in Frameworks */ = {isa = PBXBuildFile; productRef = 37D4B1AC2672580400C925CA /* URLImageStore */; };
|
||||
37D4B1B02672A01000C925CA /* DataProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D4B1AF2672A01000C925CA /* DataProvider.swift */; };
|
||||
37D4B1B12672A01000C925CA /* DataProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D4B1AF2672A01000C925CA /* DataProvider.swift */; };
|
||||
37D4B1B22672A01000C925CA /* DataProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D4B1AF2672A01000C925CA /* DataProvider.swift */; };
|
||||
37D4B1B42672A30700C925CA /* VideoDetailsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D4B1B32672A30700C925CA /* VideoDetailsProvider.swift */; };
|
||||
37D4B1B52672A30700C925CA /* VideoDetailsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D4B1B32672A30700C925CA /* VideoDetailsProvider.swift */; };
|
||||
37D4B1B62672A30700C925CA /* VideoDetailsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D4B1B32672A30700C925CA /* VideoDetailsProvider.swift */; };
|
||||
37EAD86B267B9C5600D9E01B /* SponsorBlockSegmentsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37EAD86A267B9C5600D9E01B /* SponsorBlockSegmentsProvider.swift */; };
|
||||
37EAD86C267B9C5600D9E01B /* SponsorBlockSegmentsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37EAD86A267B9C5600D9E01B /* SponsorBlockSegmentsProvider.swift */; };
|
||||
37EAD86D267B9C5600D9E01B /* SponsorBlockSegmentsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37EAD86A267B9C5600D9E01B /* SponsorBlockSegmentsProvider.swift */; };
|
||||
37EAD86B267B9C5600D9E01B /* SponsorBlockAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37EAD86A267B9C5600D9E01B /* SponsorBlockAPI.swift */; };
|
||||
37EAD86C267B9C5600D9E01B /* SponsorBlockAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37EAD86A267B9C5600D9E01B /* SponsorBlockAPI.swift */; };
|
||||
37EAD86D267B9C5600D9E01B /* SponsorBlockAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37EAD86A267B9C5600D9E01B /* SponsorBlockAPI.swift */; };
|
||||
37EAD86F267B9ED100D9E01B /* Segment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37EAD86E267B9ED100D9E01B /* Segment.swift */; };
|
||||
37EAD870267B9ED100D9E01B /* Segment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37EAD86E267B9ED100D9E01B /* Segment.swift */; };
|
||||
37EAD871267B9ED100D9E01B /* Segment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37EAD86E267B9ED100D9E01B /* Segment.swift */; };
|
||||
@ -197,24 +180,21 @@
|
||||
37141667267A83F9006CA35D /* StreamAVPlayerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StreamAVPlayerViewController.swift; sourceTree = "<group>"; };
|
||||
3714166E267A8ACC006CA35D /* TrendingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrendingView.swift; sourceTree = "<group>"; };
|
||||
37141672267A8E10006CA35D /* Country.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Country.swift; sourceTree = "<group>"; };
|
||||
3714167A267AA1CF006CA35D /* TrendingCountriesProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrendingCountriesProvider.swift; sourceTree = "<group>"; };
|
||||
3714167E267AB55D006CA35D /* TrendingVideosProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrendingVideosProvider.swift; sourceTree = "<group>"; };
|
||||
372915E52687E3B900F5A35B /* Defaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Defaults.swift; sourceTree = "<group>"; };
|
||||
372915E92687EBA500F5A35B /* ListingLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListingLayout.swift; sourceTree = "<group>"; };
|
||||
3741B52F2676213400125C5E /* PlayerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerViewController.swift; sourceTree = "<group>"; };
|
||||
376578842685429C00D4EA09 /* CaseIterable+Next.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CaseIterable+Next.swift"; sourceTree = "<group>"; };
|
||||
376578882685471400D4EA09 /* Playlist.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Playlist.swift; sourceTree = "<group>"; };
|
||||
3765788C2685487700D4EA09 /* PlaylistsProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlaylistsProvider.swift; sourceTree = "<group>"; };
|
||||
376578902685490700D4EA09 /* PlaylistsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlaylistsView.swift; sourceTree = "<group>"; };
|
||||
37977582268922F600DD52A8 /* InvidiousAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvidiousAPI.swift; sourceTree = "<group>"; };
|
||||
3797758A2689345500DD52A8 /* Store.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Store.swift; sourceTree = "<group>"; };
|
||||
379775922689365600DD52A8 /* Array+Next.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Array+Next.swift"; sourceTree = "<group>"; };
|
||||
37AAF27D26737323007FC770 /* PopularVideosView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PopularVideosView.swift; sourceTree = "<group>"; };
|
||||
37AAF27F26737550007FC770 /* SearchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchView.swift; sourceTree = "<group>"; };
|
||||
37AAF2812673791F007FC770 /* SearchedVideosProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchedVideosProvider.swift; sourceTree = "<group>"; };
|
||||
37AAF2892673AB89007FC770 /* ChannelView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChannelView.swift; sourceTree = "<group>"; };
|
||||
37AAF28B2673ABD3007FC770 /* ChannelVideosProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChannelVideosProvider.swift; sourceTree = "<group>"; };
|
||||
37AAF28F26740715007FC770 /* AppState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppState.swift; sourceTree = "<group>"; };
|
||||
37AAF2932674086B007FC770 /* TabSelection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabSelection.swift; sourceTree = "<group>"; };
|
||||
37AAF29926740A01007FC770 /* VideosListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideosListView.swift; sourceTree = "<group>"; };
|
||||
37AAF29B26741B5F007FC770 /* SubscriptionVideosProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionVideosProvider.swift; sourceTree = "<group>"; };
|
||||
37AAF29F26741C97007FC770 /* SubscriptionsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionsView.swift; sourceTree = "<group>"; };
|
||||
37B767DA2677C3CA0098BAA8 /* PlayerState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerState.swift; sourceTree = "<group>"; };
|
||||
37B76E95268747C900CE5671 /* ViewOptionsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewOptionsView.swift; sourceTree = "<group>"; };
|
||||
@ -239,12 +219,9 @@
|
||||
37D4B175267164B000C925CA /* PearvidiousUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PearvidiousUITests.swift; sourceTree = "<group>"; };
|
||||
37D4B1822671681B00C925CA /* PlayerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerView.swift; sourceTree = "<group>"; };
|
||||
37D4B18B26717B3800C925CA /* VideoListRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoListRow.swift; sourceTree = "<group>"; };
|
||||
37D4B19226717CE100C925CA /* PopularVideosProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PopularVideosProvider.swift; sourceTree = "<group>"; };
|
||||
37D4B19626717E1500C925CA /* Video.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Video.swift; sourceTree = "<group>"; };
|
||||
37D4B1AE26729DEB00C925CA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
37D4B1AF2672A01000C925CA /* DataProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataProvider.swift; sourceTree = "<group>"; };
|
||||
37D4B1B32672A30700C925CA /* VideoDetailsProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoDetailsProvider.swift; sourceTree = "<group>"; };
|
||||
37EAD86A267B9C5600D9E01B /* SponsorBlockSegmentsProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SponsorBlockSegmentsProvider.swift; sourceTree = "<group>"; };
|
||||
37EAD86A267B9C5600D9E01B /* SponsorBlockAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SponsorBlockAPI.swift; sourceTree = "<group>"; };
|
||||
37EAD86E267B9ED100D9E01B /* Segment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Segment.swift; sourceTree = "<group>"; };
|
||||
37F4AE7126828F0900BD60EA /* VideosCellsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideosCellsView.swift; sourceTree = "<group>"; };
|
||||
37F4AE752682908700BD60EA /* VideoCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoCellView.swift; sourceTree = "<group>"; };
|
||||
@ -296,6 +273,7 @@
|
||||
372915E42687E33E00F5A35B /* Defaults in Frameworks */,
|
||||
37D4B1AD2672580400C925CA /* URLImageStore in Frameworks */,
|
||||
37D4B19D2671817900C925CA /* SwiftyJSON in Frameworks */,
|
||||
3797757D268922D100DD52A8 /* Siesta in Frameworks */,
|
||||
37D4B1AB2672580400C925CA /* URLImage in Frameworks */,
|
||||
37D4B19126717C6900C925CA /* Alamofire in Frameworks */,
|
||||
37B767E02678C5BF0098BAA8 /* Logging in Frameworks */,
|
||||
@ -323,6 +301,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
376578842685429C00D4EA09 /* CaseIterable+Next.swift */,
|
||||
379775922689365600DD52A8 /* Array+Next.swift */,
|
||||
);
|
||||
path = Extensions;
|
||||
sourceTree = "<group>";
|
||||
@ -423,26 +402,19 @@
|
||||
children = (
|
||||
37AAF28F26740715007FC770 /* AppState.swift */,
|
||||
37CEE4BC2677B670005A1EFE /* AudioVideoStream.swift */,
|
||||
37AAF28B2673ABD3007FC770 /* ChannelVideosProvider.swift */,
|
||||
37D4B1AF2672A01000C925CA /* DataProvider.swift */,
|
||||
37977582268922F600DD52A8 /* InvidiousAPI.swift */,
|
||||
37B767DA2677C3CA0098BAA8 /* PlayerState.swift */,
|
||||
376578882685471400D4EA09 /* Playlist.swift */,
|
||||
3765788C2685487700D4EA09 /* PlaylistsProvider.swift */,
|
||||
37D4B19226717CE100C925CA /* PopularVideosProvider.swift */,
|
||||
37C7A1DB267CE9D90010EAD6 /* Profile.swift */,
|
||||
37AAF2812673791F007FC770 /* SearchedVideosProvider.swift */,
|
||||
37EAD86E267B9ED100D9E01B /* Segment.swift */,
|
||||
37EAD86A267B9C5600D9E01B /* SponsorBlockAPI.swift */,
|
||||
37C7A1D4267BFD9D0010EAD6 /* SponsorBlockSegment.swift */,
|
||||
37EAD86A267B9C5600D9E01B /* SponsorBlockSegmentsProvider.swift */,
|
||||
3797758A2689345500DD52A8 /* Store.swift */,
|
||||
37CEE4C02677B697005A1EFE /* Stream.swift */,
|
||||
37CEE4B82677B63F005A1EFE /* StreamResolution.swift */,
|
||||
37CEE4B42677B628005A1EFE /* StreamType.swift */,
|
||||
37AAF29B26741B5F007FC770 /* SubscriptionVideosProvider.swift */,
|
||||
3705B181267B4E4900704544 /* TrendingCategory.swift */,
|
||||
3714167A267AA1CF006CA35D /* TrendingCountriesProvider.swift */,
|
||||
3714167E267AB55D006CA35D /* TrendingVideosProvider.swift */,
|
||||
37D4B19626717E1500C925CA /* Video.swift */,
|
||||
37D4B1B32672A30700C925CA /* VideoDetailsProvider.swift */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
@ -554,6 +526,7 @@
|
||||
37D4B1AC2672580400C925CA /* URLImageStore */,
|
||||
37B767DF2678C5BF0098BAA8 /* Logging */,
|
||||
372915E32687E33E00F5A35B /* Defaults */,
|
||||
3797757C268922D100DD52A8 /* Siesta */,
|
||||
);
|
||||
productName = Pearvidious;
|
||||
productReference = 37D4B158267164AE00C925CA /* Pearvidious (Apple TV).app */;
|
||||
@ -625,6 +598,7 @@
|
||||
37D4B1A92672580400C925CA /* XCRemoteSwiftPackageReference "url-image" */,
|
||||
37B767DE2678C5BF0098BAA8 /* XCRemoteSwiftPackageReference "swift-log" */,
|
||||
372915E22687E33E00F5A35B /* XCRemoteSwiftPackageReference "Defaults" */,
|
||||
3797757B268922D100DD52A8 /* XCRemoteSwiftPackageReference "siesta" */,
|
||||
);
|
||||
productRefGroup = 37D4B0CA2671614900C925CA /* Products */;
|
||||
projectDirPath = "";
|
||||
@ -695,21 +669,18 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
37CEE4BD2677B670005A1EFE /* AudioVideoStream.swift in Sources */,
|
||||
37D4B19326717CE100C925CA /* PopularVideosProvider.swift in Sources */,
|
||||
37AAF29C26741B5F007FC770 /* SubscriptionVideosProvider.swift in Sources */,
|
||||
37141668267A83F9006CA35D /* StreamAVPlayerViewController.swift in Sources */,
|
||||
37EAD86B267B9C5600D9E01B /* SponsorBlockSegmentsProvider.swift in Sources */,
|
||||
3765788D2685487700D4EA09 /* PlaylistsProvider.swift in Sources */,
|
||||
37EAD86B267B9C5600D9E01B /* SponsorBlockAPI.swift in Sources */,
|
||||
37F4AE762682908700BD60EA /* VideoCellView.swift in Sources */,
|
||||
37C7A1DA267CACF50010EAD6 /* TrendingCountrySelectionView.swift in Sources */,
|
||||
377FC7E6267A085600A6BBAF /* PlayerView.swift in Sources */,
|
||||
37977583268922F600DD52A8 /* InvidiousAPI.swift in Sources */,
|
||||
37CEE4C12677B697005A1EFE /* Stream.swift in Sources */,
|
||||
37F4AE7226828F0900BD60EA /* VideosCellsView.swift in Sources */,
|
||||
376578852685429C00D4EA09 /* CaseIterable+Next.swift in Sources */,
|
||||
37D4B0E62671614900C925CA /* ContentView.swift in Sources */,
|
||||
377FC7DC267A081800A6BBAF /* PopularVideosView.swift in Sources */,
|
||||
371231842683E62F0000B307 /* VideosView.swift in Sources */,
|
||||
3714167F267AB55D006CA35D /* TrendingVideosProvider.swift in Sources */,
|
||||
3705B182267B4E4900704544 /* TrendingCategory.swift in Sources */,
|
||||
37EAD86F267B9ED100D9E01B /* Segment.swift in Sources */,
|
||||
376578892685471400D4EA09 /* Playlist.swift in Sources */,
|
||||
@ -717,28 +688,25 @@
|
||||
37C7A1DC267CE9D90010EAD6 /* Profile.swift in Sources */,
|
||||
3714166F267A8ACC006CA35D /* TrendingView.swift in Sources */,
|
||||
377FC7E3267A084A00A6BBAF /* VideoListRow.swift in Sources */,
|
||||
37AAF2822673791F007FC770 /* SearchedVideosProvider.swift in Sources */,
|
||||
37AAF29026740715007FC770 /* AppState.swift in Sources */,
|
||||
37AAF2942674086B007FC770 /* TabSelection.swift in Sources */,
|
||||
37D4B1B02672A01000C925CA /* DataProvider.swift in Sources */,
|
||||
37AAF28C2673ABD3007FC770 /* ChannelVideosProvider.swift in Sources */,
|
||||
377FC7E9267A085D00A6BBAF /* PlayerViewController.swift in Sources */,
|
||||
377FC7E5267A084E00A6BBAF /* SearchView.swift in Sources */,
|
||||
376578912685490700D4EA09 /* PlaylistsView.swift in Sources */,
|
||||
379775932689365600DD52A8 /* Array+Next.swift in Sources */,
|
||||
377FC7E1267A082600A6BBAF /* ChannelView.swift in Sources */,
|
||||
37C7A1D5267BFD9D0010EAD6 /* SponsorBlockSegment.swift in Sources */,
|
||||
37B767DB2677C3CA0098BAA8 /* PlayerState.swift in Sources */,
|
||||
37D4B1B42672A30700C925CA /* VideoDetailsProvider.swift in Sources */,
|
||||
372915EA2687EBA500F5A35B /* ListingLayout.swift in Sources */,
|
||||
37141673267A8E10006CA35D /* Country.swift in Sources */,
|
||||
37AAF2A026741C97007FC770 /* SubscriptionsView.swift in Sources */,
|
||||
3714167B267AA1CF006CA35D /* TrendingCountriesProvider.swift in Sources */,
|
||||
377FC7DF267A082200A6BBAF /* VideosListView.swift in Sources */,
|
||||
372915E62687E3B900F5A35B /* Defaults.swift in Sources */,
|
||||
37D4B19726717E1500C925CA /* Video.swift in Sources */,
|
||||
37B76E96268747C900CE5671 /* ViewOptionsView.swift in Sources */,
|
||||
37D4B0E42671614900C925CA /* PearvidiousApp.swift in Sources */,
|
||||
37CEE4B92677B63F005A1EFE /* StreamResolution.swift in Sources */,
|
||||
3797758B2689345500DD52A8 /* Store.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -747,49 +715,43 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
37CEE4BE2677B670005A1EFE /* AudioVideoStream.swift in Sources */,
|
||||
37D4B19426717CE100C925CA /* PopularVideosProvider.swift in Sources */,
|
||||
37F4AE772682908700BD60EA /* VideoCellView.swift in Sources */,
|
||||
37AAF29D26741B5F007FC770 /* SubscriptionVideosProvider.swift in Sources */,
|
||||
37141669267A83F9006CA35D /* StreamAVPlayerViewController.swift in Sources */,
|
||||
37EAD86C267B9C5600D9E01B /* SponsorBlockSegmentsProvider.swift in Sources */,
|
||||
37EAD86C267B9C5600D9E01B /* SponsorBlockAPI.swift in Sources */,
|
||||
377FC7E7267A085600A6BBAF /* PlayerView.swift in Sources */,
|
||||
37CEE4C22677B697005A1EFE /* Stream.swift in Sources */,
|
||||
3765788E2685487700D4EA09 /* PlaylistsProvider.swift in Sources */,
|
||||
37D4B0E72671614900C925CA /* ContentView.swift in Sources */,
|
||||
372915EB2687EBA500F5A35B /* ListingLayout.swift in Sources */,
|
||||
377FC7DD267A081A00A6BBAF /* PopularVideosView.swift in Sources */,
|
||||
37141680267AB55D006CA35D /* TrendingVideosProvider.swift in Sources */,
|
||||
3705B183267B4E4900704544 /* TrendingCategory.swift in Sources */,
|
||||
37EAD870267B9ED100D9E01B /* Segment.swift in Sources */,
|
||||
37CEE4B62677B628005A1EFE /* StreamType.swift in Sources */,
|
||||
37141670267A8ACC006CA35D /* TrendingView.swift in Sources */,
|
||||
377FC7E2267A084A00A6BBAF /* VideoListRow.swift in Sources */,
|
||||
37AAF2832673791F007FC770 /* SearchedVideosProvider.swift in Sources */,
|
||||
3765788A2685471400D4EA09 /* Playlist.swift in Sources */,
|
||||
37AAF29126740715007FC770 /* AppState.swift in Sources */,
|
||||
37AAF2952674086B007FC770 /* TabSelection.swift in Sources */,
|
||||
372915E72687E3B900F5A35B /* Defaults.swift in Sources */,
|
||||
376578922685490700D4EA09 /* PlaylistsView.swift in Sources */,
|
||||
37D4B1B12672A01000C925CA /* DataProvider.swift in Sources */,
|
||||
37AAF28D2673ABD3007FC770 /* ChannelVideosProvider.swift in Sources */,
|
||||
377FC7E8267A085D00A6BBAF /* PlayerViewController.swift in Sources */,
|
||||
377FC7E4267A084E00A6BBAF /* SearchView.swift in Sources */,
|
||||
376578862685429C00D4EA09 /* CaseIterable+Next.swift in Sources */,
|
||||
37F4AE7326828F0900BD60EA /* VideosCellsView.swift in Sources */,
|
||||
377FC7E0267A082600A6BBAF /* ChannelView.swift in Sources */,
|
||||
379775942689365600DD52A8 /* Array+Next.swift in Sources */,
|
||||
37B76E97268747C900CE5671 /* ViewOptionsView.swift in Sources */,
|
||||
371231862683E7820000B307 /* VideosView.swift in Sources */,
|
||||
37C7A1D6267BFD9D0010EAD6 /* SponsorBlockSegment.swift in Sources */,
|
||||
37C7A1DD267CE9D90010EAD6 /* Profile.swift in Sources */,
|
||||
37B767DC2677C3CA0098BAA8 /* PlayerState.swift in Sources */,
|
||||
37D4B1B52672A30700C925CA /* VideoDetailsProvider.swift in Sources */,
|
||||
3797758C2689345500DD52A8 /* Store.swift in Sources */,
|
||||
37141674267A8E10006CA35D /* Country.swift in Sources */,
|
||||
37AAF2A126741C97007FC770 /* SubscriptionsView.swift in Sources */,
|
||||
3714167C267AA1CF006CA35D /* TrendingCountriesProvider.swift in Sources */,
|
||||
377FC7DE267A082100A6BBAF /* VideosListView.swift in Sources */,
|
||||
37D4B19826717E1500C925CA /* Video.swift in Sources */,
|
||||
37D4B0E52671614900C925CA /* PearvidiousApp.swift in Sources */,
|
||||
37CEE4BA2677B63F005A1EFE /* StreamResolution.swift in Sources */,
|
||||
37977584268922F600DD52A8 /* InvidiousAPI.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -818,46 +780,40 @@
|
||||
37CEE4BF2677B670005A1EFE /* AudioVideoStream.swift in Sources */,
|
||||
37CEE4B72677B628005A1EFE /* StreamType.swift in Sources */,
|
||||
3714166A267A83F9006CA35D /* StreamAVPlayerViewController.swift in Sources */,
|
||||
3765788F2685487700D4EA09 /* PlaylistsProvider.swift in Sources */,
|
||||
37F4AE782682908700BD60EA /* VideoCellView.swift in Sources */,
|
||||
37D4B19526717CE100C925CA /* PopularVideosProvider.swift in Sources */,
|
||||
37AAF29E26741B5F007FC770 /* SubscriptionVideosProvider.swift in Sources */,
|
||||
37977585268922F600DD52A8 /* InvidiousAPI.swift in Sources */,
|
||||
37F4AE7426828F0900BD60EA /* VideosCellsView.swift in Sources */,
|
||||
376578872685429C00D4EA09 /* CaseIterable+Next.swift in Sources */,
|
||||
37D4B1842671684E00C925CA /* PlayerView.swift in Sources */,
|
||||
37D4B1802671650A00C925CA /* PearvidiousApp.swift in Sources */,
|
||||
37141681267AB55D006CA35D /* TrendingVideosProvider.swift in Sources */,
|
||||
37D4B1B22672A01000C925CA /* DataProvider.swift in Sources */,
|
||||
371231852683E7820000B307 /* VideosView.swift in Sources */,
|
||||
37141671267A8ACC006CA35D /* TrendingView.swift in Sources */,
|
||||
37AAF29226740715007FC770 /* AppState.swift in Sources */,
|
||||
37EAD86D267B9C5600D9E01B /* SponsorBlockSegmentsProvider.swift in Sources */,
|
||||
37EAD86D267B9C5600D9E01B /* SponsorBlockAPI.swift in Sources */,
|
||||
3765788B2685471400D4EA09 /* Playlist.swift in Sources */,
|
||||
37C7A1DE267CE9D90010EAD6 /* Profile.swift in Sources */,
|
||||
3741B5302676213400125C5E /* PlayerViewController.swift in Sources */,
|
||||
37B767DD2677C3CA0098BAA8 /* PlayerState.swift in Sources */,
|
||||
37D4B18E26717B3800C925CA /* VideoListRow.swift in Sources */,
|
||||
37D4B1B62672A30700C925CA /* VideoDetailsProvider.swift in Sources */,
|
||||
37AAF27E26737323007FC770 /* PopularVideosView.swift in Sources */,
|
||||
37AAF29A26740A01007FC770 /* VideosListView.swift in Sources */,
|
||||
37AAF2962674086B007FC770 /* TabSelection.swift in Sources */,
|
||||
37C7A1D7267BFD9D0010EAD6 /* SponsorBlockSegment.swift in Sources */,
|
||||
376578932685490700D4EA09 /* PlaylistsView.swift in Sources */,
|
||||
37CEE4C32677B697005A1EFE /* Stream.swift in Sources */,
|
||||
379775952689365600DD52A8 /* Array+Next.swift in Sources */,
|
||||
37AAF28A2673AB89007FC770 /* ChannelView.swift in Sources */,
|
||||
37AAF28E2673ABD3007FC770 /* ChannelVideosProvider.swift in Sources */,
|
||||
3705B180267B4DFB00704544 /* TrendingCountrySelectionView.swift in Sources */,
|
||||
37141675267A8E10006CA35D /* Country.swift in Sources */,
|
||||
372915EC2687EBA500F5A35B /* ListingLayout.swift in Sources */,
|
||||
37D4B19926717E1500C925CA /* Video.swift in Sources */,
|
||||
3714167D267AA1CF006CA35D /* TrendingCountriesProvider.swift in Sources */,
|
||||
3705B184267B4E4900704544 /* TrendingCategory.swift in Sources */,
|
||||
37AAF2A226741C97007FC770 /* SubscriptionsView.swift in Sources */,
|
||||
372915E82687E3B900F5A35B /* Defaults.swift in Sources */,
|
||||
37D4B1812671653A00C925CA /* ContentView.swift in Sources */,
|
||||
37B76E98268747C900CE5671 /* ViewOptionsView.swift in Sources */,
|
||||
37AAF2842673791F007FC770 /* SearchedVideosProvider.swift in Sources */,
|
||||
37CEE4BB2677B63F005A1EFE /* StreamResolution.swift in Sources */,
|
||||
3797758D2689345500DD52A8 /* Store.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -1416,6 +1372,14 @@
|
||||
minimumVersion = 5.0.0;
|
||||
};
|
||||
};
|
||||
3797757B268922D100DD52A8 /* XCRemoteSwiftPackageReference "siesta" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/bustoutsolutions/siesta";
|
||||
requirement = {
|
||||
kind = upToNextMajorVersion;
|
||||
minimumVersion = 1.5.0;
|
||||
};
|
||||
};
|
||||
37B767DE2678C5BF0098BAA8 /* XCRemoteSwiftPackageReference "swift-log" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/apple/swift-log.git";
|
||||
@ -1506,6 +1470,11 @@
|
||||
package = 37B767DE2678C5BF0098BAA8 /* XCRemoteSwiftPackageReference "swift-log" */;
|
||||
productName = Logging;
|
||||
};
|
||||
3797757C268922D100DD52A8 /* Siesta */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 3797757B268922D100DD52A8 /* XCRemoteSwiftPackageReference "siesta" */;
|
||||
productName = Siesta;
|
||||
};
|
||||
37B767DF2678C5BF0098BAA8 /* Logging */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 37B767DE2678C5BF0098BAA8 /* XCRemoteSwiftPackageReference "swift-log" */;
|
||||
|
@ -19,6 +19,15 @@
|
||||
"version": "5.0.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "siesta",
|
||||
"repositoryURL": "https://github.com/bustoutsolutions/siesta",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "43f34046ebb5beb6802200353c473af303bbc31e",
|
||||
"version": "1.5.2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "swift-log",
|
||||
"repositoryURL": "https://github.com/apple/swift-log.git",
|
||||
|
@ -2,8 +2,8 @@ import Defaults
|
||||
import SwiftUI
|
||||
|
||||
struct ContentView: View {
|
||||
@ObservedObject private var state = AppState()
|
||||
@ObservedObject private var profile = Profile()
|
||||
@StateObject private var state = AppState()
|
||||
@StateObject private var profile = Profile()
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
@ -16,8 +16,8 @@ struct ContentView: View {
|
||||
.tabItem { Text("Popular") }
|
||||
.tag(TabSelection.popular)
|
||||
|
||||
if state.showingChannel {
|
||||
ChannelView()
|
||||
if !state.channelID.isEmpty {
|
||||
ChannelView(id: state.channelID)
|
||||
.tabItem { Text("\(state.channel) Channel") }
|
||||
.tag(TabSelection.channel)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user