Add Google Play Music support
Since I don't use Spotify, but Google Play Music i am desperately missing Google Play Music support. I own a Chromecast Audio but I don't like the sound of it. I preffer the sound of my DurioPro-DAC.
I did some researching. Unfortunately I just started node.js development because of Volumio2, and I don't think I will be soon ready to implement it myself. Would be great if someone could take up this task.
Here are two possible tools which could be used for integration
Mopidy seems to me to be a replacement for mpd, GMusicProxy more like an addon which can be connected to mpd.
GMusicProxy seems quite promising. I got it running on the Volumio2 image. I was able to play Music form Google Play music.
Installation
sudo apt-get install git build-essential python2.7-dev libffi-dev libssl-dev python-pip
cd ~
git clone https://github.com/diraimondo/gmusicproxy.git
cd gmusicproxy/
sudo pip install -r requirements.txt
sudo pip install six==1.10.0
sudo pip install pyasn1==0.1.8
sudo pip install requests==2.6.0
vi gmusicproxy.cfg
GMusicProxy --daemon --config gmusicproxy.cfg
gmusicproxy.cfg
email = <google-account-emailaddress>
password = <google-account-password>
Usage
First I starded GMusicProxy as daemon. gmusicproxy.cfg contains my email-address and google password. This could also be provided via the command line.
volumio@volumio:~/gmusicproxy$ GMusicProxy --daemon --config gmusicproxy.cfg
Then i used an a slightly modified sample from the GMusicProxy Instructions
volumio@volumio:~/gmusicproxy$ mpc clear; curl -s 'http://localhost:9999/get_new_station_by_search?type=artist&artist=Radiohead&num_tracks=10' | grep -v ^# | while read url; do mpc add "$url"; done; mpc play
It worked very well. The Audio-quality via the DurioPro-DAC was better than via ChromecastAudio.
the playlist looks like this
volumio@volumio:~/gmusicproxy$ mpc playlist
Radiohead - Knives Out
http://192.168.1.25:9999/get_song?id=Todzqcpha3lp76qvzfjeortcfly
http://192.168.1.25:9999/get_song?id=Tgjsnaejirf2z4vlglvim5idfda
http://192.168.1.25:9999/get_song?id=Tuiuqkd6frdhbgfrls7e6vytgie
http://192.168.1.25:9999/get_song?id=Teelr2v3dqsrbvbwlnrf7jqcd3a
http://192.168.1.25:9999/get_song?id=Tugvmbhs6ruyu7fkfnwq45lx2de
http://192.168.1.25:9999/get_song?id=Toldkzvpbvz35bzjzsffadat54i
http://192.168.1.25:9999/get_song?id=T5wbbr4bxahqumjnmqdhezdjwaq
http://192.168.1.25:9999/get_song?id=Tteid4e3gaqixifhc3tvsuvshoa
http://192.168.1.25:9999/get_song?id=T3jz4jmmm7yhgx2c37whcjmedgi
http://192.168.1.25:9999/get_song?id=Tow4eybf6o5qkmemyidzcrmrz7e
I was thinking how this could work quite simple. You could support playing only user defined playlists from google play music.
curl -s 'http://localhost:9999//get_all_playlists'
This lists all user defined playlists with their id
When the user selects a playlist you could get the m3u playlist for the specific item
mpc stop; mpc clear; curl -s 'http://localhost:9999/get_playlist?id=<selected playlist id>' > /var/lib/mpd/playlists/volumio_gmusic.m3u'; mpc load volumio_gmusic; mpc play;
Fetching a playlist from google music takes some time.
This here might also be interresting for you guys. Node.js play music library --> https://github.com/jamon/playmusic
This is something that could be added as a plugin like Spotify quite easily i would imagine.
Sounds promising. I will try to test the NodeJS API and let you know!
I am interested in this as well.
Any updates on this?
Would be interested in this too.
Also interested!
Any updates on this?
Interested too. Any chance to see it one day ?
This would be great, Google Music is the only streaming service I use. It works really well, but it doesn't have as many people using it so it doesn't get the 3rd party love like some other services. Please have this as an option in Volumio!
I'd quite like to see this as well, however the next best thing is an android phone with the Google Music app installed, and you can send the audio using an Airplay type android app such as BubbleuPNP. and Pretty convoluted and having to use a phone to choose from a large library of music can be a chore.
This is far from an ideal solution, and a proper Spotify like plugin would be far far better.
Nothing new so far? Google music support would be a killer feature.
Or an streamsquid integration
Would like to get started with integrating Chromecast support in this. This would enable Volumio to catch music from sources like Google Play Music, Spotify etc. Almost in the manner like it supports Apple Airplay. Can anyone point me to the code files, where I should start looking? I'm looking at this Google Developers page: https://developers.google.com/cast/docs/caf_receiver/basic.
Since Google has announced that Play Music is being sunset in favor of YouTube Music, any challenges with incorporating this? The YouTube plugin seems to work pretty well now (after having to update /data/plugins/music_service/youtube/package.json file with "ytdl-core": "^3.2.0" in the "dependencies section"
Thoughts???