mirror of
https://github.com/koel/koel.git
synced 2026-04-25 08:46:00 +03:00
[GH-ISSUE #1216] Support Spotify Web API #689
Labels
No labels
Authentication
Dependencies
Documentation
Feature Request
Flac
Help Wanted
Installation/Setup
Integration
Mobile
PR Welcome
Pending Release
Performance
Playlist
S3
Search
Sync
[Pri] Low
[Pri] Normal
[Status] Keep Open
[Status] Needs Author Reply
[Status] Needs Review
[Status] Stale
[Status] Will Implement
[Type] Blessed
[Type] Bug
[Type] Duplicate
[Type] Enhancement
[Type] Help Request
[Type] Question
[Type] Task
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/koel-koel#689
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @phanan on GitHub (Apr 18, 2020).
Original GitHub issue: https://github.com/koel/koel/issues/1216
Description
Currently, Koel makes use of Last.fm API (when properly configured) for extra artist and album information. However, Last.fm has updated their API terms of use, with the most relevant change being artist/album images replaced by a generic star:
Though not critical, this change hinders the user experience quite a bit. At the same time, Last.fm is slowly but steadily degrading as a service and lagging far behind competitors, the most significant being Spotify.
It's about time Koel starts to support Spotify Web API. Our target is to have feature parity with the existing Last.fm support. A "Connect to Spotify" should be available in User's profile, enabling user authenication. For Spotify API calls, jwilsson/spotify-web-api-php looks promising.
@sharik709 commented on GitHub (Jan 16, 2021):
This is interesting. Would love this. I'm gonna work on it.
@nielsdrost7 commented on GitHub (Sep 26, 2021):
@sharik709 did you start to work on it? Do you have time for it? Let me know
@phanan I can't take on the frontend part, but I could use on the backend, once I know if Sharik is working on it or not
@sharik709 commented on GitHub (Sep 26, 2021):
Hello, I wanted to but didn't have time. I have time for it now.
On Sun, 26 Sep, 2021, 6:34 PM Niels Drost, @.***> wrote:
@nielsdrost7 commented on GitHub (Sep 26, 2021):
Ok, great, man! Let's collaborate. I'll set up a repository and I will add you. To be continued 😄
@sharik709 commented on GitHub (Sep 26, 2021):
Sounds good, thanks!
On Sun, 26 Sep, 2021, 8:01 PM Niels Drost, @.***> wrote:
@nielsdrost7 commented on GitHub (Sep 26, 2021):
So I've created a branch in the repository. I've just added you.
This is what I've had in mind:
Add jwilsson/spotify-web-api-php
In order to get an access token from Spotify you need to create an 'application' with spotify (in the development.spotify.com url)
An example route could be:
Route::group(['prefix' => 'spotify'], static function (): void { Route::get('connect', 'SpotifyController@connect')->name('spotify.connect'); Route::get('callback', 'SpotifyController@callback')->name('spotify.callback'); });Make a SpotifyController with those functions and store the access token and refresh token in the cache.
Make several controllers for the Spotify functions (in that jwilsson package)
I will work on adding that SpotifyController, so we'll have a base.
I will let you know once I'm done.
Let's both make pull-requests towards the feature/add-spotify-api branch (in that new repository). Then make the branch perfect at the end and make a pull-request for this issue. If that makes sense.
@sharik709 commented on GitHub (Sep 26, 2021):
Sure, Makes perfect sense to me. If I understand it right, I'm supposed to manage the auth part and create a bridge between koel to Spotify and you would connect that bridge with Koel's internal functions, correct?
@nielsdrost7 commented on GitHub (Sep 26, 2021):
Yes, let's do that. Let me know if you need any help.
@sharik709 commented on GitHub (Sep 26, 2021):
ok, Thanks!
@nielsdrost7 commented on GitHub (Oct 2, 2021):
@sharik709 how is it going?
I realize that the auth part for the Spotify API is really complicated, so if you haven't created it yet, just let me know.
I had to prepare for the internal functions for Koel, so I might give you a few steps in the right direction for the auth part.
Just let me know, ok 😄
@sharik709 commented on GitHub (Oct 2, 2021):
Hi @nielsdrost7
Thank you for your message. I have reviewed it and started with small work. As of this moment, I'm not struggling with anything, I think I can pull it off.
Thanks :)
@sharik709 commented on GitHub (Oct 3, 2021):
Hello @nielsdrost7
I've created a new branch
spotify/authin the repo you shared. I'm trying to add support for connect and callback but when I try to hit the URL it just redirects me to the home page. Unable to figure out what could be the cause of it. Can you please check the code in my commit (Only commit) and tell me what did I do wrong?Thank you :)
@nielsdrost7 commented on GitHub (Oct 4, 2021):
@sharik709 of course I will. I will let you know as soon as I know something
@nielsdrost7 commented on GitHub (Oct 6, 2021):
@sharik709 great job, man! I created a PR, so I can comment more easily to your branch.
I mentioned you in that PR, so I think you will have gotten an email for that.
In order to check those newly created urls, do the following:
resources/assets/js/router.tsin your favorite editorloadState (): void { if (!window.location.hash) { return this.go('home') }if (!window.location.hash) { return this.go('home') }yarn buildoryarn watchor something. The assets need to be rebuiltspotify/callbackLet me know if you need help. This is fun!
@sharik709 commented on GitHub (Oct 7, 2021):
Awesome, thanks! :)
@nielsdrost7 commented on GitHub (Oct 24, 2021):
@sharik709 how is it going with applying those changes in your branch?
@phanan commented on GitHub (Aug 9, 2022):
Initial Spotify support has landed in v6.