Inspiration

We decided we wanted to solve a problem that affects millions of people everyday: not having enough music to listen to.

What it does

Spotify Playlist Generator creates a playlist on the users Spotify account then populates it with songs that match the criteria the user inputted. This criteria varies greatly, it can be just a simple genre or it can have everything from a set tempo to the overall dancibility of the song.

How I built it

We built this using Python 3.4 and 3 very important modules: pyen, spotipy, and PyQT5. Pyen is a python client for the Echo Nest API which is owned and operated by the people behind Spotify. Echo Nest holds a ton of statistics about almost every song on Spotify and we use those statistics to refine our search. Spotipy is a library for the Spotify Web API and we simply use it to communicate with Spotify. Finally, PyQT5 helps us make the GUI for the script using QT, the library itself just converts it into something that is usable in Python.

Challenges I ran into

A major issue that we ran into near the beginning was not being able to skip songs that would come up from Echo Nest, the only reason we had to do this was because sometimes Echo Nest would have the song and Spotify wouldn't, so trying to add that song to our playlist would cause a crash. We got around this eventually by adding a try and except line so that if it did crash we would just skip the selection and try again.

Another issue we had was the GUI, none of us had any experience with QT before so we had to learn that from scratch. This really slowed us down and bottle necked us because only one person could work on the GUI at a time and everyone else would have to wait. The errors that we ran into were poorly documented online so trying to find a fix was in some cases impossible and we would just go with a safe bet and restart the GUI portion of the hack.

Accomplishments that I'm proud of

Frankly, I'm so proud of this app, we all are. We set out to make something that we would actually use and would solve a problem that we have and we did that, now if I'm about to go to the gym and it occurs to me that I don't have any good music I can just run the script and add some workout music of whatever genre I want to my account in only seconds.

What I learned

Because our group had people of different backgrounds we learned a lot of things that were common to one person but unheard of to the others. For example, I had no idea you could get around a crash in python by just using try and except but now that I know that I'll use it daily. I also had no experience whatsoever with API's so learning a lot abut one as complicated as Python's was really educational.

What's next for Spotify Playlist Generator

Next we're going to clean it up a bit more and add a lot more functionality to the UI as well as customize it to fit our specific needs. I'm also planning on giving it out to a few friends since I'm sure they would have great use for it.

LAST MINUTE NOTE: The other group members didn't show up and I had to resort to using an earlier version that is, sadly, lacking in much of the intended product, this includes comments and the entirety of the GUI.

Built With

Share this project:
×

Updates