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

Conversation

@aikaterna
Copy link
Member

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 added some commits Dec 12, 2018

@aikaterna aikaterna requested a review from Twentysix26 as a code owner Dec 12, 2018

aikaterna added some commits Dec 12, 2018

@palmtree5

This comment has been minimized.

Copy link
Member

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

@mikeshardmind

This comment has been minimized.

Copy link
Member

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.

@Tobotimus

This comment has been minimized.

Copy link
Member

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.

aikaterna added some commits Feb 14, 2019

Update for #2389
Thanks to TrustyJAID for the help.

@Tobotimus Tobotimus added QA: Needed and removed QA: Unassigned labels Feb 27, 2019

aikaterna added some commits Mar 3, 2019

@TrustyJAID
Copy link
Member

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.

@Tobotimus Tobotimus added QA: Passed and removed QA: Needed labels Mar 7, 2019

Allow Spotify urls by default in audioset restrict
Matches the behavior of Spotify codes already being allowed by default.
@Tobotimus
Copy link
Member

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.

redbot/cogs/audio/audio.py Outdated Show resolved Hide resolved
redbot/cogs/audio/audio.py Outdated Show resolved Hide resolved
redbot/cogs/audio/audio.py Outdated Show resolved Hide resolved

aikaterna added some commits Mar 13, 2019

@tekulvw tekulvw requested a review from Tobotimus Mar 28, 2019

@tekulvw
Copy link
Member

left a comment

Changes requested by Toby have been made

Changes made.

@tekulvw tekulvw merged commit 0503000 into Cog-Creators:V3/develop Mar 28, 2019

1 check passed

Travis CI - Pull Request Build Passed
Details
@aikaterna aikaterna referenced this pull request Apr 5, 2019
1 of 3 tasks complete
@aikaterna aikaterna referenced this pull request Apr 19, 2019
1 of 3 tasks complete

@aikaterna aikaterna deleted the aikaterna:patch-1 branch Apr 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.