advplyr / audiobookshelf-app

Mobile application for Audiobookshelf
https://audiobookshelf.org
GNU General Public License v3.0
1.28k stars 173 forks source link

[Bug]: Autosleep timer engaging outside of set time. #1268

Open iconoclasthero opened 3 months ago

iconoclasthero commented 3 months ago

What was the Problem?

The sleep timer was set (1200-0600, later changed to 0000-0600). Playback was started ca. 11:00, outside of either time range. The sleep timer was still active.

Steps to Reproduce the Issue

  1. Set sleep timer
  2. Start playback
  3. Observer sleep timer on.

What was Expected?

Inactive sleep timer

Phone Model

OnePlus 10 Pro

Phone OS

Android 14, stock rom, rooted

Audiobookshelf App Version

Android App - 0.9.74

Installation Source

Other (List in "Additional Notes")

Additional Notes

I probably sideloaded it last time? Not 100% sure. I know that I have sideloaded it before.

iconoclasthero commented 3 months ago

It is nice that I was listening to something more or less respectable:

Screenshot_2024-07-25-11-30-39-6 (1)

Screenshot_2024-07-25-11-30-55-9 (1)

nichwall commented 3 months ago

I was able to reproduce this by setting an auto sleep timer to end 3 minutes in the future and beginning playback (observed auto sleep timer enabled correctly). I closed the media player but kept the app open until I was outside of active hours for the auto sleep timer. Once outside of auto sleep timer hours, opening the player (incorrectly) enabled the auto sleep timer with full time remaining.

Completely closing the app and reopening the app correctly did not cause the auto sleep timer to be enabled. Looks like once the auto sleep timer is enabled it is not checked whether it should be disabled without completing closing the app.

iconoclasthero commented 3 months ago

Yeah, what he said about completely closing the app seemed to work. I used app info > force stop to close it. Changing books, logging into the server didn't have any effect.