prologueapp / Prologue

Issue tracker for Prologue, the self-hosted audiobook app.
https://prologue.audio
28 stars 0 forks source link

ABS 2.13.+ no longer syncs progress #66

Open Unending opened 2 months ago

Unending commented 2 months ago

Starting from 2.13.0 (tested each release since) progress is no longer saved in ABS. Strange thing is the time remaining properly updates in ABS but the % played doesn't.

When refreshing the server in Prologue and resuming playback, the file resumes at the time of upgrading from to 2.13.x.

Prologue logging shows some errors uploading album progress:

[09-10 14:58:37:467] [N] [library ] Performing full progress sync
[09-10 14:58:37:617] [N] [download] No downloaded files found, exiting early
[09-10 14:58:55:653] [N] [download] No downloaded files found, exiting early
[09-10 14:59:24:648] [E] [playback] Not playing - can't update nowPlayingInfoCenter.
[09-10 14:59:25:464] [N] [library ] Uploading album progress for album: 2136
[09-10 14:59:31:147] [N] [library ] Uploading album progress for album: 2136
[09-10 15:00:28:331] [N] [library ] Uploading album progress for album: 2136
[09-10 15:01:28:372] [N] [library ] Uploading album progress for album: 2136
[09-10 15:02:28:637] [N] [library ] Uploading album progress for album: 2136
[09-10 15:03:28:920] [N] [library ] Uploading album progress for album: 2136
[09-10 15:04:29:180] [N] [library ] Uploading album progress for album: 2136
[09-10 15:05:17:420] [N] [library ] Uploading album progress for album: 2136
[09-10 15:05:17:457] [N] [library ] Uploading album progress for album: 2136
[09-10 15:05:17:468] [E] [audioboo] /Users/lcharlick/Developer/Prism/Packages/Models/Sources/Models/Library/Sources/AudiobookshelfLibrarySource.swift:254 Failed to upload album progress - cancelled
[09-10 15:05:17:468] [E] [library ] Failed to upload album progress: cancelled
[09-10 15:09:52:388] [N] [playback] Current track progress changed
[09-10 15:09:52:389] [N] [playback] Seeking to 3534.662907
[09-10 15:09:55:383] [N] [library ] Uploading album progress for album: 2136
[09-10 15:09:59:720] [N] [library ] Uploading album progress for album: 2136
[09-10 15:09:59:774] [N] [library ] Uploading album progress for album: 2136
[09-10 15:09:59:777] [E] [audioboo] /Users/lcharlick/Developer/Prism/Packages/Models/Sources/Models/Library/Sources/AudiobookshelfLibrarySource.swift:254 Failed to upload album progress - cancelled
[09-10 15:09:59:777] [E] [library ] Failed to upload album progress: cancelled
[09-10 15:17:38:169] [N] [library ] Performing full progress sync
[09-10 15:17:38:253] [I] [library ] Fetching album progress for resource: Audiobookshelf
[09-10 15:17:38:479] [N] [download] No downloaded files found, exiting early
[09-10 15:17:40:478] [I] [playback] Player rate changed: 1.750000
[09-10 15:17:40:482] [I] [playback] Setting MPNowPlayingInfoCenter: ["artwork": <MPMediaItemArtwork: 0x30058ce40>, "albumTitle": "The Perfect Run 3", "MPNowPlayingInfoPropertyElapsedPlaybackTime": 3538.917517813, "MPNowPlayingInfoPropertyMediaType": 1, "artist": "Void Herald", "MPNowPlayingInfoPropertyDefaultPlaybackRate": 1.75, "title": "Chapter 4", "MPNowPlayingInfoPropertyPlaybackRate": 1.75, "playbackDuration": 65673.602]
[09-10 15:17:40:482] [I] [playback] Time control status changed: waitingToPlayAtSpecifiedRate
[09-10 15:17:40:489] [I] [playback] Setting MPNowPlayingInfoCenter: ["artwork": <MPMediaItemArtwork: 0x30058ce40>, "albumTitle": "The Perfect Run 3", "MPNowPlayingInfoPropertyElapsedPlaybackTime": 3538.917517813, "MPNowPlayingInfoPropertyMediaType": 1, "artist": "Void Herald", "MPNowPlayingInfoPropertyDefaultPlaybackRate": 1.75, "title": "Chapter 4", "MPNowPlayingInfoPropertyPlaybackRate": 1.75, "playbackDuration": 65673.602]
[09-10 15:17:40:490] [N] [library ] Uploading album progress for album: 2136
[09-10 15:17:40:529] [I] [playback] Time control status changed: playing
[09-10 15:17:40:531] [I] [playback] Setting MPNowPlayingInfoCenter: ["artwork": <MPMediaItemArtwork: 0x30058ce40>, "albumTitle": "The Perfect Run 3", "MPNowPlayingInfoPropertyElapsedPlaybackTime": 3538.917517813, "MPNowPlayingInfoPropertyMediaType": 1, "artist": "Void Herald", "MPNowPlayingInfoPropertyDefaultPlaybackRate": 1.75, "title": "Chapter 4", "MPNowPlayingInfoPropertyPlaybackRate": 1.75, "playbackDuration": 65673.602]
[09-10 15:17:54:752] [I] [playback] Seeking forwards 30 seconds
[09-10 15:17:54:877] [N] [library ] Uploading album progress for album: 2136
[09-10 15:17:55:244] [I] [playback] Seeking forwards 30 seconds
[09-10 15:17:55:351] [N] [library ] Uploading album progress for album: 2136
[09-10 15:17:55:727] [I] [playback] Seeking forwards 30 seconds
[09-10 15:17:55:840] [N] [library ] Uploading album progress for album: 2136
[09-10 15:17:56:652] [I] [playback] Seeking forwards 30 seconds
[09-10 15:17:56:764] [N] [library ] Uploading album progress for album: 2136
[09-10 15:17:57:101] [I] [playback] Seeking forwards 30 seconds
[09-10 15:17:57:205] [N] [library ] Uploading album progress for album: 2136
[09-10 15:18:40:654] [N] [library ] Uploading album progress for album: 2136
[09-10 15:18:57:644] [N] [library ] Performing full progress sync
[09-10 15:18:57:700] [I] [library ] Fetching album progress for resource: Audiobookshelf
[09-10 15:18:57:945] [N] [download] No downloaded files found, exiting early
[09-10 15:19:00:713] [I] [playback] Player rate changed: 0.000000
[09-10 15:19:00:713] [I] [playback] Setting MPNowPlayingInfoCenter: ["artwork": <MPMediaItemArtwork: 0x30050f260>, "albumTitle": "The Perfect Run 3", "MPNowPlayingInfoPropertyElapsedPlaybackTime": 3825.541549085, "MPNowPlayingInfoPropertyMediaType": 1, "artist": "Void Herald", "MPNowPlayingInfoPropertyDefaultPlaybackRate": 1.75, "title": "Chapter 4", "MPNowPlayingInfoPropertyPlaybackRate": 0.0, "playbackDuration": 65673.602]
[09-10 15:19:00:713] [I] [playback] Time control status changed: paused
[09-10 15:19:00:715] [I] [playback] Setting MPNowPlayingInfoCenter: ["artwork": <MPMediaItemArtwork: 0x30050f260>, "albumTitle": "The Perfect Run 3", "MPNowPlayingInfoPropertyElapsedPlaybackTime": 3825.541549085, "MPNowPlayingInfoPropertyMediaType": 1, "artist": "Void Herald", "MPNowPlayingInfoPropertyDefaultPlaybackRate": 1.75, "title": "Chapter 4", "MPNowPlayingInfoPropertyPlaybackRate": 0.0, "playbackDuration": 65673.602]
[09-10 15:19:00:715] [N] [library ] Uploading album progress for album: 2136
[09-10 15:19:00:735] [N] [library ] Uploading album progress for album: 2136
[09-10 15:19:00:751] [E] [audioboo] /Users/lcharlick/Developer/Prism/Packages/Models/Sources/Models/Library/Sources/AudiobookshelfLibrarySource.swift:254 Failed to upload album progress - cancelled
[09-10 15:19:00:751] [E] [library ] Failed to upload album progress: cancelled

