[PR #3777] [CLOSED] Fixed Day Calculation Logic for Stats Page #4080

Closed
opened 2026-04-25 00:18:14 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/3777
Author: @Vito0912
Created: 1/2/2025
Status: Closed

Base: masterHead: feat/fix-listening-days


📝 Commits (2)

📊 Changes

1 file changed (+11 additions, -1 deletions)

View changed files

📝 client/components/stats/Heatmap.vue (+11 -1)

📄 Description

Brief summary

The calculation of the days listened was based on the days with a displayed value. On a smaller scale, not all days of the last year were rendered. This PR changes the calculation of days to include those outside of the rendered days.

While I tried to incorporating the logic into the current loop, I failed because the day's position depends on "i," which would need to be expanded. Maybe I missed something, but the added burden of either going from back to front or adding logic that calculates the columns and rows based on the viewed days would significantly complicate the logic. Therefore some overhead is added by this PR

Which issue is fixed?

Discord

How have you tested this?

Mobile and Desktop, on a "Production" server


🔄 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/pull/3777 **Author:** [@Vito0912](https://github.com/Vito0912) **Created:** 1/2/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `feat/fix-listening-days` --- ### 📝 Commits (2) - [`a86f6d0`](https://github.com/advplyr/audiobookshelf/commit/a86f6d0b6d55a92dcd49348aeb943e6b670fdae8) fixed wrong days for heatmap - [`91181d7`](https://github.com/advplyr/audiobookshelf/commit/91181d7bf191c1580bca7702bc171a4e900f82fc) remove console.log ### 📊 Changes **1 file changed** (+11 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `client/components/stats/Heatmap.vue` (+11 -1) </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 The calculation of the days listened was based on the days with a displayed value. On a smaller scale, not all days of the last year were rendered. This PR changes the calculation of days to include those outside of the rendered days. While I tried to incorporating the logic into the current loop, I failed because the day's position depends on "i," which would need to be expanded. Maybe I missed something, but the added burden of either going from back to front or adding logic that calculates the columns and rows based on the viewed days would significantly complicate the logic. Therefore some overhead is added by this PR ## Which issue is fixed? Discord ## How have you tested this? Mobile and Desktop, on a "Production" server --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:18:14 +02:00
adam closed this issue 2026-04-25 00:18:14 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4080