LeoKlaus / plappa

An Audiobook client for Jellyfin and AudioBookShelf, written in Swift/SwiftUI.
https://plappa.me
210 stars 1 forks source link

[BUG] CarPlay resets to 0:00 frequently #142

Closed sevenlayercookie closed 2 months ago

sevenlayercookie commented 3 months ago

Describe the bug

UPDATE: this seems to possibly only be reproducible with downloaded audiobooks.

CarPlay (and lockscreen and control center mini player) seekbar frequently resets to 0:00 when using the app and CarPlay simultaneously.

To Reproduce Steps to reproduce the behavior:

  1. Close Plappa on phone
  2. Open Plappa on CarPlay
  3. Play audiobook on CarPlay
  4. Open Plappa on phone
  5. Press play button on phone app
  6. Watch CarPlay reset to zero

Expected behavior CarPlay and phone app should remain synced, regardless of which controls are used.

Screenshots this demonstrates on the Lock Screen, since the CarPlay screen and the Lock Screen behave the same in this situation

https://github.com/LeoKlaus/plappa/assets/15989705/09a2120b-3c6f-4cfa-a7b8-c3a641a973fa

Logs Logs seem unrevealing

Logs ``` [6/26/2024, 10:42 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:42 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:42 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:42 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:42 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:42 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:42 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully posted session [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:43 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates [6/26/2024, 10:44 PM] [AudioBookShelfAPIHandler] Successfully pushed playbackstates ```

Environment(please complete the following information):

Additional context

LeoKlaus commented 3 months ago

Thank you for the detailed report. Even with your instructions, I haven't been able to reproduce this once (I'm also on 18 beta 2). Is this behavior reliably reproducible on your device using the steps?

I've just pushed a very small update to TestFlight (1.3.0. build 14), that removed a redundant setting of the now playing information. Can you check if this changes anything?

sevenlayercookie commented 3 months ago

Thank you for the detailed report.

Even with your instructions, I haven't been able to reproduce this once (I'm also on 18 beta 2). Is this behavior reliably reproducible on your device using the steps?

I've just pushed a very small update to TestFlight (1.3.0. build 14), that removed a redundant setting of the now playing information. Can you check if this changes anything?

Won't be at my CarPlay enabled car for a week or so to test, but it looks like the issue still happens in the Lock Screen and control center even if I'm not connected to CarPlay. I'm on the new build you pushed.

sevenlayercookie commented 2 months ago

@LeoKlaus I have noticed that this bug seems to only affect downloaded audiobooks (e.g. same audiobook works fine when streaming, but as soon as I download, it does the skipping bug.

Have you tried to reproduce this bug with a downloaded Audiobook?

LeoKlaus commented 2 months ago

Thank you very much for the update! I'll see if I can reproduce it that way.

Regardless, this information is very valuable.

rmusic10891 commented 2 months ago

I have also been experiencing this, on version 1.4. Happy to share any information you need.

LeoKlaus commented 2 months ago

I was finally able to reproduce this with a downloaded book. I've just released an update to TestFlight that should fix the issue (and some other issues causing the displayed time to be wrong).

Let me know if it worked :)

sevenlayercookie commented 2 months ago

Nicely done, that solved it! Thank you! Cheers