Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Progress Sync between Web and Android not working correctly when using downloaded book #808

Closed
1 task done
Alistair1231 opened this issue Jul 25, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@Alistair1231
Copy link

Alistair1231 commented Jul 25, 2023

Steps to reproduce

  1. Play downloaded audiobook on Phone, then Pause
  2. Play in Browser at PC, then pause
  3. Continue on Phone

Expected behaviour

  • Phone should resume last position from browser

Actual behaviour

  • Phone doesn't even see the progress from the browser
  • What is curious is, that it shows 19 minutes of playback in the first picture as its latest entry. That is incorrect.
    • However, if you add the 1h11m duration from the PC and add it to the last time of the Phone, you get the correct time. So maybe it got confused with the timestamps? But that doesn't explain why the PC time isn't even visible on the Phone.

Click to see pictures

EDIT: as an addition, I want to mention, that this seems to be a problem with downloaded books. If I press the Cast button, and then just close it without actually casting to a device, that forces the player to use the remote book instead of the local one. When doing that, it does jump to the correct place.

Environment data

Audiobookshelf Version: v2.3.3 (docker)

  • Android App: version 0.9.65-beta

Android Issue

Android version:
Android 13

Device model:
Xiaomi Pocophone F2 Pro

Stock or customized system:
Lineage OS 20, no root

@Alistair1231 Alistair1231 added the bug Something isn't working label Jul 25, 2023
@Alistair1231 Alistair1231 changed the title [Bug]: Progress Sync between Web and Android still not working correctly. [Bug]: Progress Sync between Web and Android not working correctly. Jul 26, 2023
@Alistair1231 Alistair1231 changed the title [Bug]: Progress Sync between Web and Android not working correctly. [Bug]: Progress Sync between Web and Android not working correctly when using downloaded book Jul 26, 2023
@nichwall
Copy link
Contributor

To clarify, you are not closing the player on the phone while you listen on the computer? You're only pausing the phone

@Alistair1231
Copy link
Author

Yes. I only pause the playback. Generally it goes like this:

  1. Play on Phone
  2. Pause Phone, and minimize app by using home button (not closing in task switcher and not double pressing back button)
  3. Go to PC and listen in browser for a while, generally at least 20 min
  4. Pause playback in browser, while generally keeping the tab open
  5. Go to phone and resume playback. It doesn't recognize the play time from PC.

I did some trial and error now after your question and I have gotten some interesting results!
It seems that the issue might be somehow related to the app being either closed, or frozen by battery optimizations of the phone.

If I keep the app open and on screen, while I have active playback on the PC, it syncs perfectly without issues, every 10s it jumps forwards and shows the sync in the history.

However if I close the app using the task switcher, and then have playback on PC, then it looses track of the playback and does not properly sync back up once I restart the app and start playback.

In these trials it did receive the playback position from the PC in it's history however, so I could jump back to the correct position with a click on the history entry. This was not the case initially. It happened multiple times, that the app just did not recognize any other playback. So there might be layers to this, however what was easily reproducible, was that it never continued at the correct position, if playback occurred while the app was closed.

My assumption is, that due to Android's battery optimizations, the app gets frozen or killed after a while and that breaks the sync.

@advplyr
Copy link
Owner

advplyr commented Sep 10, 2023

I was able to reproduce this and it will be fixed in the next release

@advplyr
Copy link
Owner

advplyr commented Sep 19, 2023

Fixed in v0.9.66-beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants