[PR #692] [MERGED] Added Auto Rewind on Sleep Timer setting to Android #1466

Closed
opened 2026-04-24 23:58:40 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf-app/pull/692
Author: @HStep20
Created: 4/29/2023
Status: Merged
Merged: 5/20/2023
Merged by: @advplyr

Base: masterHead: master


📝 Commits (10+)

  • 5399ec6 Added Auto Rewind on Sleep Timer setting
  • 695ab84 changed behavior for first timer set
  • a3794a6 added check before setting state
  • 65b69cc fixed if statement syntax
  • daff835 Merge branch 'master' into HStep20/master
  • 8061ac0 Fix auto rewind when check resetting sleep timer
  • cb9e317 Initialize auto rewind time and update description
  • e39a5e1 Fix saveSettings function call
  • c530e0f Remove test log
  • 9386ae9 Fix set sleepTimerSessionId

📊 Changes

7 files changed (+189 additions, -11 deletions)

View changed files

📝 android/app/src/main/java/com/audiobookshelf/app/data/DeviceClasses.kt (+5 -0)
📝 android/app/src/main/java/com/audiobookshelf/app/device/DeviceManager.kt (+4 -0)
📝 android/app/src/main/java/com/audiobookshelf/app/managers/SleepTimerManager.kt (+35 -4)
📝 android/app/src/main/java/com/audiobookshelf/app/player/PlayerListener.kt (+8 -5)
📝 android/app/src/main/java/com/audiobookshelf/app/plugins/AbsAudioPlayer.kt (+2 -1)
components/modals/AutoSleepTimerRewindLengthModal.vue (+95 -0)
📝 pages/settings.vue (+40 -1)

📄 Description

Adds a Setting which will allow the user to Automatically Rewind their position in a book when the Auto Sleep Timer is finished.
Should aid those who wake up during the night and want to 'backtrack' to an approximate location of where they left off, without turning on their phone screen and fiddling with the position in the book and close #623

If theres a better way to handle 'rewinding x minutes' rather than using playerNotificationService.seekBackward, I can implement that.

A possible future feature could be 'rewind to start of current chapter', but I plan to use time as my quantifier for a rewind as opposed to chapter position.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf-app/pull/692 **Author:** [@HStep20](https://github.com/HStep20) **Created:** 4/29/2023 **Status:** ✅ Merged **Merged:** 5/20/2023 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (10+) - [`5399ec6`](https://github.com/advplyr/audiobookshelf-app/commit/5399ec67d7020cb4507925afb0a325892279118d) Added Auto Rewind on Sleep Timer setting - [`695ab84`](https://github.com/advplyr/audiobookshelf-app/commit/695ab84940adb37bf4f58ffcf1fb14a6d4e7490a) changed behavior for first timer set - [`a3794a6`](https://github.com/advplyr/audiobookshelf-app/commit/a3794a6a6a576ce6bb48e09bd46b8cebd82ed38d) added check before setting state - [`65b69cc`](https://github.com/advplyr/audiobookshelf-app/commit/65b69cc020363f5e8d387e67c9f19d5f95b04089) fixed if statement syntax - [`daff835`](https://github.com/advplyr/audiobookshelf-app/commit/daff8355d71ab0319b7d6e7ce59ce613b10c14f9) Merge branch 'master' into HStep20/master - [`8061ac0`](https://github.com/advplyr/audiobookshelf-app/commit/8061ac0cedb3b5e54c213c833ca5adac28ac14aa) Fix auto rewind when check resetting sleep timer - [`cb9e317`](https://github.com/advplyr/audiobookshelf-app/commit/cb9e317e74d793942165335a1e3c901701b42638) Initialize auto rewind time and update description - [`e39a5e1`](https://github.com/advplyr/audiobookshelf-app/commit/e39a5e1ba3302fd73c838be9be270d15c2c84a26) Fix saveSettings function call - [`c530e0f`](https://github.com/advplyr/audiobookshelf-app/commit/c530e0f7e3493ab3f57a4be2659877c6b7688d12) Remove test log - [`9386ae9`](https://github.com/advplyr/audiobookshelf-app/commit/9386ae95a3b63d2b935f9b4f5b7717e0f7f61c11) Fix set sleepTimerSessionId ### 📊 Changes **7 files changed** (+189 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `android/app/src/main/java/com/audiobookshelf/app/data/DeviceClasses.kt` (+5 -0) 📝 `android/app/src/main/java/com/audiobookshelf/app/device/DeviceManager.kt` (+4 -0) 📝 `android/app/src/main/java/com/audiobookshelf/app/managers/SleepTimerManager.kt` (+35 -4) 📝 `android/app/src/main/java/com/audiobookshelf/app/player/PlayerListener.kt` (+8 -5) 📝 `android/app/src/main/java/com/audiobookshelf/app/plugins/AbsAudioPlayer.kt` (+2 -1) ➕ `components/modals/AutoSleepTimerRewindLengthModal.vue` (+95 -0) 📝 `pages/settings.vue` (+40 -1) </details> ### 📄 Description Adds a Setting which will allow the user to Automatically Rewind their position in a book when the Auto Sleep Timer is finished. Should aid those who wake up during the night and want to 'backtrack' to an approximate location of where they left off, without turning on their phone screen and fiddling with the position in the book and close #623 If theres a better way to handle 'rewinding x minutes' rather than using `playerNotificationService.seekBackward`, I can implement that. A possible future feature could be 'rewind to start of current chapter', but I plan to use time as my quantifier for a rewind as opposed to chapter position. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-24 23:58:40 +02:00
adam closed this issue 2026-04-24 23:58:40 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#1466