mirror of
https://github.com/yattee/yattee.git
synced 2025-08-06 18:54:11 +00:00
Videos cache model
This commit is contained in:
@@ -87,7 +87,7 @@ extension PlayerModel {
|
||||
}
|
||||
|
||||
func playerAPI(_ video: Video) -> VideosAPI! {
|
||||
guard let url = video.instanceURL else { return nil }
|
||||
guard let url = video.instanceURL else { return accounts.api }
|
||||
switch video.app {
|
||||
case .local:
|
||||
return nil
|
||||
|
@@ -34,6 +34,7 @@ extension PlayerModel {
|
||||
.load()
|
||||
.onSuccess { response in
|
||||
if let video: Video = response.typedContent() {
|
||||
VideosCacheModel.shared.storeVideo(video)
|
||||
guard video.videoID == self.currentVideo?.videoID else {
|
||||
self.logger.info("ignoring loaded streams from \(instance.description) as current video has changed")
|
||||
return
|
||||
|
Reference in New Issue
Block a user