Currently versions ABS: 2.13.4 Prologue: 10026

Downgrading to 2.12.3 fixes this issue.

jasonmajor commented 2 months ago

Confirming this issue arises with update to 2.13.4. I have’t downgrade yet, but I noticed this same issue is occurring with t the abs web interface too. i suspect this is not a prologue issue.

Amending this, I also see the error. I narrowed my issue down to my prologue app being open while switching back and forth between web interface on my pc. There is something that prologue is doing to reset progress.

Unending commented 2 months ago

Ah, I don't use the web interface and didn't test that, but can confirm. I searched the ABS repo before posting, since v2.13 has been out 2 weeks and I didn't find a similar issue I wrongly assumed it was Prologue.

I made an issue on the ABS repo: advplyr/audiobookshelf#3403

Unending commented 2 months ago

So, after testing the web client for more than 30s it correctly updates in ABS.

But issue still remains when playing from Prologue.

Drudoo commented 2 months ago

I’m also seeing this issue on prologue only. Web and other ABS clients works fine but prologue doesn’t save / sync the progress.

justcallmelarry commented 2 months ago

You can also do progress updates via the sessions endpoints for 2.13+, not sure how far back that functionality goes, though.

jby commented 2 months ago

I've listened to 6h 30min over Fri,Sat,Sun so far:

image
Unending commented 2 months ago

@jby That has been the case since before this issue with v2.13, see #49

justcallmelarry commented 2 months ago

sending in something like this for downloaded media also updates the progress, and also adds sessions to the stats:

{
  "date": "2024-09-17",
  "id": "E4C8CD16-FF6E-4786-B3F4-6D26C74DB9D4",
  "deviceInfo": {
    "osName": "iOS",
    "clientVersion": "1.0.0",
    "osVersion": "17.6.1",
    "clientName": "PrologueApp"
  },
  "playmethod": 3,
  "episodeId": null,
  "mediaMetadata": {
    "genres": [],
    "title": "Countdown"
  },
  "dayOfWeek": "Tuesday",
  "duration": 47617.091338,
  "startedAt": 1726583419045,
  "updatedAt": 1726585041382,
  "displayTitle": "Countdown",
  "libraryItemId": "cfe9317f-ae81-44d5-96bb-5346f7837b2f",
  "currentTime": 1200.006103515625,
  "libraryId": "d0fd07e9-8a18-4dff-be24-9b5fbbda5796",
  "mediaType": "book",
  "timeListening": 1200.006103515625,
  "startTime": 0,
  "displayAuthor": "Sean Oswald"
}

also looks like the other endpoints for non-downloaded media update the progress, so the use of the progress endpoints seem a bit superfluous

pjope commented 2 weeks ago

i can confirm the same problem. Sync was working well here until i played the audiobook from the web interface. After this the position jumped at the audiobook in the Prologue app randomly. The new wrong positions where not synced to ABS. ABS version was over v2.13.

pjope commented 2 weeks ago

The newest release solved the problem on my side.