[PR #392] [MERGED] fix: iOS chapter sleep timer issues #1428

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

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf-app/pull/392
Author: @ronaldheft
Created: 9/18/2022
Status: Merged
Merged: 9/19/2022
Merged by: @advplyr

Base: masterHead: fix-ios-chapter-sleep-timer


📝 Commits (1)

  • 5d23c17 fix: iOS chapter sleep timer issues

📊 Changes

3 files changed (+18 additions, -18 deletions)

View changed files

📝 ios/App/Shared/player/AudioPlayer.swift (+3 -5)
📝 ios/App/Shared/player/AudioPlayerSleepTimer.swift (+14 -13)
📝 ios/App/Shared/util/Database.swift (+1 -0)

📄 Description

Fixes #367. Several chapter sleep timer issues were found, all which were address in this PR:

  • In chapters with multiple tracks, the sleep timer would never stop at the end of the chapter
    • The sleep timer would not be scheduled to stop on the current track, and nothing was calling the sleep timer logic to schedule timer once we reached the correct track to schedule the stop on
  • When skipping past the current chapter, the sleep timer would not always clear
    • Now tests if the chapter sleep timer is valid every time playback resumes, which always happens after a seek
  • Sometimes the currentTime from the session would be inaccurate during a track change
    • Solved with realm.refresh()

🔄 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/392 **Author:** [@ronaldheft](https://github.com/ronaldheft) **Created:** 9/18/2022 **Status:** ✅ Merged **Merged:** 9/19/2022 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `fix-ios-chapter-sleep-timer` --- ### 📝 Commits (1) - [`5d23c17`](https://github.com/advplyr/audiobookshelf-app/commit/5d23c17d302dfbee8fc33a1cc60e8299847ed474) fix: iOS chapter sleep timer issues ### 📊 Changes **3 files changed** (+18 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `ios/App/Shared/player/AudioPlayer.swift` (+3 -5) 📝 `ios/App/Shared/player/AudioPlayerSleepTimer.swift` (+14 -13) 📝 `ios/App/Shared/util/Database.swift` (+1 -0) </details> ### 📄 Description Fixes #367. Several chapter sleep timer issues were found, all which were address in this PR: * In chapters with multiple tracks, the sleep timer would never stop at the end of the chapter * The sleep timer would not be scheduled to stop on the current track, and nothing was calling the sleep timer logic to schedule timer once we reached the correct track to schedule the stop on * When skipping past the current chapter, the sleep timer would not always clear * Now tests if the chapter sleep timer is valid every time playback resumes, which always happens after a seek * Sometimes the currentTime from the session would be inaccurate during a track change * Solved with `realm.refresh()` --- <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:22 +02:00
adam closed this issue 2026-04-24 23:58:23 +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#1428