Initial PeerTube Support

This commit is contained in:
Arkadiusz Fal
2022-12-09 01:15:19 +01:00
parent 72ea17b257
commit faf2469e04
39 changed files with 816 additions and 92 deletions

View File

@@ -9,6 +9,10 @@ final class PipedAPI: Service, ObservableObject, VideosAPI {
@Published var account: Account!
static func withAnonymousAccountForInstanceURL(_ url: URL) -> PipedAPI {
.init(account: Instance(app: .piped, apiURLString: url.absoluteString).anonymousAccount)
}
init(account: Account? = nil) {
super.init()
@@ -473,6 +477,9 @@ final class PipedAPI: Service, ObservableObject, VideosAPI {
}
return Video(
instanceID: account.instanceID,
app: .piped,
instanceURL: account.instance.apiURL,
videoID: extractID(from: content),
title: details["title"]?.string ?? "",
author: author,