1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-14 22:30:32 +05:30

Fix replaying item

This commit is contained in:
Arkadiusz Fal 2022-07-21 22:58:32 +02:00
parent 4126de1fbf
commit 8f48ea71cd
2 changed files with 5 additions and 3 deletions

View File

@ -119,9 +119,11 @@ extension PlayerModel {
remove(newItem) remove(newItem)
currentItem = newItem currentItem = newItem
currentItem.playbackTime = time
accounts.api.loadDetails(newItem, failureHandler: videoLoadFailureHandler) { newItem in let playTime = currentItem.shouldRestartPlaying ? CMTime.zero : time
self.playItem(newItem, at: time) accounts.api.loadDetails(currentItem, failureHandler: videoLoadFailureHandler) { newItem in
self.playItem(newItem, at: playTime)
} }
} }

View File

@ -36,7 +36,7 @@ struct PlayerQueueItem: Hashable, Identifiable, Defaults.Serializable {
return false return false
} }
return duration - seconds <= 10 return duration - seconds <= 20
} }
var hasDetailsLoaded: Bool { var hasDetailsLoaded: Bool {