Skip to content

Conversation

@AwsomeFox
Copy link

@AwsomeFox AwsomeFox commented Jul 23, 2025

Followup to #1640

Brief summary

Playstate is not syncronized when the app is opened which means the player is missing and status is not synced when main process stopped and resumed.

Which issue is fixed?

Could help with this issue #1516 or other related server sync issues.

Pull Request Type

Android

In-depth Description

Realized the playstate is not synced with UI when the application is resumed after being killed either in the app switcher by the user or in the background. This means the service tracking/syncronizing progress isn't updated either and the UI doesn't have an active player. With this change the playstate is synced when the app is resumed and the ui service is ready.

How have you tested this?

Running on phone and emulator. Play a book swipe to close audiobookshelf in recents. Open audiobookshelf and player opens with the correct book and play state. Without these changes the ui and services were un-aware of the current play state. Tested in multiple states closing and opening the app. Still testing with previous pr to make sure it solves android auto and syncing issues.

Update: tested throughout the day and not seeing any increased battery usage. Still working great and listening sessions are being recorded in server.

Screenshots

screen-20250723-181241.3.mp4

…resumed after being killed either in the app switcher by the user or in the background. This means the service tracking/syncronizing progress isn't updated either and the UI doesn't have an active player. With this change the playstate is synced when the app is resumed and the ui service is ready.
@AwsomeFox AwsomeFox changed the title Realized the playstate is not synced with UI when the application is … Fix: sync playstate when app resumes Jul 23, 2025
@AwsomeFox AwsomeFox marked this pull request as ready for review July 24, 2025 22:58
… server session if no local session is found.

Added playback state sync for android auto so the playback can always resume from local/local session with remote media/ or most rescent server session.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant