Volumio2 icon indicating copy to clipboard operation
Volumio2 copied to clipboard

Add Google Play Music support

Open amalic opened this issue 9 years ago • 17 comments

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.

amalic avatar Jul 16 '16 15:07 amalic

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

amalic avatar Jul 16 '16 18:07 amalic

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.

amalic avatar Jul 18 '16 22:07 amalic

This here might also be interresting for you guys. Node.js play music library --> https://github.com/jamon/playmusic

amalic avatar Jul 21 '16 07:07 amalic

This is something that could be added as a plugin like Spotify quite easily i would imagine.

apinner avatar Jul 21 '16 07:07 apinner

Sounds promising. I will try to test the NodeJS API and let you know!

amalic avatar Jul 21 '16 09:07 amalic

I am interested in this as well.

renich avatar Aug 30 '16 16:08 renich

Any updates on this?

death2all110 avatar Aug 13 '17 03:08 death2all110

Would be interested in this too.

xaf avatar Sep 30 '17 16:09 xaf

Also interested!

davidblumntcgeo avatar Mar 25 '18 04:03 davidblumntcgeo

Any updates on this?

nklmilojevic avatar Apr 11 '18 14:04 nklmilojevic

Interested too. Any chance to see it one day ?

xniala avatar Jul 21 '18 12:07 xniala

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!

clickwir avatar Nov 13 '18 03:11 clickwir

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.

DeviousPenguin avatar Dec 17 '18 13:12 DeviousPenguin

Nothing new so far? Google music support would be a killer feature.

PkAIR avatar Jan 27 '19 08:01 PkAIR

Or an streamsquid integration

Domepo avatar Jan 28 '19 11:01 Domepo

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.

tukaibat avatar Jul 06 '19 04:07 tukaibat

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???

ghost avatar Aug 04 '20 19:08 ghost