Minor fixes

This commit is contained in:
Arkadiusz Fal 2022-11-10 22:51:34 +01:00
parent 21b61982ad
commit 04a5224ab0
2 changed files with 16 additions and 14 deletions

View File

@ -28,13 +28,15 @@ extension PlayerModel {
return
}
playerAPI.video(id).load().onSuccess { [weak self] response in
playerAPI.video(id).load()
.onSuccess { [weak self] response in
guard let self else { return }
if let video: Video = response.typedContent() {
self.historyVideos.append(video)
}
}.onCompletion { _ in
}
.onCompletion { _ in
self.logger.info("LOADED history details: \(id)")
if self.historyItemBeingLoaded == id {

View File

@ -19,7 +19,7 @@ struct HistoryView: View {
player.loadHistoryVideoDetails(watch.videoID)
}
.contextMenu {
VideoContextMenuView(video: watch.video)
VideoContextMenuView(video: player.historyVideo(watch.videoID) ?? watch.video)
}
}
#if os(tvOS)