From 157888d3c5643346627026c8380befe54527216e Mon Sep 17 00:00:00 2001 From: KingLucius Date: Tue, 9 Apr 2024 21:42:26 +0200 Subject: [PATCH] Mark Episode as Watched if progress over 90% --- .../com/lagradost/cloudstream3/ui/player/GeneratorPlayer.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/player/GeneratorPlayer.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/player/GeneratorPlayer.kt index 7ff56886..40409884 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/player/GeneratorPlayer.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/player/GeneratorPlayer.kt @@ -1028,6 +1028,7 @@ class GeneratorPlayer : FullScreenPlayer() { val nextEp = percentage >= NEXT_WATCH_EPISODE_PERCENTAGE val resumeMeta = if (nextEp) nextMeta else currentMeta + if (resumeMeta == null && nextEp) { // remove last watched as it is the last episode and you have watched too much when (val newMeta = currentMeta) { @@ -1081,6 +1082,7 @@ class GeneratorPlayer : FullScreenPlayer() { } if (meta.tvType.isAnimeOp()) isOpVisible = percentage < SKIP_OP_VIDEO_PERCENTAGE + if (nextEp) DataStoreHelper.setVideoWatchState(meta.id, VideoWatchState.Watched) } }