[Enhancement]: Improved Listening Stats page #774

Open
opened 2026-04-24 23:21:10 +02:00 by adam · 12 comments
Owner

Originally created by @austinphilp on GitHub (Nov 21, 2022).

Describe the feature/enhancement

I'm a total stats junky, so one of the things I love about Audiobookshelf is the detailed listening stats it provides. There are a few areas of config/stats however that I think could be improved upon.

The simplest enhancement is to change the "Minutes Listening" stat to be a bit more dynamic. For avid listeners, this number becomes meaningless pretty quickly. I'm currently sitting at about 6,000 minutes listened after only a month of usage. I think it would be a lot more readable if we collapsed into large time units as the number grows, So "6,000 Minutes" becomes "4 days 4 hours" and so on.

The large enhancement that I had in mind, was adding a time range filter to the top bar of the page (the items finished, days listened, and minutes listening stats). So that you can see your stats over a particular time range. I think this would be particularly helpful for the many readers who like to set goals for books finished over a given period of time. Right now, the only way to see how many books I've read in the last week/month/year alone would be to go into the user details page and look at the "Saved Media Progress" counting manually from a given date.

We could add a simple drop down with sensible date range options ("All Time", "Last Week", "Last Month", "Last Year") and whichever option is selected defines the date range displayed. We could even update the Minutes Listening Graph to show more than a week at a time so you can see how your reading habits change throughout the month/year.

As before, happy to take this on myself if everyone agrees that it would be a worthwhile improvement and we have a consensus on how the UX should work!

Originally created by @austinphilp on GitHub (Nov 21, 2022). ### Describe the feature/enhancement I'm a total stats junky, so one of the things I love about Audiobookshelf is the detailed listening stats it provides. There are a few areas of `config/stats` however that I think could be improved upon. The simplest enhancement is to change the "Minutes Listening" stat to be a bit more dynamic. For avid listeners, this number becomes meaningless pretty quickly. I'm currently sitting at about 6,000 minutes listened after only a month of usage. I think it would be a lot more readable if we collapsed into large time units as the number grows, So "6,000 Minutes" becomes "4 days 4 hours" and so on. The large enhancement that I had in mind, was adding a time range filter to the top bar of the page (the items finished, days listened, and minutes listening stats). So that you can see your stats over a particular time range. I think this would be particularly helpful for the many readers who like to set goals for books finished over a given period of time. Right now, the only way to see how many books I've read in the last week/month/year alone would be to go into the user details page and look at the "Saved Media Progress" counting manually from a given date. We could add a simple drop down with sensible date range options ("All Time", "Last Week", "Last Month", "Last Year") and whichever option is selected defines the date range displayed. We could even update the Minutes Listening Graph to show more than a week at a time so you can see how your reading habits change throughout the month/year. As before, happy to take this on myself if everyone agrees that it would be a worthwhile improvement and we have a consensus on how the UX should work!
adam added the enhancement label 2026-04-24 23:21:10 +02:00
Author
Owner

@advplyr commented on GitHub (Nov 21, 2022):

I think this sounds good. We'll also need to expand on the API a bit so this data can be pulled efficiently.

Did you have a UI in mind for this already?

For reference, the first stats page was contributed in this discussion https://github.com/advplyr/audiobookshelf/discussions/167

@advplyr commented on GitHub (Nov 21, 2022): I think this sounds good. We'll also need to expand on the API a bit so this data can be pulled efficiently. Did you have a UI in mind for this already? For reference, the first stats page was contributed in this discussion https://github.com/advplyr/audiobookshelf/discussions/167
Author
Owner

@austinphilp commented on GitHub (Nov 21, 2022):

@advplyr Let me see if I can draft something up after work today! wasn't imagining anything too drastic, adding a dropdown near the top, and we'll want to add some clearer deliniation between the bits that will be affected by the range selection and the bits that won't (for instance, the "Recent Sessions" section won't be affected, nor will the "Commit Graph" looking thing as neither make sense to filter by range).

I'll whip up a UI draft and post it here so we can get a consensus going

@austinphilp commented on GitHub (Nov 21, 2022): @advplyr Let me see if I can draft something up after work today! wasn't imagining anything too drastic, adding a dropdown near the top, and we'll want to add some clearer deliniation between the bits that **will** be affected by the range selection and the bits that won't (for instance, the "Recent Sessions" section won't be affected, nor will the "Commit Graph" looking thing as neither make sense to filter by range). I'll whip up a UI draft and post it here so we can get a consensus going
Author
Owner

@austinphilp commented on GitHub (Nov 27, 2022):

new stats
OK - sorry for the delay, holidays kept me busy.

I've whipped up this rough draft of what I had in mind. The only thing I couldn't easily mock is that the graph will be stetched out to fill the width of the page, but the rest is more or less as it would be in implementation. Let me know what you think and if you have any feedback

