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 proxying stars to last.fm, listenbrainz #2058

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

kgarner7
Copy link
Contributor

This PR adds the ability to forward stars/favorites from Navidrome to Last.FM and ListenBrainz-based backends. I extended the existing agents to support accepting stars. By default, forwarding stars is disabled.

Resolves #1547.

@github-actions
Copy link

github-actions bot commented Dec 28, 2022

Download the artifacts for this pull request:

@kgarner7
Copy link
Contributor Author

kgarner7 commented Dec 28, 2022

Some things to note:

  • Even though Navidrome supports custom ListenBrainz urls, proxying love/unlove only works on normal ListenBrainz (not libre.fm, maloja)
  • Only tracks that have a MusicBrainz Track ID will be proxied to ListenBrainz. That's just how the API works

@vfosnar
Copy link

vfosnar commented Jun 4, 2023

@kgarner7 I was interested in this PR and tried running it, but it looks like it uploads all buffered stars only on start.

Does it upload periodically, like every x hours? I tested it only for ~30minutes.

and btw nice work<3

@kgarner7
Copy link
Contributor Author

kgarner7 commented Jun 4, 2023

Ugh...looks like I forgot to make the channel for proxying stars, so it would only do it at the beginning. Thanks for catching it!

}

func (l *listenBrainzAgent) CanStar(track *model.MediaFile) bool {
return track.MbzTrackID != ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The field got renamed to MbzRecordingId #2279 , so this needs to be adapted in this PR.

Another way to handle the situation of missing MBID would be to use the metadata lookup endpoint first. See:

https://listenbrainz.readthedocs.io/en/latest/users/api/metadata.html#get--1-metadata-lookup-
https://listenbrainz.readthedocs.io/en/latest/users/api-usage.html#lookup-mbids

As this using the same mapping that LB would also apply when submitting a listen without IDs I think it would be consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I'd rather not try and guess the correct metadata (that's basically what the endpoint does) for stars/loves, but I'll defer to Deluan on this.

@vfosnar
Copy link

vfosnar commented Aug 26, 2023

So what is blocking this, guys? Are there any plans to support two-way sync?

@deluan
Copy link
Member

deluan commented Dec 14, 2023

I'll review it for next release.

So what is blocking this, guys? Are there any plans to support two-way sync?

There are no plans to support two-way sync, as both Last.fm and ListenBrainz APIs do not expose timestamps.

@calm3285
Copy link

Can this do something similar to lightweight music server?(lms)

@deluan
Copy link
Member

deluan commented Dec 15, 2023

Can this do something similar to lightweight music server?(lms)

I don't know.... What does it do? :)

@calm3285
Copy link

Synchronizing 'love' feedbacks

epoupon/lms#163

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

Successfully merging this pull request may close these issues.

Last.fm love
5 participants