mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Minor fixes
This commit is contained in:
parent
21b61982ad
commit
04a5224ab0
@ -28,24 +28,26 @@ extension PlayerModel {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
playerAPI.video(id).load().onSuccess { [weak self] response in
|
playerAPI.video(id).load()
|
||||||
guard let self else { return }
|
.onSuccess { [weak self] response in
|
||||||
|
guard let self else { return }
|
||||||
|
|
||||||
if let video: Video = response.typedContent() {
|
if let video: Video = response.typedContent() {
|
||||||
self.historyVideos.append(video)
|
self.historyVideos.append(video)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}.onCompletion { _ in
|
.onCompletion { _ in
|
||||||
self.logger.info("LOADED history details: \(id)")
|
self.logger.info("LOADED history details: \(id)")
|
||||||
|
|
||||||
if self.historyItemBeingLoaded == id {
|
if self.historyItemBeingLoaded == id {
|
||||||
self.logger.info("setting no history loaded")
|
self.logger.info("setting no history loaded")
|
||||||
self.historyItemBeingLoaded = nil
|
self.historyItemBeingLoaded = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if let id = self.historyItemsToLoad.popLast() {
|
if let id = self.historyItemsToLoad.popLast() {
|
||||||
self.loadHistoryVideoDetails(id)
|
self.loadHistoryVideoDetails(id)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateWatch(finished: Bool = false) {
|
func updateWatch(finished: Bool = false) {
|
||||||
|
@ -19,7 +19,7 @@ struct HistoryView: View {
|
|||||||
player.loadHistoryVideoDetails(watch.videoID)
|
player.loadHistoryVideoDetails(watch.videoID)
|
||||||
}
|
}
|
||||||
.contextMenu {
|
.contextMenu {
|
||||||
VideoContextMenuView(video: watch.video)
|
VideoContextMenuView(video: player.historyVideo(watch.videoID) ?? watch.video)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if os(tvOS)
|
#if os(tvOS)
|
||||||
|
Loading…
Reference in New Issue
Block a user