feat: progress for starting manga (#245)
The caveat is that the user must have disabled updating each title individually, along with the other standard checks. This will only apply when a chapter has not been completed.
This commit is contained in:
parent
8177dfdcef
commit
c054e2f2ac
10 changed files with 133 additions and 7 deletions
|
@ -1854,17 +1854,23 @@ class ExoplayerView : AppCompatActivity(), Player.Listener, SessionAvailabilityL
|
|||
|
||||
private fun updateAniProgress() {
|
||||
val incognito: Boolean = PrefManager.getVal(PrefName.Incognito)
|
||||
if (!incognito && exoPlayer.currentPosition / episodeLength > PrefManager.getVal<Float>(
|
||||
PrefName.WatchPercentage
|
||||
) && Anilist.userid != null
|
||||
val episodeEnd = exoPlayer.currentPosition / episodeLength > PrefManager.getVal<Float>(
|
||||
PrefName.WatchPercentage
|
||||
)
|
||||
val episode0 = currentEpisodeIndex == 0 && PrefManager.getVal(PrefName.ChapterZeroPlayer)
|
||||
if (!incognito && (episodeEnd || episode0) && Anilist.userid != null
|
||||
)
|
||||
if (PrefManager.getCustomVal(
|
||||
"${media.id}_save_progress",
|
||||
true
|
||||
) && (if (media.isAdult) PrefManager.getVal(PrefName.UpdateForHPlayer) else true)
|
||||
) {
|
||||
media.anime!!.selectedEpisode?.apply {
|
||||
updateProgress(media, this)
|
||||
if (episode0) {
|
||||
updateProgress(media, "0")
|
||||
} else {
|
||||
media.anime!!.selectedEpisode?.apply {
|
||||
updateProgress(media, this)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue