[PR #338] [MERGED] Fix: Extra timeListening when player initializes on iOS #1411

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

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf-app/pull/338
Author: @ronaldheft
Created: 8/30/2022
Status: Merged
Merged: 8/30/2022
Merged by: @advplyr

Base: masterHead: ios-fix-playback-timer


📝 Commits (1)

  • 711b079 Fix: Extra timeListening when player initializes

📊 Changes

1 file changed (+11 additions, -5 deletions)

View changed files

📝 ios/App/Shared/player/AudioPlayer.swift (+11 -5)

📄 Description

There was an edge case where extra timeListening would be added to the playback session.

This turned out to be the PeriodicTimeObserver firing on initialization of the audio player, which was marking the first update as including playback progress, thus adding the time since player was last opened to the playback session.

This PR adds an extra check that the player is actually playing something instead of marking all progress updates from the PeriodicTimeObserver as including playback progress.


🔄 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/338 **Author:** [@ronaldheft](https://github.com/ronaldheft) **Created:** 8/30/2022 **Status:** ✅ Merged **Merged:** 8/30/2022 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `ios-fix-playback-timer` --- ### 📝 Commits (1) - [`711b079`](https://github.com/advplyr/audiobookshelf-app/commit/711b07996324f5dae514e5edf62ed5e6acbdd01a) Fix: Extra timeListening when player initializes ### 📊 Changes **1 file changed** (+11 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `ios/App/Shared/player/AudioPlayer.swift` (+11 -5) </details> ### 📄 Description There was an edge case where extra `timeListening` would be added to the playback session. This turned out to be the `PeriodicTimeObserver` firing on initialization of the audio player, which was marking the first update as including playback progress, thus adding the time since player was last opened to the playback session. This PR adds an extra check that the player is actually playing something instead of marking all progress updates from the `PeriodicTimeObserver` as including playback progress. --- <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:16 +02:00
adam closed this issue 2026-04-24 23:58:16 +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#1411