advplyr / audiobookshelf-app

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

[Bug]: Book starts playback at beginning despite progress displaying correctly in the app #1312

Open papodaca opened 2 months ago

papodaca commented 2 months ago

What was the Problem?

Book that is in local media starts playback at beginning position despite progress displaying correctly in the app.

Steps to Reproduce the Issue

  1. have a book with playback progress
  2. add the book to local media (verified that if I delete the local item, the playback resumes from the correct position)
  3. Wait for app to connect to server and load latest state from server.
  4. Start playback.

What was Expected?

The book should start at the stored and displayed progress position.

Phone Model

Motorola g32

Phone OS

Android 14 (LineageOS)

Audiobookshelf App Version

Android App - 0.9.76

Installation Source

Google Play Store

Additional Notes

I believe I am enrolled in the Google Play beta program for this app if that makes any difference. version displayed in the app is 0.9.76-beta, server version v2.13.3

nichwall commented 2 months ago

This seems like a problem with the file, as streaming works correctly but local playback does not.

When you are streaming, does the top of the player say "Direct" at the top?

papodaca commented 2 months ago

Indeed it does say "direct", and after redownloading it now says "local" and started at the correct position. It even starts at the correct position if I start the app fresh. Local playback did work, as in I could hear the beginning of the book and progress position was not respected. Just some more information, I do most of my listening via desktop browser and occasionally try to pick back up on mobile, when progress syncs properly.

mihailim commented 2 months ago

After you download the audiobook to local storage and go to it but before initiating playback, does it by any chance say the following on a yellowish background?

Media is linked to this server but was downloaded by a different user. Progress will only be synced to the user that downloaded it.

I've noticed that happening since upgrading the server to 2.13.2.

Update: For what it's worth, I solved the specific issue I mentioned above in this comment by basically nuking all local app data -- deleted all locally downloaded items, deleted app cache and storage, logged in again, downloaded the books again, and the issue is gone. I have a feeling this may be related to #773 (since in Android's permissions view the app didn't have any permissions requested, but there seems to be no way of forcing the app to re-request them) even though I was using local app storage instead of a different folder -- but that link to 773 is pure speculation on my part.