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

Feat/get similar songs 2, Feat/get similar songs, Feat/get top songs #195

Closed

Conversation

xaviercrochet
Copy link
Contributor

Implementation of subsonic getSimilarSongs2 and Last.fm artist.getSimilar

N.B. I inspired myself of ampache 's implementation src/Module/Api/Subsonic_Api.php:2229 as Last.Fm doesn't expose such endpoint.

The logic is the following:

  1. Retrieve artist 's similar artists using Last.fm 's artist.getSimilar
  2. Look in our database for tracks matching the similar artists
  3. Randomize (then trim) the track set to prevent ending up with X track of the same artist.

What do you think about this approach?

@sentriz
Copy link
Owner

sentriz commented Feb 9, 2022

hi! these are looking great. though it seems this pr 3 contains pr 2, and pr 2 contains pr 1

perhaps for each of your 3 branches you should rebase them on master

@sentriz sentriz changed the title Feat/get similar songs 2 Feat/get similar songs 2, Feat/get similar songs, Feat/get top songs Feb 9, 2022
@sentriz
Copy link
Owner

sentriz commented Feb 9, 2022

just had a look and I had a few minor comments. mostly around formatting and I think some stuff wasn't needed

how do you feel about these changes?
99c2022

to summarise

  • shuffing the results at the database level instead of application, using the clause LIMIT clause based on the size param. I think this should not have adjacent tracks by the same artist like you mention
  • updating the lastfm API helper functions to not depend on the db package
  • moving the spec struct variables to the bottom of the handlers

how does it sound to you? does it work still? I tested a bit and it seems to

thank you kindly!

@xaviercrochet
Copy link
Contributor Author

Sounds good, thanks!

@xaviercrochet
Copy link
Contributor Author

Done!

@sentriz sentriz closed this in 39b3ae5 Feb 10, 2022
sentriz pushed a commit that referenced this pull request Feb 10, 2022
sentriz pushed a commit that referenced this pull request Feb 10, 2022
@sentriz
Copy link
Owner

sentriz commented Feb 10, 2022

hey I split the changes into 3 commits, one for each new view, and added you as the author. this way it shows up nicely in the changelog for the next release

#160

let me know if all is working well still. thanks very much!

@xaviercrochet
Copy link
Contributor Author

Thank you @sentriz.

Have a nice one!

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.

None yet

2 participants