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

[V3 Audio] Add Spotify support #2328

Merged
merged 14 commits into from Mar 28, 2019
Merged

[V3 Audio] Add Spotify support #2328

merged 14 commits into from Mar 28, 2019

Conversation

@aikaterna
Copy link
Member

@aikaterna aikaterna commented Dec 12, 2018

Type

  • Bugfix
  • Enhancement
  • New feature

Description of the changes

This adds the ability to use open.spotify.com links or spotify:track:code type of Spotify tracks with the play command. Tracks, albums, playlists, and user playlists can be added using the url or code, but all within the play command. This requires that the bot owner sign up for a Spotify API key along with a YouTube Data API v3 key, and input the Spotify ID, Spotify client secret, and the YouTube API key in [p]audioset commands before those URLs/codes can be used. Thanks to TrustyJAID for his help in moving the YouTube API access to something quicker and more efficient than what I originally had in mind.

@aikaterna aikaterna requested a review from Twentysix26 as a code owner Dec 12, 2018
@palmtree5
Copy link
Member

@palmtree5 palmtree5 commented Dec 12, 2018

it might be worth reworking some things to deduplicate code as Streams also uses the Youtube Data API V3 for requests related to youtube livestreams and has its own command to set the api key

Loading

@mikeshardmind
Copy link
Contributor

@mikeshardmind mikeshardmind commented Dec 18, 2018

Needs some small conflict handling. Changes provided are nice. I think there needs to be a few extra things included to handle limiting exceptionally large playlists later on, but that can easily be a further improvement, rather than something which needs to be included with this specifically.

I agree with @palmtree5 about a more central handling of secrets. I think we should look to store these in the bot's central config instead of per cog (with these and any other API keys used by core red) but this can also be done seperately to this.

Loading

@Tobotimus
Copy link
Member

@Tobotimus Tobotimus commented Feb 4, 2019

This'd be great for 3.1. I'm going to set #2389 as a blocker for this one due to the discussion about central storage of API keys.

Loading

Copy link
Member

@TrustyJAID TrustyJAID left a comment

This has been working great in my testing. I would like to see the bot start playing some tracks immediately instead of waiting until all the playlist songs are found before starting but that can be figured out in a later PR.

Loading

Matches the behavior of Spotify codes already being allowed by default.
Copy link
Member

@Tobotimus Tobotimus left a comment

Just need some easy fixes around the i18n strings. I think there is a 4th one earlier on in audio.py which is not a result of these changes, but I'm happy for you to fix it up here anyway.

Loading

redbot/cogs/audio/audio.py Outdated Show resolved Hide resolved
Loading
redbot/cogs/audio/audio.py Outdated Show resolved Hide resolved
Loading
redbot/cogs/audio/audio.py Outdated Show resolved Hide resolved
Loading
@tekulvw tekulvw requested a review from Tobotimus Mar 28, 2019
Copy link
Member

@tekulvw tekulvw left a comment

Changes requested by Toby have been made

Loading

@tekulvw tekulvw dismissed Tobotimus’s stale review Mar 28, 2019

Changes made.

@tekulvw tekulvw merged commit 0503000 into Cog-Creators:V3/develop Mar 28, 2019
1 check passed
Loading
@aikaterna aikaterna mentioned this pull request Apr 5, 2019
3 tasks
@aikaterna aikaterna deleted the patch-1 branch Apr 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

8 participants