mirror of
https://github.com/yattee/yattee.git
synced 2024-11-10 00:08:21 +00:00
Peertube fixes
This commit is contained in:
parent
faf2469e04
commit
0c960c2461
@ -11,7 +11,6 @@ extension PlayerModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func loadHistoryVideoDetails(_ watch: Watch) {
|
func loadHistoryVideoDetails(_ watch: Watch) {
|
||||||
logger.info("id: \(watch.videoID), instance \(watch.instanceURL), app \(watch.appName)")
|
|
||||||
guard historyVideo(watch.videoID).isNil else {
|
guard historyVideo(watch.videoID).isNil else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -21,7 +20,10 @@ extension PlayerModel {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
playerAPI(watch.video).video(watch.videoID).load()
|
guard let api = playerAPI(watch.video) else { return }
|
||||||
|
|
||||||
|
api.video(watch.videoID)
|
||||||
|
.load()
|
||||||
.onSuccess { [weak self] response in
|
.onSuccess { [weak self] response in
|
||||||
guard let self else { return }
|
guard let self else { return }
|
||||||
|
|
||||||
|
@ -89,9 +89,13 @@ extension Watch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var video: Video {
|
var video: Video {
|
||||||
if !Video.VideoID.isValid(videoID), let url = URL(string: videoID) {
|
let url = URL(string: videoID)
|
||||||
|
|
||||||
|
if app == nil || !Video.VideoID.isValid(videoID) {
|
||||||
|
if let url {
|
||||||
return .local(url)
|
return .local(url)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return Video(app: app, instanceURL: instanceURL, videoID: videoID)
|
return Video(app: app, instanceURL: instanceURL, videoID: videoID)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user