mirror of
https://github.com/yattee/yattee.git
synced 2025-08-06 18:54:11 +00:00
Opening videos by URL and local files
This commit is contained in:
@@ -80,6 +80,11 @@ extension VideosAPI {
|
||||
return
|
||||
}
|
||||
|
||||
if let video = item.video, video.isLocal {
|
||||
completionHandler(item)
|
||||
return
|
||||
}
|
||||
|
||||
video(item.videoID).load()
|
||||
.onSuccess { response in
|
||||
guard let video: Video = response.typedContent() else {
|
||||
@@ -87,6 +92,7 @@ extension VideosAPI {
|
||||
}
|
||||
|
||||
var newItem = item
|
||||
newItem.id = UUID()
|
||||
newItem.video = video
|
||||
|
||||
completionHandler(newItem)
|
||||
|
@@ -63,4 +63,8 @@ enum VideosApp: String, CaseIterable {
|
||||
var allowsDisablingVidoesProxying: Bool {
|
||||
self == .invidious
|
||||
}
|
||||
|
||||
var supportsOpeningVideosByID: Bool {
|
||||
self != .demoApp
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user