mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-15 23:37:59 +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()
|
val timeLeftInChapter = currentChapterEndTimeMs - getCurrentTime()
|
||||||
return if (timeLeftInChapter < 2000L) {
|
// If less than 10 seconds remain in the chapter, set the timer to the next chapter or track
|
||||||
Log.i(tag, "Getting chapter sleep timer time and current chapter has less than 2s remaining")
|
// 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()
|
val nextChapterEndTimeMs = playerNotificationService.getEndTimeOfNextChapterOrTrack()
|
||||||
if (nextChapterEndTimeMs == null || currentChapterEndTimeMs == nextChapterEndTimeMs) {
|
if (nextChapterEndTimeMs == null || currentChapterEndTimeMs == nextChapterEndTimeMs) {
|
||||||
Log.e(
|
Log.e(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue