music icon indicating copy to clipboard operation
music copied to clipboard

[Minor feature] Annual listening statistics

Open ChibyX opened this issue 1 year ago • 2 comments

Now is year's end and different music streamings show you your top songs, artists and other stats for the past year. It would be cool to have something like that in NC music. No, I don't ask for colorful presentations. But this app is already collects some statistics (because I can see "top albums" in my Subsonic and Ampache clients and it's definitely server-side data) and there's could be an option to get it in text and numbers.

ChibyX avatar Dec 09 '24 14:12 ChibyX

Thanks for the suggestion.

What we currently store, is the total play count per song and the latest play time of each song. This is not enough to create any yearly stats as we can't separate plays of the earlier years from those of the latest year. To be able to calculate the yearly plays, we would need to additionally store a snapshot of the cumulative play counts at the end of each year.

paulijar avatar Dec 09 '24 20:12 paulijar

This feature request has also some synergies with https://github.com/owncloud/music/issues/1189. If the statistics were offered through a suitable API, then the Analytics app could be used to visualize it either as table or a graph (although fancy visualization was specifically not required here).

paulijar avatar Jan 05 '25 10:01 paulijar

Something like this would be extremely cool!

As for changing the database structure, from a very brief glance, it looks like you'd have to normalize out the last_played and play_count columns into its own table. This could cause issues if the table gets too big, so we'd probably have to add a way to configure just storing the last play and play count instead?

But I think a feature like Spotify Wrapped would be really cool! Honestly (this is really overscoping for this app), but a Nextcloud Year in Review could be a cool end-user feature - it gets the podcast episodes, photos, bookmarks, music, etc. into one interface to say "This was your year!"

2br-2b avatar Jul 06 '25 17:07 2br-2b

If we could also store an entire listening history (maybe, limited to current year), it would be also possible to determine longest repeat sequences (some services include most repeated songs in your annual stats). Also it's already possible to mark the day when you started more tracks than usual

ChibyX avatar Jul 06 '25 17:07 ChibyX

Would there be any objection to storing the individual song play metadata? Even if it doesn't bring us all the way, it could be a good first step.

2br-2b avatar Aug 12 '25 01:08 2br-2b

@2br-2b You mean like timestamped record of each song play? I guess that's possible but over the time, that would gather quite a bit of data (although more likely megabytes than tens of megabytes).

I'm also wondering, is this feature requirement somewhat overlapping with https://github.com/owncloud/music/issues/339 and https://github.com/owncloud/music/issues/1010. I have never used scrobbling so I'm not quite certain, what amount of data those external services collect and what kind of statistics can they give.

paulijar avatar Aug 12 '25 20:08 paulijar

Antennapod has this functionality for podcasts and it was a very nice addition. What kind of statistics would people be interested in? I'll start off:

  • total number of hours listened (if possible music/internet radio stream/podcast)
  • top X most played album/playlist/artist/internet radio stream
  • most common "you played X artist/album/playlist after Y artist/album/playlist
  • hours of the day I played music

ei8fdb avatar Sep 03 '25 17:09 ei8fdb