mirror of
https://github.com/cranci1/Sora.git
synced 2026-01-11 20:10:24 +00:00
Update ContinueWatchingManager.swift
Some checks are pending
Build and Release IPA / Build IPA (push) Waiting to run
Some checks are pending
Build and Release IPA / Build IPA (push) Waiting to run
This commit is contained in:
parent
2eb07aebf1
commit
fe19ffda1f
1 changed files with 5 additions and 0 deletions
|
|
@ -14,6 +14,11 @@ class ContinueWatchingManager {
|
|||
private init() {}
|
||||
|
||||
func save(item: ContinueWatchingItem) {
|
||||
if item.progress >= 0.9 {
|
||||
remove(item: item)
|
||||
return
|
||||
}
|
||||
|
||||
var items = fetchItems()
|
||||
if let index = items.firstIndex(where: { $0.streamUrl == item.streamUrl && $0.episodeNumber == item.episodeNumber }) {
|
||||
items[index] = item
|
||||
|
|
|
|||
Loading…
Reference in a new issue