[Bug]: Sessions between 00:00 to 05:00 show up in previous days stats #2699

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

Originally created by @ZLoth on GitHub (Apr 1, 2025).

What happened?

When listening from 00:00 to 05:00, the listening stats show up in the previous days accumulation.

What did you expect to happen?

One of the following:

  • The listening stats should accumulate based upon the start or end time of the listening session
  • A disclaimer is displayed showing

Steps to reproduce the issue

Start and end a listening session between 00:00 to 05:00. Then check the stats. The expected is that the current date listening minutes is incremented, but instead stay at 0 minutes for that day.

Audiobookshelf version

2.20.0

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?

Chrome

Logs

2025-04-01 00:02:52.992

DEBUG

[PlaybackSessionManager] syncSession "aa2c8b94-f201-4e71-b6f0-9d1d7d5c6aa6" (Device: Pixel 9 Pro SDK 35 / v0.9.79-beta) | Total Time Listened: 4926

Additional Notes

For this installation, the server is located in Central Time Zone, which is UTC -5. Not sure if this has any relation to the issue.

Checked the time in the Docker container:

Image

Screen shot of stats:

Image

Settings → Listening Session:

Image

Originally created by @ZLoth on GitHub (Apr 1, 2025). ### What happened? When listening from 00:00 to 05:00, the listening stats show up in the previous days accumulation. ### What did you expect to happen? One of the following: - The listening stats should accumulate based upon the start or end time of the listening session - A disclaimer is displayed showing ### Steps to reproduce the issue Start and end a listening session between 00:00 to 05:00. Then check the stats. The expected is that the current date listening minutes is incremented, but instead stay at 0 minutes for that day. ### Audiobookshelf version 2.20.0 ### 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? Chrome ### Logs ```shell 2025-04-01 00:02:52.992 DEBUG [PlaybackSessionManager] syncSession "aa2c8b94-f201-4e71-b6f0-9d1d7d5c6aa6" (Device: Pixel 9 Pro SDK 35 / v0.9.79-beta) | Total Time Listened: 4926 ``` ### Additional Notes For this installation, the server is located in Central Time Zone, which is UTC -5. Not sure if this has any relation to the issue. Checked the time in the Docker container: ![Image](https://github.com/user-attachments/assets/261b3887-f4d4-4362-8f74-2fee676009a2) Screen shot of stats: ![Image](https://github.com/user-attachments/assets/027c2457-0827-4cef-a240-cb3a1950607b) Settings → Listening Session: ![Image](https://github.com/user-attachments/assets/86a8ed6c-7a30-4ff3-87bc-6577025a9366)
adam added the bug label 2026-04-25 00:09:41 +02:00
adam closed this issue 2026-04-25 00:09:41 +02:00
Author
Owner

@ZLoth commented on GitHub (Apr 1, 2025):

Tested again by playing against Chrome browser.... this time is registered:

2025-04-01 00:30:04.160

DEBUG

[PlaybackSessionManager] syncSession "715b4512-60b6-4ccc-b690-da04d38faae3" (Device: Windows 10 / Chrome) | Total Time Listened: 111

Image

@ZLoth commented on GitHub (Apr 1, 2025): Tested again by playing against Chrome browser.... this time is registered: 2025-04-01 00:30:04.160 DEBUG [PlaybackSessionManager] syncSession "715b4512-60b6-4ccc-b690-da04d38faae3" (Device: Windows 10 / Chrome) | Total Time Listened: 111 ![Image](https://github.com/user-attachments/assets/027e0ac7-0b45-49da-91f2-db6bf25fa904)
Author
Owner

@ZLoth commented on GitHub (Apr 1, 2025):

Testing again. from phone....

2025-04-01 00:40:24.400

DEBUG

[PlaybackSessionManager] syncSession "dcee8299-1320-4112-914d-8a5bc1b73071" (Device: Pixel 9 Pro SDK 35 / v0.9.79-beta) | Total Time Listened: 375

2025-04-01 00:40:24.591

DEBUG

[ApiCacheManager] mediaProgress.afterUpdate: Clearing cache

2025-04-01 00:40:24.594

DEBUG

[PlaybackSessionManager] syncSession "dcee8299-1320-4112-914d-8a5bc1b73071" (Device: Pixel 9 Pro SDK 35 / v0.9.79-beta) | Total Time Listened: 389

2025-04-01 00:40:24.653

DEBUG

[ApiCacheManager] Object.afterBulkUpdate: Clearing cache

2025-04-01 00:40:24.705

DEBUG

[ApiCacheManager] mediaProgress.afterUpdate: Clearing cache

2025-04-01 00:40:24.796

DEBUG

[ApiCacheManager] Object.afterBulkUpdate: Clearing cache

Image

But this time the stats were updated.

I guess this was opened in error then.

@ZLoth commented on GitHub (Apr 1, 2025): Testing again. from phone.... 2025-04-01 00:40:24.400 DEBUG [PlaybackSessionManager] syncSession "dcee8299-1320-4112-914d-8a5bc1b73071" (Device: Pixel 9 Pro SDK 35 / v0.9.79-beta) | Total Time Listened: 375 2025-04-01 00:40:24.591 DEBUG [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache 2025-04-01 00:40:24.594 DEBUG [PlaybackSessionManager] syncSession "dcee8299-1320-4112-914d-8a5bc1b73071" (Device: Pixel 9 Pro SDK 35 / v0.9.79-beta) | Total Time Listened: 389 2025-04-01 00:40:24.653 DEBUG [ApiCacheManager] Object.afterBulkUpdate: Clearing cache 2025-04-01 00:40:24.705 DEBUG [ApiCacheManager] mediaProgress.afterUpdate: Clearing cache 2025-04-01 00:40:24.796 DEBUG [ApiCacheManager] Object.afterBulkUpdate: Clearing cache ![Image](https://github.com/user-attachments/assets/88d901dd-4473-4e42-ad00-a75408c34606) But this time the stats were updated. I guess this was opened in error then.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2699