advplyr / audiobookshelf-app

Mobile application for Audiobookshelf
https://audiobookshelf.org
GNU General Public License v3.0
1.33k stars 174 forks source link

[Bug]: Audiobook & Podcast Position Not Syncing/Saving #1298

Open feerlessleadr opened 3 months ago

feerlessleadr commented 3 months ago

What was the Problem?

I can't quite pinpoint why, but over the last several months my Android app will randomly get a red exclamation point on the cover of the book or podcast that I'm listening to (while I'm in the middle of listening), and the progress will no longer sync to the server.

Once I realize, I sometimes have listening to 30 minutes or more, and I need to manually go back and find the point of the book that I stopped at on the next listening session.

Steps to Reproduce the Issue

I wish I could tell you what I do to cause this, but it seemingly happens at random. I believe it has something to do with the ABS app temporarily losing connection to my server (it will often happen when I'm listening to a book in my car pulling out of my driveway, and although the book doesn't stop, probably 25% of the time, I will get the red exclamation point).

It also happens however when I'm just sitting in my house on wifi. Perhaps it could be related to when I'm walking around my house and hopping from AP to AP.

The stream doesn't stop or otherwise indicate any issue, but the red exclamation point will show up.

What was Expected?

Not to overwite the local position on the app in favor of the position saved on the server that is usually at least minutes (and sometimes over an hour) behind the position on my phone.

Phone Model

OnePlus 12 (also happened on OnePlus 8T 5G

Phone OS

Android 14

Audiobookshelf App Version

Android App - 0.9.76

Installation Source

Google Play Store

Additional Notes

I have tried to capture in a log, but since I can't figure out exactly what is causing the issue, I'm not able to debug without running the debug log 24/7.

Edridi commented 2 months ago

Hello, Doesn't the problem only occur with downloaded books?

feerlessleadr commented 2 months ago

The only occurs for streaming books as far as I can tell.

It seems to happen more often then not when I leave a book "open" in the app for a while. When I come back to play the open book (usually a few hours later at least), I would say 50% of the time I get the red exclamation point.

I haven't notice it happening when I purposefully close the book and then have to reopen it when I want to listen again.

webs86 commented 2 months ago

Hi, I have same problem and I can confirm this occours also for downloaded book.

SkyRaptorian commented 1 month ago

Hi I suspect that you have the same issue as me in which the app will only keep track of one unsynced listening session and not track any further progress.

I am on android and everything is updated to latest. (Server is docker instance)

Steps to reproduce.

  1. Download an audiobook to the app.
  2. Listen to the audiobook offline for a period of time. (My sessions are generally an hour or more.)
  3. Close the app and don't reconnect to the server. Leave it long enough that the next session is seperate. My normal listening is once a day but I imagine that it could be shorter.
  4. Open the app and while still offline start a second listening session. (Again normally an hour or two)
  5. Reconnect to the server.

At this point the listening progress will be reset to the first session (step 2), losing any progress that was made in the later sessions.

This seems to line up with what feerlessleadr was experiencing when leaving the book open even when online. Maybe it doesn't start a new session unless you reopen the book?

My interim solution has been to have a server sync in between but I often forget and have to remember where it was to manually seek it back.