Add track and artist play counts to extended info
See original GitHub issueFeature Request
One of the primary reasons I love last.fm is for the stats. I would love an option to display a users play counts for track and artist on the visualizer. I imagine this would be displayed next to the song info. It could be added into the extended info setting or an additional setting could be added.
Suggested Method of Implementation
To implement, you would need to add another last.fm api call. The API method is track.getInfo and you supply the username, track name, and artist. The relevant field returned by the call is ‘userplaycount’. url is like this:
http://ws.audioscrobbler.com/2.0/?method=track.getInfo&user=${urlUser}&api_key=${key}&track=${currentTrack}&artist=${currentArtist}&format=json
Potentially this same approach could be used to also add an artist play count option using the artist.getInfo API method.
I know you already have the extended info option but that only shows total user play count, which I find less interesting. This could be an extension to that setting, or it’s own setting.
I may take a stab at doing this myself but am not super familiar with javascript coding yet.
As a final note, I’ve been using the descent visualizer for a while now (year+) and it’s excellent. Thanks for all the work @JasonPuglisi!
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Thanks for the idea, and I’m glad you’re enjoying the project! Maybe this can be an addition to the extended info line, like this:
Could give the user options to turn each of those three data points on/off, but I don’t think it hurts to have all of them displayed. If you have another idea, feel free to suggest.
The “now playing” API calls that Descent makes every few seconds should have both the track and artist IDs that we need to fetch the track info you mentioned.
If you wanna try implementing this, I can give some guidance on where I think things should go. I’m happy to answer any questions you have about JavaScript and work through it. Let me know! Otherwise, I’ll implement this the next time I feel like coding haha. I don’t think it will be very complicated!
Looks like 0 artist and 0 track scrobble counts show up fine, so probably just a cache thing!