@austinphilp commented on GitHub (Nov 27, 2022): ![new stats](https://user-images.githubusercontent.com/8987947/204150677-70b5506d-07d2-49da-9d72-b3ed0a29d862.png) OK - sorry for the delay, holidays kept me busy. I've whipped up this rough draft of what I had in mind. The only thing I couldn't easily mock is that the graph will be stetched out to fill the width of the page, but the rest is more or less as it would be in implementation. Let me know what you think and if you have any feedback
Author
Owner

@advplyr commented on GitHub (Nov 27, 2022):

What is the dropdown "Last week" going to change on the page?

The position it is at there would make me think it is updating everything on the page

@advplyr commented on GitHub (Nov 27, 2022): What is the dropdown "Last week" going to change on the page? The position it is at there would make me think it is updating everything on the page
Author
Owner

@austinphilp commented on GitHub (Nov 28, 2022):

Yeah that's a fair point, I had planned that it would change everything above "Recent Sessions". We could add a divider between the averages and the recent sessions list - or maybe we could make the page composed of two distinct blocks, one with the new filter, the other without

@austinphilp commented on GitHub (Nov 28, 2022): Yeah that's a fair point, I had planned that it would change everything above "Recent Sessions". We could add a divider between the averages and the recent sessions list - or maybe we could make the page composed of two distinct blocks, one with the new filter, the other without
Author
Owner

@advplyr commented on GitHub (Dec 1, 2022):

Yeah this is where I'm better at identifying flaws in a design then coming up with one.
I don't have any good ideas for it now. I don't think a divider would look good in this case. I'm not sure what you mean about the two distinct blocks.

@advplyr commented on GitHub (Dec 1, 2022): Yeah this is where I'm better at identifying flaws in a design then coming up with one. I don't have any good ideas for it now. I don't think a divider would look good in this case. I'm not sure what you mean about the two distinct blocks.
Author
Owner

@austinphilp commented on GitHub (Dec 5, 2022):

@advplyr OK I whipped up a rough mock of what I was thinking when I said "two distinct blocks". I'm a backend developer by profession, not FE, so it's possible there's a better phrase to describe what I meant, and I just didn't know what it's called 😅

mock stats-2

@austinphilp commented on GitHub (Dec 5, 2022): @advplyr OK I whipped up a rough mock of what I was thinking when I said "two distinct blocks". I'm a backend developer by profession, not FE, so it's possible there's a better phrase to describe what I meant, and I just didn't know what it's called 😅 ![mock stats-2](https://user-images.githubusercontent.com/8987947/205743819-1f9b6df4-90ca-48d0-8a6e-bfc292a19c4e.png)
Author
Owner

@advplyr commented on GitHub (Dec 5, 2022):

Ah okay, I think that looks good and makes sense.

@advplyr commented on GitHub (Dec 5, 2022): Ah okay, I think that looks good and makes sense.
Author
Owner

@austinphilp commented on GitHub (Dec 5, 2022):

Awesome, I'll work on getting that implemented then, it'll be my first time really digging around in the DB, so it might take a bit 🤷🏼‍♂️

@austinphilp commented on GitHub (Dec 5, 2022): Awesome, I'll work on getting that implemented then, it'll be my first time really digging around in the DB, so it might take a bit 🤷🏼‍♂️
Author
Owner

@iconoclasthero commented on GitHub (Nov 17, 2023):

So uh, where we at on this? I just looked at my stats page and all the minutes are merging into each other...

image

(NB: The Box, Vagina Obscura, and White Holes are about three completely different topics!

@iconoclasthero commented on GitHub (Nov 17, 2023): So uh, where we at on this? I just looked at my stats page and all the minutes are merging into each other... ![image](https://github.com/advplyr/audiobookshelf/assets/535962/7e002a68-6894-4b8f-a5a0-ff75cebe1cc1) (NB: _The Box_, _Vagina Obscura_, and _White Holes_ are about three _completely_ different topics!
Author
Owner

@evancjensen-source commented on GitHub (Oct 8, 2025):

Please provide a date range filter so we don't have to wait for "Year in review" to see these stats. I would like to see how many and which books I've read YTD.

@evancjensen-source commented on GitHub (Oct 8, 2025): Please provide a date range filter so we don't have to wait for "Year in review" to see these stats. I would like to see how many and which books I've read YTD.
Author
Owner

@iconoclasthero commented on GitHub (Oct 9, 2025):

In looking again at my post, I'm curious if there's some way to just cap a day at not more than the actual minutes in the day... i.e., no day has more than 24 h/d ✕ 60 m/h = 1440 minutes/day so just don't let the value in the table exceed 1440. It's not accurate, but it surely isn't less accurate than 9197 minutes or 7757 minutes more than are in any given Sunday.

Hmm, I just checked to see if this was still a problem and I listened for 109,051 minutes this past Sunday so I guess so.

Image

So again, since the problem of runaway session times has so far proven to be intractable, is there anyway to, even just for the purposes of this, cap the minutes/day at 1440?

@iconoclasthero commented on GitHub (Oct 9, 2025): In looking again at my post, I'm curious if there's some way to just cap a day at not more than the actual minutes in the day... i.e., no day has more than 24 h/d ✕ 60 m/h = 1440 minutes/day so just don't let the value in the table exceed 1440. It's not accurate, but it surely isn't _less_ accurate than 9197 minutes or 7757 minutes more than are in any given Sunday. Hmm, I just checked to see if this was still a problem and I listened for 109,051 minutes this past Sunday so I guess so. <img width="602" height="715" alt="Image" src="https://github.com/user-attachments/assets/d0c944cf-fb42-4469-a5c2-1bd725079bc2" /> So again, since the problem of runaway session times has so far proven to be intractable, is there anyway to, even just for the purposes of this, cap the minutes/day at 1440?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#774