Inspiration

While I love being DJ and sharing my music with other people, it's a big time commitment to find the right songs. Oftentimes, I have a long playlist that I want to play certain songs from, but I want to be able to pick and choose what songs I listen to without scrolling back and forth through the entire playlist. Other times, I have a list of songs in my head, but it takes time to have to search each one individually. QBuildr makes it easy to create a new playlist with all the songs you want, and none of the ones you don't.

What it does

It creates a new public playlist within your Spotify account, and proceeds to populate it with songs. There are 2 ways to do this:

Directly

You can list as many song titles as you want within a single input, and it will add each one to the playlist. Pretty straightforward.

Through a playlist

You select an existing playlist, and then each song is presented to you one at a time in random order. The songs are opened in a window where the cover art, song title, and artist are all visible. You select songs by pressing 1 of 4 different buttons, inspired from the UI of Tinder. "Swipe Left" to skip, "Swipe Right" to add it to the playlist, "Swipe Up" to add it to the top of the playlist, and a "Stop" button to exit.

How I built it

Using the spotipy module, which is a lightweight library for the Spotify Web API. The entire application runs within a single file.

Challenges I ran into

I had never worked with JSON objects before, so parsing through them was difficult at first. The Spotify API was also far more limited than I expected, so I had to pivot and modify my initial idea quite a few times before coming to an end result that was similar to what I initially wanted. The buttons, which were created using the tkinter module, gave me a lot of trouble because they are usually not meant to close the application. It ended up being surprisingly difficult to find a way to get the buttons working properly. Finally, it was a challenge for me to find a way to display the cover art without downloading the file. I wasn't able to do that, so I will need to figure out a better solution to this later.

Accomplishments that I'm proud of

I came into VandyHacks expecting this to be a relatively simple and straightforward project, which is why I decided to do it solo. It ended up being a lot more involved than I initially expected, but at the end of the day I'm proud to have built something that I would actually want to use frequently, and all from the ground-up and on my own.

What I learned

This was my first time working on a substantial, independent project so I learned quite a lot. This was my first time using any sort of API, so for starters I learned how to read through the documentation and use the tools provided to me. I also learned how to create my own local website, which I needed for the authentication token. Finally, I learned how important it is to be able to search for your own solutions to problems that come up. I would estimate that well over half of my time spent building this was simply looking for solutions to problems that arose, which I would now know how to solve.

What's next for QBuildr

I would like to implement some more functionality such as the ability to add entire albums, or an undo button to delete songs you accidentally added. The album art is also displayed in such a way that it would currently only work on my local computer. After those issues are fixed, I would want to get it on a server through an application like Heroku so that anybody can access it.

Built With

Share this project:
×

Updates