Husband, father, IT dude & blogger wrapped up into one good looking package.
Streaming Google Music with MPD
I’ve been thinking about building a plugin for MPD that would allow it to talk with Google Music for a while now. Currently, when I purchase music from Google Music, I have to download it and push the new music up to my local music share on my network. Once my music is there, MPD can stream it without a problem… I love MPD!
I started to investigate the idea this weekend. I found these two projects that I wanted to share with you guys. They helped me prove out that the plugin I want to write is possible without TOO much work.
First, by modifying the example.py in the Google Music API a little I was able to create a script that would sign into Google Music, find the first song in my library and grab the streaming URL of that song.
When running the script above, it’ll ask for a Google account and password. Once they are entered the script will login and load the library of the account. It will grab the first song in the library and output the URL to stream the song. Now that I had the streaming URL, I needed a way to add that to my MPD queue.
Low and behold! When I hit play the song started playing! So now we know that it can work the next step is figuring out if there’s a way to tie the Google Music library in with MPD’s library.