Adjust logic for calculating 'Days in a row' stat to not require listening on the current day.
I usually listen at the end of the day, so this allows viewing the stat before you've listened for the day.
Which issue is fixed?
N/A - no associated issue currently
Pull Request Type
Platform: both
Layer: frontend
In-depth Description
Changes day counting logic to start counting from yesterday instead of today, so that there doesn't need to be any activity for the current day.
If there is activity for the current day this is counted at the end once the last day with no activity has been found.
How have you tested this?
Set some temporary test data in the ApiRouter.getUserListeningStatsHelpers method to mock appropriate activity on dates:
Screenshots
No visual changes, only change is to the value shown for "Days in a row".
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/advplyr/audiobookshelf-app/pull/1732
**Author:** [@jamerst](https://github.com/jamerst)
**Created:** 11/21/2025
**Status:** ✅ Merged
**Merged:** 11/23/2025
**Merged by:** [@advplyr](https://github.com/advplyr)
**Base:** `master` ← **Head:** `days-in-a-row-today-optional`
---
### 📝 Commits (1)
- [`b8fa041`](https://github.com/advplyr/audiobookshelf-app/commit/b8fa041dcbe73c62fa6cd7555b4d1aa762de56a7) Don't require listening today for 'Days in a row' stat
### 📊 Changes
**1 file changed** (+8 additions, -2 deletions)
<details>
<summary>View changed files</summary>
📝 `components/stats/DailyListeningChart.vue` (+8 -2)
</details>
### 📄 Description
<!--
For Work In Progress Pull Requests, please use the Draft PR feature,
see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for further details.
If you do not follow this template, the PR may be closed without review.
Please ensure all checks pass.
If you are a new contributor, the workflows will need to be manually approved before they run.
-->
## Brief summary
<!-- Please provide a brief summary of what your PR attempts to achieve. -->
**Mirror of changes for https://github.com/advplyr/audiobookshelf/pull/4770**
Adjust logic for calculating 'Days in a row' stat to not require listening on the current day.
I usually listen at the end of the day, so this allows viewing the stat before you've listened for the day.
## Which issue is fixed?
<!-- Which issue number does this PR fix? Ex: "Fixes #1234" -->
N/A - no associated issue currently
## Pull Request Type
<!--
Does this affect only Android, only iOS, or both?
Does this change the frontend or the backend of the apps?
-->
Platform: both
Layer: frontend
## In-depth Description
<!--
Describe your solution in more depth.
How does it work? Why is this the best solution?
Does it solve a problem that affects multiple users or is this an edge case for your setup?
-->
Changes day counting logic to start counting from yesterday instead of today, so that there doesn't need to be any activity for the current day.
If there is activity for the current day this is counted at the end once the last day with no activity has been found.
## How have you tested this?
<!-- Please describe in detail with reproducible steps how you tested your changes. -->
Set some temporary test data in the ApiRouter.getUserListeningStatsHelpers method to mock appropriate activity on dates:
<img width="336" height="139" alt="image" src="https://github.com/user-attachments/assets/06fd7fd4-f90b-412c-9d82-5b96585f5234" />
## Screenshots
<!-- If your PR includes any changes to the front-end, please include screenshots or a
short video from before and after your changes. -->
No visual changes, only change is to the value shown for "Days in a row".
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/advplyr/audiobookshelf-app/pull/1732
Author: @jamerst
Created: 11/21/2025
Status: ✅ Merged
Merged: 11/23/2025
Merged by: @advplyr
Base:
master← Head:days-in-a-row-today-optional📝 Commits (1)
b8fa041Don't require listening today for 'Days in a row' stat📊 Changes
1 file changed (+8 additions, -2 deletions)
View changed files
📝
components/stats/DailyListeningChart.vue(+8 -2)📄 Description
Brief summary
Mirror of changes for https://github.com/advplyr/audiobookshelf/pull/4770
Adjust logic for calculating 'Days in a row' stat to not require listening on the current day.
I usually listen at the end of the day, so this allows viewing the stat before you've listened for the day.
Which issue is fixed?
N/A - no associated issue currently
Pull Request Type
Platform: both
Layer: frontend
In-depth Description
Changes day counting logic to start counting from yesterday instead of today, so that there doesn't need to be any activity for the current day.
If there is activity for the current day this is counted at the end once the last day with no activity has been found.
How have you tested this?
Set some temporary test data in the ApiRouter.getUserListeningStatsHelpers method to mock appropriate activity on dates:

Screenshots
No visual changes, only change is to the value shown for "Days in a row".
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.