mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-04 01:54:33 +02:00
Change: sleep timer EoC cutoff to be 10 seconds
This commit is contained in:
parent
e7e03697d6
commit
5fd21c8393
1 changed files with 5 additions and 2 deletions
|
@ -276,8 +276,11 @@ constructor(private val playerNotificationService: PlayerNotificationService) {
|
|||
}
|
||||
|
||||
val timeLeftInChapter = currentChapterEndTimeMs - getCurrentTime()
|
||||
return if (timeLeftInChapter < 2000L) {
|
||||
Log.i(tag, "Getting chapter sleep timer time and current chapter has less than 2s remaining")
|
||||
// If less than 10 seconds remain in the chapter, set the timer to the next chapter or track
|
||||
// This handles the auto-rewind from not playing media for a little bit to select the next
|
||||
// chapter
|
||||
return if (timeLeftInChapter < 10000L) {
|
||||
Log.i(tag, "Getting chapter sleep timer time and current chapter has less than 10s remaining")
|
||||
val nextChapterEndTimeMs = playerNotificationService.getEndTimeOfNextChapterOrTrack()
|
||||
if (nextChapterEndTimeMs == null || currentChapterEndTimeMs == nextChapterEndTimeMs) {
|
||||
Log.e(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue