Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Last.fm alternatives #122

Open
EmeraldSnorlax opened this issue Dec 24, 2020 · 6 comments
Open

Support for Last.fm alternatives #122

EmeraldSnorlax opened this issue Dec 24, 2020 · 6 comments

Comments

@EmeraldSnorlax
Copy link

What command would you like to see improved or added?
A way to interact with the bot using libre.fm, instead of last.fm

What exactly should it do?
The equivalent commands run for the user, but it requests data from libre.fm instead

Additional context
(In theory), this shouldn't be too hard as libre.fm's api is compatible with last.fm's.

@th0mk
Copy link
Member

th0mk commented Dec 25, 2020

I've looked into this before, but it seems that libre.fm is not really maintained anymore. It would be a lot of work for me simply to support a site that not a lot of people use.

I do however want to support Last.fm alternatives in the future (such as wavy.fm and maybe Spotify). The current project architecture is a bit messy and built pretty specifically for Last.fm, so before doing this I want restructure the project in a way that allows us to easily implement Last.fm alternatives without too much work.

Once that is done I might look into adding Libre.fm support as well. Just don't expect it any time soon.

@AesaraB
Copy link

AesaraB commented Mar 7, 2021

If you're still looking into this, another (more active) open-source alternative is ListenBrainz, by the MetaBrainz Foundation.

libre.fm is still being maintained, but at a deathly pace. Supposedly the devs are looking to overhaul the website and database.

@th0mk
Copy link
Member

th0mk commented Mar 7, 2021

@AesaraB I learned about the ListenBrainz project a few days ago, it's looking pretty good so far. Started working on rewriting the bot to support multiple platforms, but its a lot of work. If I have any updates I'll share them here.

@th0mk th0mk changed the title libre.fm support Support for Last.fm alternatives May 7, 2021
@th0mk
Copy link
Member

th0mk commented May 15, 2022

Looked into adding Listenbrainz support. The platform seems very promising, the API looks quite solid but unfortunately there are some limitations.

Current observed limitations:

All API calls return a max of 100 results at a time

We cache a lot of user data in our database, like users their top artists and recent plays. Most of our commands use this cache in order not to spam the API of the data source of the user. We only need to request data when a user sets their username, and after that we can update it using recent listens. We update it using recent listens whenever someone uses a command, or every 2-3 days.

100 results would require us to spam requests to their API (with paginated request, not sure if they actually support that) to even build this data, let alone update it every few days.
For Last.fm this limit is set at 1000.

When asked on IRC, the developers said they didn't plan to change this.
As a possible alternative they offer data downloads.

This would require the following steps:

  • Every 2 weeks, download all listen data for every user on Listenbrainz
  • Every day, download the incremental data dump and update the stored data
  • Insert/update our database cache with this data dump
  • Update our database cache using recent listens (which would still spam calls since the limit is 100)

Some downsides/difficulties with this method are:

  • It's too much work for me
  • Data will always be somewhat outdated, which would offer a poor experience especially compared to Last.fm. Our users expect their data to be up to date, always.
  • Incremental data dumps don't include new users, only new listens
  • With the 17k users they currently already have the data is 38gb. Might be difficult to handle, even more when they get more users.

I'll look into it more, but don't think its really possible because of the reasons listed above.

Missing data/requests from API

  • No way to get a users playcount for a specific artist/album/track (quite an important one for us)
  • No easy way to get user signup / first listen date (although /listening-activity could possible work as an alternative)
  • No desktop auth flow (see Last.fm example, basically oauth without a web server) (there's a workaround for this, letting users manually enter their user token)

@th0mk th0mk closed this as completed May 15, 2022
@th0mk th0mk reopened this May 15, 2022
@Viktini
Copy link

Viktini commented Oct 13, 2023

FWIW, ListenBrainz lets you download a JSON export of your account's listens. Would adding importing of ListenBrainz data for supporters be feasible, similar to how it's done already with Spotify? Could be useful for those who use both last.fm and ListenBrainz.

@felipemarins
Copy link

felipemarins commented Sep 10, 2024

A year ago, the limit for max items per request was increased to 1000 (which is the same as Last.fm, according to what th0mk said). Does this change anything in relation to a possible implementation of this feature request?

Reference:
metabrainz/listenbrainz-server#2572

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants