Volume fades out at end of book when sleep timer is enabled #515

Closed
opened 2026-04-24 23:27:01 +02:00 by adam · 5 comments
Owner

Originally created by @YodaDaCoda on GitHub (Apr 3, 2023).

Steps to reproduce

  1. Jump to end of book such that there is approximately ~1minute remaining
  2. Press play and listen
  3. Observe that the volume starts to decrease at about 30seconds remaining & the sleep timer counts down with the time remaining in the book

Expected behaviour

I expect the volume to not fade out at the end of the book.
Less important, but seemingly related, I expect the sleep timer to be independent from the finish time of the book - I expect the app to simply cancel the sleep timer when the book finishes.

Actual behaviour

The sleep timer coincides with the ending of the book, and the volume fades out making it hard to hear the last words.

Environment data

Audiobookshelf Version: v2.2.17 (server) / 0.9.63-beta (app)

  • Android App

Android Issue

Android version: 13

Device model: OnePlus 9 / LE2115

Stock or customized system: Stock

Originally created by @YodaDaCoda on GitHub (Apr 3, 2023). ### Steps to reproduce 1. Jump to end of book such that there is approximately ~1minute remaining 2. Press play and listen 3. Observe that the volume starts to decrease at about 30seconds remaining & the sleep timer counts down with the time remaining in the book ### Expected behaviour I expect the volume to not fade out at the end of the book. Less important, but seemingly related, I expect the sleep timer to be independent from the finish time of the book - I expect the app to simply cancel the sleep timer when the book finishes. ### Actual behaviour The sleep timer coincides with the ending of the book, and the volume fades out making it hard to hear the last words. ### Environment data Audiobookshelf Version: v2.2.17 (server) / 0.9.63-beta (app) - [x] Android App #### Android Issue Android version: 13 Device model: OnePlus 9 / LE2115 Stock or customized system: Stock
adam added the bug label 2026-04-24 23:27:01 +02:00
adam closed this issue 2026-04-24 23:27:01 +02:00
Author
Owner

@Dr-Blank commented on GitHub (Apr 3, 2023):

While reproducing this, I found another bug.

The sleep timer value is changed and no longer what is should as set in the settings. Hence shake to rest does not function as intended.

Example:

  1. Start playing a book. (the timer is set to 10 min, which is my default)
  2. Seek to 1 min left (or anything less than 10 min)
  3. The timer is still 10 min, however, pause and play again, the timer is set to whatever time is remaining, for example 60 secs. (assuming it is choosing the minimum value between the setting and the remaining time)
  4. Now it does not fade, as I have disabled the fading option, however, now the default times is now set to 60 secs for the rest of the session.
  5. For example, if you seek back to position where greater than 10min of time is left or entirely different book, and press play the timer is now 60 secs. Shake the phone, the timer resets to 60 secs.
  6. Canceling the timer from the button or force closing the app fixes the issue.
@Dr-Blank commented on GitHub (Apr 3, 2023): While reproducing this, I found another bug. The sleep timer value is changed and no longer what is should as set in the settings. Hence shake to rest does not function as intended. Example: 1. Start playing a book. (the timer is set to 10 min, which is my default) 2. Seek to 1 min left (or anything less than 10 min) 3. The timer is still 10 min, however, pause and play again, the timer is set to whatever time is remaining, for example 60 secs. (assuming it is choosing the minimum value between the setting and the remaining time) 4. Now it does not fade, as I have disabled the fading option, however, now the default times is now set to 60 secs for the rest of the session. 5. For example, if you seek back to position where greater than 10min of time is left or entirely different book, and press play the timer is now 60 secs. Shake the phone, the timer resets to 60 secs. 6. Canceling the timer from the button or force closing the app fixes the issue.
Author
Owner

@brcarls commented on GitHub (Apr 29, 2023):

While reproducing this, I found another bug.

The sleep timer value is changed and no longer what is should as set in the settings. Hence shake to rest does not function as intended.

Example:

1. Start playing a book. (the timer is set to 10 min, which is my default)

2. Seek to 1 min left (or anything less than 10 min)

3. The timer is still 10 min, however, pause and play again, the timer is set to whatever time is remaining, for example 60 secs. (assuming it is choosing the minimum value between the setting and the remaining time)

4. Now it does not fade, as I have disabled the fading option, however, now the default times is now set to 60 secs for the rest of the session.

5. For example, if you seek back to position where greater than 10min of time is left or entirely different book, and press play the timer is now 60 secs. Shake the phone, the timer resets to 60 secs.

6. Canceling the timer from the button or force closing the app fixes the issue.

I just encountered what you describe except instead of seeking back in the same book, I started a new book and it inherited a very short sleep timer.

@brcarls commented on GitHub (Apr 29, 2023): > While reproducing this, I found another bug. > > The sleep timer value is changed and no longer what is should as set in the settings. Hence shake to rest does not function as intended. > > Example: > > 1. Start playing a book. (the timer is set to 10 min, which is my default) > > 2. Seek to 1 min left (or anything less than 10 min) > > 3. The timer is still 10 min, however, pause and play again, the timer is set to whatever time is remaining, for example 60 secs. (assuming it is choosing the minimum value between the setting and the remaining time) > > 4. Now it does not fade, as I have disabled the fading option, however, now the default times is now set to 60 secs for the rest of the session. > > 5. For example, if you seek back to position where greater than 10min of time is left or entirely different book, and press play the timer is now 60 secs. Shake the phone, the timer resets to 60 secs. > > 6. Canceling the timer from the button or force closing the app fixes the issue. I just encountered what you describe except instead of seeking back in the same book, I started a new book and it inherited a very short sleep timer.
Author
Owner

@advplyr commented on GitHub (May 20, 2023):

I fixed the issue @Dr-Blank and @brcarls mentioned.

As for the original issue I was only able to reproduce this when using a end of chapter sleep timer. I suppose we could check if this is the last chapter and ignore the audio fade out, but technically the end of the audiobook is still the end of the last chapter.
@YodaDaCoda Just to confirm you were using an end of chapter sleep timer?

@advplyr commented on GitHub (May 20, 2023): I fixed the issue @Dr-Blank and @brcarls mentioned. As for the original issue I was only able to reproduce this when using a end of chapter sleep timer. I suppose we could check if this is the last chapter and ignore the audio fade out, but technically the end of the audiobook is still the end of the last chapter. @YodaDaCoda Just to confirm you were using an end of chapter sleep timer?
Author
Owner

@YodaDaCoda commented on GitHub (May 21, 2023):

I was using a 15-minute timer, but the issue as described by @Dr-Blank seems to be the same thing as I was experiencing.

@YodaDaCoda commented on GitHub (May 21, 2023): I was using a 15-minute timer, but the issue as described by @Dr-Blank seems to be the same thing as I was experiencing.
Author
Owner

@advplyr commented on GitHub (May 23, 2023):

Fixed in v0.9.64-beta

@advplyr commented on GitHub (May 23, 2023): Fixed in [v0.9.64-beta](https://github.com/advplyr/audiobookshelf-app/releases/tag/v0.9.64-beta)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#515