[Enhancement] Sleep timer setting to not reset after pausing #1035

Open
opened 2026-04-24 23:46:23 +02:00 by adam · 8 comments
Owner

Originally created by @HansenRene on GitHub (Sep 11, 2024).

What was the Problem?

The sleep timer resets when resuming playback after pausing.

Steps to Reproduce the Issue

Play something, set timer, wait for timer to reduce, pause, play. Timer is back to its initial value.

What was Expected?

In other audiobook apps, as well as the web-version of audiobookshelf, the sleep timer persists.
I expected the android app to work like that - could be an optional setting for those that wish to keep that behaviour.

Phone Model

Galaxy S6 Lite, Galaxy S24+

Phone OS

Android 13,14

Audiobookshelf App Version

Android App - 0.9.76

Installation Source

Google Play Store

Additional Notes

No response

Originally created by @HansenRene on GitHub (Sep 11, 2024). ### What was the Problem? The sleep timer resets when resuming playback after pausing. ### Steps to Reproduce the Issue Play something, set timer, wait for timer to reduce, pause, play. Timer is back to its initial value. ### What was Expected? In other audiobook apps, as well as the web-version of audiobookshelf, the sleep timer persists. I expected the android app to work like that - could be an optional setting for those that wish to keep that behaviour. ### Phone Model Galaxy S6 Lite, Galaxy S24+ ### Phone OS Android 13,14 ### Audiobookshelf App Version Android App - 0.9.76 ### Installation Source Google Play Store ### Additional Notes _No response_
adam added the enhancementandroidsleep timer labels 2026-04-24 23:46:23 +02:00
Author
Owner

@Dr-Blank commented on GitHub (Oct 6, 2024):

an option would be okay since if you paused you are awake and then sleep timer continuing does not make sense

@Dr-Blank commented on GitHub (Oct 6, 2024): an option would be okay since if you paused you are awake and then sleep timer continuing does not make sense
Author
Owner

@HansenRene commented on GitHub (Nov 5, 2024):

Indeed that would be great.
Having the timer reset though, is different behaviour from how the web-client work, whatever solution you end up doing, it might be prudent to the app and web versions behave alike as default :-)

@HansenRene commented on GitHub (Nov 5, 2024): Indeed that would be great. Having the timer reset though, is different behaviour from how the web-client work, whatever solution you end up doing, it might be prudent to the app and web versions behave alike as default :-)
Author
Owner

@dedors commented on GitHub (Mar 18, 2025):

I've noticed that it doesn't seem to behave consistently - playing after pausing resets the timer, but skipping tracks doesn't.

Personally, I find it would make more sense if any interaction could reset the timer. After all, if I'm actively using the app (skipping songs, adjusting volume, etc.), it probably means I'm still awake. This can also be done with an active bluetooth device, which is really handy.

As others might prefer the timer to only respond to direct timer commands for more predictable behavior, a simple option in the settings could help accommodate both preferences:

"Reset sleep timer on interaction: [On/Off]"

This way, the app could work well for everyone without the current confusion about which actions affect the timer and which don't.

@dedors commented on GitHub (Mar 18, 2025): I've noticed that it doesn't seem to behave consistently - playing after pausing resets the timer, but skipping tracks doesn't. Personally, I find it would make more sense if any interaction could reset the timer. After all, if I'm actively using the app (skipping songs, adjusting volume, etc.), it probably means I'm still awake. This can also be done with an active bluetooth device, which is really handy. As others might prefer the timer to only respond to direct timer commands for more predictable behavior, a simple option in the settings could help accommodate both preferences: "Reset sleep timer on interaction: [On/Off]" This way, the app could work well for everyone without the current confusion about which actions affect the timer and which don't.
Author
Owner

@advplyr commented on GitHub (Apr 24, 2025):

I'm going to switch this to an enhancement since it is intentional that the sleep timer resets after a 3 second or more pause.

The web client sleep timer (v2.20.0) hasn't been developed much because less users are using the feature but you're correct in that it should behave the same. The iOS app also does not pause the sleep timer when pausing (as of v0.9.80-beta).

Before bringing all the sleep timers into parity I think we should decide on what the optimal default state is and if we should support additional settings.
@nichwall are you still working on the sleep timer? I was reviewing #1535 and realized we should probably decide on what the best default sleep timer looks like

@advplyr commented on GitHub (Apr 24, 2025): I'm going to switch this to an enhancement since it is intentional that the sleep timer resets after a 3 second or more pause. The web client sleep timer (v2.20.0) hasn't been developed much because less users are using the feature but you're correct in that it should behave the same. The iOS app also does not pause the sleep timer when pausing (as of v0.9.80-beta). Before bringing all the sleep timers into parity I think we should decide on what the optimal default state is and if we should support additional settings. @nichwall are you still working on the sleep timer? I was reviewing #1535 and realized we should probably decide on what the best default sleep timer looks like
Author
Owner

@nichwall commented on GitHub (Apr 24, 2025):

@nichwall are you still working on the sleep timer? I was reviewing #1535 and realized we should probably decide on what the best default sleep timer looks like

I am not currently working on the sleep timer. I was thinking of revisiting the sleep timer after I finish refactoring the downlink, but it will probably be a few weeks before I look at it again.

