[Bug]: API progress failed ! set "finishedAt" to today and not to value of parameter #2645

Closed
opened 2026-04-25 00:09:13 +02:00 by adam · 6 comments
Owner

Originally created by @Gru0810 on GitHub (Mar 10, 2025).

What happened?

I listening hundreds of audiobook in the past and i logged the the "finished at" in e seperate document.
I was able to transfer some of these information to ABS by using API Progress but in the current version 2.19.5 the API progress set always today as finished at:

Image

Image

This is my code and the correct statement (It works)

Image

I let run a bulk load on 07.04.2024 for 630 Audiobookand all works fine with Version 2.8.0:

Image

What did you expect to happen?

When I will set "finishedAt" to 02.03.2004" the "finishedAt" should be set to "02.03.2004" and not to "Today"

Steps to reproduce the issue

  1. Build code to set "finishedAt" by using api "progress" with "finishedAt" = "31.05.2013" -> "finishedAt": 1370563200000
  2. execute code
  3. check result in WebGUI, finishedAt will be "today"

Audiobookshelf version

2.19.5

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Linux

If the issue is being seen in the UI, what browsers are you seeing the problem on?

None

Logs


Additional Notes

No response

Originally created by @Gru0810 on GitHub (Mar 10, 2025). ### What happened? I listening hundreds of audiobook in the past and i logged the the "finished at" in e seperate document. I was able to transfer some of these information to ABS by using API Progress but in the current version 2.19.5 the API progress set always today as finished at: ![Image](https://github.com/user-attachments/assets/b3f7db83-2856-4e36-8f35-9c62e5a5df16) ![Image](https://github.com/user-attachments/assets/0eafcdaa-f5d1-4601-a2f9-1ee6a292606d) This is my code and the correct statement (It works) ![Image](https://github.com/user-attachments/assets/65ca2df3-027f-4120-b4fb-45aaae84f43a) I let run a bulk load on 07.04.2024 for 630 Audiobookand all works fine with Version 2.8.0: ![Image](https://github.com/user-attachments/assets/b7da53a0-1a91-40cb-8542-07ff63a7dfbd) ### What did you expect to happen? When I will set "finishedAt" to 02.03.2004" the "finishedAt" should be set to "02.03.2004" and not to "Today" ### Steps to reproduce the issue 1. Build code to set "finishedAt" by using api "progress" with "finishedAt" = "31.05.2013" -> "finishedAt": 1370563200000 2. execute code 3. check result in WebGUI, finishedAt will be "today" ### Audiobookshelf version 2.19.5 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Linux ### If the issue is being seen in the UI, what browsers are you seeing the problem on? None ### Logs ```shell ``` ### Additional Notes _No response_
adam added the bug label 2026-04-25 00:09:13 +02:00
adam closed this issue 2026-04-25 00:09:13 +02:00
Author
Owner

@Vito0912 commented on GitHub (Mar 10, 2025):

This could be connected to https://github.com/advplyr/audiobookshelf/blob/master/server/models/MediaProgress.js#L186. When updating a progress that already exists, it does not pass the finishedAt parameter like it does here: https://github.com/advplyr/audiobookshelf/blob/master/server/models/User.js#L714.
But could also be that it needs the format like 2025-03-10T15:30:45.123Z. I am not that much into JS data structures.

Like the passion for Excel VBA xD

@Vito0912 commented on GitHub (Mar 10, 2025): This could be connected to https://github.com/advplyr/audiobookshelf/blob/master/server/models/MediaProgress.js#L186. When updating a progress that already exists, it does not pass the finishedAt parameter like it does here: https://github.com/advplyr/audiobookshelf/blob/master/server/models/User.js#L714. But could also be that it needs the format like `2025-03-10T15:30:45.123Z`. I am not that much into JS data structures. Like the passion for Excel VBA xD
Author
Owner

@Gru0810 commented on GitHub (Mar 10, 2025):

It's not a wrong format. I hade to convert 2013-06-07 to 1370563200000 for using in HTTP request:
{"isFinished":true ,"startedAt": 1369958400000,"finishedAt": 1370563200000,"duration":21805.061223,"currentTime":21805.061223}
( based on : https://api.audiobookshelf.org/#create-update-media-progress)

And there is no existing Progress in ABS.
Image

FYI : It's not MS Excel , I build a big master-App in MS Access ;)

@Gru0810 commented on GitHub (Mar 10, 2025): It's not a wrong format. I hade to convert 2013-06-07 to 1370563200000 for using in HTTP request: {"isFinished":true ,"startedAt": 1369958400000,"finishedAt": 1370563200000,"duration":21805.061223,"currentTime":21805.061223} ( based on : https://api.audiobookshelf.org/#create-update-media-progress) And there is no existing Progress in ABS. ![Image](https://github.com/user-attachments/assets/c2a14edd-b43a-4504-99fc-096d26b390ca) FYI : It's not MS Excel , I build a big master-App in MS Access ;)
Author
Owner

@Vito0912 commented on GitHub (Mar 10, 2025):

Yes, I still believe that it has to do with progress that is not created but only modified. If I am back home I will test it a bit and make a PR if that’s the case. (Also not that the API Docs do not represent the current state of the endpoints. Most still are correct, but there are new/modified for some)

And how could I mix up access with Excel, oh no. But still the same pain shit editor xD

@Vito0912 commented on GitHub (Mar 10, 2025): Yes, I still believe that it has to do with progress that is not created but only modified. If I am back home I will test it a bit and make a PR if that’s the case. (Also not that the API Docs do not represent the current state of the endpoints. Most still are correct, but there are new/modified for some) And how could I mix up access with Excel, oh no. But still the same pain shit editor xD
Author
Owner

@nichwall commented on GitHub (Mar 10, 2025):

This is already fixed by https://github.com/advplyr/audiobookshelf/pull/3546

@nichwall commented on GitHub (Mar 10, 2025): This is already fixed by https://github.com/advplyr/audiobookshelf/pull/3546
Author
Owner

@Vito0912 commented on GitHub (Mar 10, 2025):

This is already fixed by #3546

You are right. I did not see that PR. Still I created a PR to add this capability for doing it for books that already have a progress (My investigation was made on the main branch, so why this should still be valid)

@Vito0912 commented on GitHub (Mar 10, 2025): > This is already fixed by [#3546](https://github.com/advplyr/audiobookshelf/pull/3546) You are right. I did not see that PR. Still I created a PR to add this capability for doing it for books that already have a progress (My investigation was made on the main branch, so why this should still be valid)
Author
Owner

@nichwall commented on GitHub (Mar 10, 2025):

This is already fixed by #3546

You are right. I did not see that PR. Still I created a PR to add this capability for doing it for books that already have a progress (My investigation was made on the main branch, so why this should still be valid)

Ah thanks, I didn't notice that was only for newly created progress

@nichwall commented on GitHub (Mar 10, 2025): > > This is already fixed by [#3546](https://github.com/advplyr/audiobookshelf/pull/3546) > > You are right. I did not see that PR. Still I created a PR to add this capability for doing it for books that already have a progress (My investigation was made on the main branch, so why this should still be valid) Ah thanks, I didn't notice that was only for newly created progress
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2645