A qt application that controlls spotify as an overlay with dbus commands
Used Amp code to LEARN and DEBUG stuff i never told it to “make this and that”
A qt application that controlls spotify as an overlay with dbus commands
Used Amp code to LEARN and DEBUG stuff i never told it to “make this and that”
I built a spotify overlay controlled buy DBus and it was my first time making a QT app so it was pretty challenging but really cool! I learned lots of things!
So i fixed a few things like the album art corner radious was broken and that kind of stuff
here is a list of things that i did
Publishing to PyPI
I also published this to PyPI packages so you can just pip install spotify-overlay so more people can use this easily one thing tho is that it still does not install it as normal application so you can run it from the app launcher but i’m working on that
system tray icon
because i hide the window icon on the task bar i made a system tray icon so that you can quit it properly
Log in to leave a comment
Customish icons
So i found online these icons someone made that were imitating the Spotify icons but it only had a few and i needed more but with those i could build my own which were easy enough so i made: play/pause, next/previous, shuffle, loop, so with that i could replace the emojis i had then i also started making the whole layout better and now its more intuitive and looks better
Links
I wanted to make that the artist, album, track titles were links to the right place and would open them inside the spotify app and that was pretty easy as DBus already gives the track URI which makes it really easy but it does not give album nor artist so i made a way that it gets the name and searches it in the open.spotify.com url and it forces the spotify app to open them resulting in a like SEARCH and you just have to click on the artist / album
Log in to leave a comment
Starting the project
So ive had this idea for a while to make a Spotify Overlay because when i play games i like to listen to music, and when i like a song or want to know what’s playing i have to minimize the game which interrupts gameplay. So i started working on this!
Spotify API problems
I was going to use the Spotify API right? NO. The Spotify API is TRASH. Most features i need require premium, and recent updates made almost everything require it, so it wasn’t viable. That’s when i realized something.
Controlling Spotify with DBus
DBus won’t give full control, BUT it’s the best free option. I got this idea from the KDE media controller since it has shuffle, loop, play/pause, and track position. If KDE can use it, my program should too. I researched and YES, it uses DBus.
Making simple DBus level stuff
I used Python since it’s what I know best. I added play/pause, skip/previous, shuffle, and loop. These were easy. I could also get artist, track name, and cover art, so i added that too.
Making simple overlay with UI
Since i use KDE, i went with Qt in Python. QSS is similar to CSS so that helped. Making the layout was hard at first since it was my first Qt app, but i got a simple version working.
Keybindings
I wanted a keybind to toggle the overlay in game. This was a pain because i had do not disturb on, so i couldn’t see error notifications. KDE keybind was failing, but the fix was simple and i just couldn’t see the error.
That’s it for now. I’m still working on styling, icons, and proper overlay behavior since it breaks fullscreen apps.
Log in to leave a comment