mattttvaughn / chronicle

GNU General Public License v3.0
217 stars 60 forks source link

Losing Playback Position #20

Closed runningslow81 closed 2 years ago

runningslow81 commented 2 years ago

When I have been listening to a book for awhile and then stop playing, when returning to the app it very frequently loses the playback position. When hitting play, it'll just restart from the beginning and not prompt me about "clearing your saved progress." I'll just wager a guess that this is related to my Plex server console reporting "Could not convert "playbackTime" ("1639074741393") to the correct type" every few seconds while I'm playing an audiobook.

mattttvaughn commented 2 years ago

Good intuition, I'd bet that's related. Thanks for sharing those logs.

That number would seem to indicate a 51 year long book. Looks like some wires might be crossed somewhere and a maybe a timestamp is getting passed in where progress ought to be?

A few questions that might make this more likely to get resolved more easily:

mattttvaughn commented 2 years ago

And thanks for reporting the issue!

runningslow81 commented 2 years ago

I guess that would have been important information to include!

Another thing to add. I can play the same audiobooks through the Plex Web app and I don't see these playbackTime errors in the Plex Console. I'll be happy to provide more logs or any other info needed.

KevinDenis commented 2 years ago

I am expierencing the same issue, I can share logs if needed

ScottBurfieldMills commented 2 years ago

The playbackTime mentioned by @runningslow81 is an epoch date.

I ran it through https://www.epochconverter.com/ and the date is roughly the same time as this post was made.

image

I'm struggling to find proper docs for the Plex API to figure out what this value is supposed to be.

edit: I've been distracted but the web UI shows a much smaller value when playing a tv show.

image

KevinDenis commented 2 years ago

I think this could be a good pointer for this issue on how to implement playback time value tracking correctly : https://github.com/Montellese/mediaimporter.plex/issues/2

mattttvaughn commented 2 years ago

Looks to be working to me now with thanks to the PR from @KevinDenis

runningslow81 commented 2 years ago

I'm still having the issue where the app loses my playback position on apk version 0.51.1.

Since it is so intermittent, I haven't been able to watch my Plex logs when it happens. I've tried, but it never happens when I'm watching. I appear to have narrowed it down to times when (for lack of a better term) there is NOT a book "Now Playing." It would happen at times when browsing the library and pressing the play button on a book with an already established playtime. Its not every time and it doesn't happen often, but it only appears to happen in this circumstance.

I did get in the habit of recording my phone screen every time I went to restart listening and caught it happening that way.

If this worked right, this video shows normal operation of a book on the "Now Playing" screen. https://user-images.githubusercontent.com/95879270/156052896-5d6f7968-a8e0-4650-98da-38386ba8175f.mp4

This video shows the same book showing a play position of 19:28:03 and then starting at Chapter 1 when play is pressed. https://user-images.githubusercontent.com/95879270/156052910-e841cf69-1d8e-4643-a31f-13dc791c142b.mp4