Playcount syncing from last.fm account using last.fm API (can be used for getting similar artists, genres etc)

Feature description:

Hi! First, thank you for developing such amazing app!

OK, here i go:

Last.fm have an API, well documented here: https://www.last.fm/api and here: https://lastfm-docs.github.io/

I use a modified version by me of Ampache for my server, adding the similar tracks and artists info using that API, works making a GET request to:

For tracks:
http://ws.audioscrobbler.com/2.0/?method=track.getsimilar&api_key=supersecretapikey&artist=Ottawan&track=D.I.S.C.O.&lang=es

For artists:
http://ws.audioscrobbler.com/2.0/?method=artist.getsimilar&api_key=supersecretapikey&artist=Ottawan&lang=es

Works, and i enjoy that

The API key can be obtained using the actually logged last.fm user here:

From my tests there is no rate limit in the requests (one day, i made like 46816 requests, that is my entire music library, by error, but without problem :$)

But i wish to sync my last.fm playcount to Symfonium :smiley:

The query for getting that info is:

http://ws.audioscrobbler.com/2.0/?method=track.getinfo&api_key=supersecretapikey&artist=Ottawan&track=D.I.S.C.O.&username=CustardSandS&lang=es

And, in the XML response, the relevant line is:

3

Adding a last.fm section to the settings, the user can bring their own API key and username for enabling the app to get that info, maybe a button to sync all the playcount, and another the similar artists / tracks, and a section for show the user library data from lfm, based solely on the API data, and last but not last, update the remote or local playcount in every track change, cache or album view
That can be enable the app for making smarter playlists based on the cached data from the API and, eliminating the need for stressing the Subsonic server for getting that data too

Second, i think it’s a really good feature :stuck_out_tongue:

Problem solved:

No problem here, only a nice addition to the user experience

Brought benefits:

Getting more complete metadata to the existing music library of a user

Other application solutions:

 

 

Additional description and context:

 

 

Screenshots / Mockup:

    

1 Like

If you use a server then it’s the server job to keep track and sync the playcounts, Subsonic API have everything to handle that and Symfonium fully use it.

1 Like

Do you happen to know which server currently has this feature implemented? I’d love to have my 269k scrobbles as playcounts in Symfonium as well.

As a Python expert you can easily write a script for that :wink:

But no I don’t know what server support that, I think there’s a plugin for Jellyfin and Emby.

1 Like

Ampache keeps the playcount, yes, but for now, doesn’t sync the same with lfm
And, what about the users that keep their library on the phone? I think the feature can benefit those users too, the playcount can be independent from a server count
And the metadata that can be obtained from the API can be useful for the app too

In all cases, if Symfonium is connected to a server the server is the source of truth, so it will never be supported for your use case and need to be done server side.

The only one kind of up-to-date I found is this, but I don’t see playcount sync as a feature there either.

I wouldn’t mind trying to write one, but I don’t have experience with enhancing existing software and am also unsure which server to write it for.
Currently I mainly use jellyfin but I’d like to switch to lms as soon as it supports external lyrics.
The only software I know where playcount syncing with lastfm works pretty well is MusicBee.

All the servers have APIs for that, as do Last.FM.

This is a simple 3 step, get all the songs list with ids and necessary data to match in last.fm.
Get the last.fm playcount for each of them.
Push the playcout to the server.

You can easily built something that is easy to migrate from Jellyfin to LMS after