@nichwall commented on GitHub (Apr 24, 2025): > @nichwall are you still working on the sleep timer? I was reviewing #1535 and realized we should probably decide on what the best default sleep timer looks like I am not currently working on the sleep timer. I was thinking of revisiting the sleep timer after I finish refactoring the downlink, but it will probably be a few weeks before I look at it again.
Author
Owner

@quartertone commented on GitHub (Jan 3, 2026):

The "sleep timer" has use cases other than just sleep.

Maybe you only want to listen to xx minutes of the audiobook this session, or you have a quota or other self-imposed limit.
In these situations, if you pause playback to do some other task, or if there's an alarm or other notification that interrupts playback for more than three seconds, the audiobook timer would be reset and listening time would be inadvertently extended.

Also, tying the timer resetting to the sleep/wake state of the listener doesn't really make sense to me. If the audio is playing then you would expect the user is awake or at least somewhat awake. It is possible for some people to interact with the app/device in a semi-sleep state, so resetting the timer in those situations would not be desirable.

I agree with @dedors suggestion of a toggle to select the desired behavior. Maybe some people have gotten used to the way the timer works in this app, but it would be nice to have the option to let the timer not reset every time you pause.

@quartertone commented on GitHub (Jan 3, 2026): The "sleep timer" has use cases other than just sleep. Maybe you only want to listen to xx minutes of the audiobook this session, or you have a quota or other self-imposed limit. In these situations, if you pause playback to do some other task, or if there's an alarm or other notification that interrupts playback for more than three seconds, the audiobook timer would be reset and listening time would be inadvertently extended. Also, tying the timer resetting to the sleep/wake state of the listener doesn't really make sense to me. If the audio is playing then you would expect the user is awake or at least somewhat awake. It is possible for some people to interact with the app/device in a semi-sleep state, so resetting the timer in those situations would not be desirable. I agree with @dedors suggestion of a toggle to select the desired behavior. Maybe some people have gotten used to the way the timer works in this app, but it would be nice to have the option to let the timer not reset every time you pause.
Author
Owner

@Megamannen commented on GitHub (Mar 31, 2026):

No timer resets after you pause it, it's very strange behaviour.

Try your phone, pause the timer, resume it. It's still where it was

Try your egg timer, set it to 7 minutes. Pause it (by squeezing it so it can't move), still not magically resets to 7 minutes.

Try your hourglass, pause it (by flipping it 90 degrees), resume it. Still not reset

I think quartertone's case is the normal use case.
I will listen for 45 minutes in my bed, then I will go to sleep, if I need to pause because I forgot to brush my teeth or go to the toilet I don't expect it to reset my reading time

@Megamannen commented on GitHub (Mar 31, 2026): No timer resets after you pause it, it's very strange behaviour. Try your phone, pause the timer, resume it. It's still where it was Try your egg timer, set it to 7 minutes. Pause it (by squeezing it so it can't move), still not magically resets to 7 minutes. Try your hourglass, pause it (by flipping it 90 degrees), resume it. Still not reset I think quartertone's case is the normal use case. I will listen for 45 minutes in my bed, then I will go to sleep, if I need to pause because I forgot to brush my teeth or go to the toilet I don't expect it to reset my reading time
Author
Owner

@dedors commented on GitHub (Apr 2, 2026):

I think the usecases can differ a lot on this topic. It makes sense for the timer to reset after a prolonged pause, especially since there is no explicit "stop" function. If a user pauses with one minute remaining and resumes the next day, they almost certainly do not want playback to stop after a single minute.

My timer is always active, so any interaction (shaking, pausing, rewinding) should reset it. This ensures I never have to rewind further than the maximum timer duration to find my last listening position.

While it is challenging to minimize settings while covering different use cases, this behavior is highly relevant for certain users. Additionally, for feature completeness, some users might prefer the timer to continue counting down even while playback is paused?

This logic also applies to the "shake to reset" function. A user who relies on the timer as a strict playback quota likely does not want interactions to trigger a reset. Two default profiles could address this:

  • If "shake to reset" is disabled: The pause reset defaults to a (configurable?) one-hour timeout, and no other interactions trigger a reset.
  • If "shake to reset" is enabled: The user chooses whether only a pause triggers a reset (using the current short timeout default) or if any interaction triggers a reset (which makes a specific pause timeout setting unnecessary).
@dedors commented on GitHub (Apr 2, 2026): I think the usecases can differ a lot on this topic. It makes sense for the timer to reset after a prolonged pause, especially since there is no explicit "stop" function. If a user pauses with one minute remaining and resumes the next day, they almost certainly do not want playback to stop after a single minute. My timer is always active, so any interaction (shaking, pausing, rewinding) should reset it. This ensures I never have to rewind further than the maximum timer duration to find my last listening position. While it is challenging to minimize settings while covering different use cases, this behavior is highly relevant for certain users. Additionally, for feature completeness, some users might prefer the timer to continue counting down even while playback is paused? This logic also applies to the "shake to reset" function. A user who relies on the timer as a strict playback quota likely does not want interactions to trigger a reset. Two default profiles could address this: - If "shake to reset" is disabled: The pause reset defaults to a (configurable?) one-hour timeout, and no other interactions trigger a reset. - If "shake to reset" is enabled: The user chooses whether only a pause triggers a reset (using the current short timeout default) or if any interaction triggers a reset (which makes a specific pause timeout setting unnecessary).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#1035