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: Spotify support #168

Merged
merged 28 commits into from
Mar 14, 2022
Merged

feat: Spotify support #168

merged 28 commits into from
Mar 14, 2022

Conversation

aquelemiguel
Copy link
Owner

@aquelemiguel aquelemiguel commented Mar 7, 2022

Closes #50.

Aims to integrate with already existing code for YouTube playback. Under the hood, it fetches metadata from the Spotify link, builds a relevant query and feeds it to yt-dlp search function.

Tasks

  • Reply with warning if environment variables are missing
  • Minimize unwraps in spotify.rs
  • Investigate alternatives to lazy_static! and simplify ClientError init
  • Reply with warning if user submits a private playlist
  • Reply with warning if user submits an invalid Spotify link
  • Add pkg-config back to the Dockerfile

Screenshots

Success

image

Failed to authenticate with Spotify

Screenshot 2022-03-07 021353

Failed to fetch track/album/playlist

image

Failed to fetch private/algorithm playlist

image

Copy link
Collaborator

@afonsojramos afonsojramos left a comment

Choose a reason for hiding this comment

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

It seems that some of the packages that you added made it so that it requires the pkg-config package again. You just need to add it back to the Dockerfile of the build image.

@aquelemiguel aquelemiguel marked this pull request as ready for review March 11, 2022 02:18
@aquelemiguel aquelemiguel added the ✨ feature New feature or request label Mar 11, 2022
@joao-conde joao-conde removed their assignment Mar 11, 2022
@joao-conde joao-conde removed their request for review March 11, 2022 10:10
@joao-conde
Copy link
Collaborator

Tag me back for review when your tasks are completed

Copy link
Collaborator

@afonsojramos afonsojramos left a comment

Choose a reason for hiding this comment

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

Looking good, just need to clear the submitted discussions and then I will approve!

src/commands/play.rs Show resolved Hide resolved
src/commands/play.rs Show resolved Hide resolved
src/commands/play.rs Outdated Show resolved Hide resolved
src/sources/youtube.rs Show resolved Hide resolved
src/sources/spotify.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@joao-conde joao-conde left a comment

Choose a reason for hiding this comment

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

Partial review

.env.example Outdated Show resolved Hide resolved
src/commands/play.rs Show resolved Hide resolved
src/commands/play.rs Outdated Show resolved Hide resolved
src/commands/play.rs Outdated Show resolved Hide resolved
src/errors.rs Outdated Show resolved Hide resolved
src/sources/spotify.rs Outdated Show resolved Hide resolved
.env.example Outdated Show resolved Hide resolved
.env.example Outdated Show resolved Hide resolved
src/commands/play.rs Show resolved Hide resolved
src/commands/play.rs Outdated Show resolved Hide resolved
src/commands/play.rs Outdated Show resolved Hide resolved
src/sources/spotify.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@afonsojramos afonsojramos left a comment

Choose a reason for hiding this comment

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

Looking good, the .enumerate()/i == 0 changes indeed simplify the code!

.env.example Outdated Show resolved Hide resolved
.env.example Outdated Show resolved Hide resolved
@joao-conde joao-conde merged commit fdfe019 into main Mar 14, 2022
@joao-conde joao-conde deleted the spotify-support branch March 14, 2022 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spotify support
3 participants