mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-05-16 23:12:12 +00:00
feat: update WatchingActions to mark watched items
This commit is contained in:
parent
7295aaa4f5
commit
db74bc6796
3 changed files with 17 additions and 3 deletions
2
MPVKit
2
MPVKit
|
|
@ -1 +1 @@
|
|||
Subproject commit 0c01e295f078f8382edcd0bb5326412791084146
|
||||
Subproject commit 97923266e43d52bbca33a911fd6a7f9a1bcf35cb
|
||||
|
|
@ -4,6 +4,7 @@ import com.nuvio.app.features.details.MetaDetails
|
|||
import com.nuvio.app.features.details.MetaDetailsRepository
|
||||
import com.nuvio.app.features.details.MetaVideo
|
||||
import com.nuvio.app.features.home.MetaPreview
|
||||
import com.nuvio.app.features.watched.WatchedItem
|
||||
import com.nuvio.app.features.watched.WatchedRepository
|
||||
import com.nuvio.app.features.watched.episodePlaybackId
|
||||
import com.nuvio.app.features.watched.releasedPlayableEpisodes
|
||||
|
|
@ -106,7 +107,20 @@ object WatchingActions {
|
|||
}
|
||||
|
||||
fun onProgressEntryUpdated(entry: WatchProgressEntry) {
|
||||
if (!entry.isCompleted || !entry.isEpisode) return
|
||||
if (!entry.isCompleted) return
|
||||
|
||||
val watchedItem = WatchedItem(
|
||||
id = entry.parentMetaId,
|
||||
type = entry.parentMetaType,
|
||||
name = entry.title,
|
||||
poster = entry.poster,
|
||||
season = entry.seasonNumber,
|
||||
episode = entry.episodeNumber,
|
||||
markedAtEpochMs = entry.lastUpdatedEpochMs,
|
||||
)
|
||||
WatchedRepository.markWatched(watchedItem)
|
||||
|
||||
if (!entry.isEpisode) return
|
||||
actionScope.launch {
|
||||
val meta = runCatching {
|
||||
MetaDetailsRepository.fetch(
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
CURRENT_PROJECT_VERSION=33
|
||||
CURRENT_PROJECT_VERSION=34
|
||||
MARKETING_VERSION=0.1.3
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue