hechtus / squeezebox-googlemusic

Squeezebox (Logitech Media Server) Plugin for Google Play Music
103 stars 24 forks source link

Support for All Access Radio #16

Closed hechtus closed 9 years ago

hechtus commented 10 years ago

Add support for Google Music All Access Radio.

hechtus commented 10 years ago

Basic support for playing my radio stations is done. Would be great if stations can be created and deleted. This requires some additions to the context menus. Context menus are still work in progress.

elfez commented 10 years ago

Would also be nice to have the "I'm feeling lucky" radio as well, but that looks as if it depends on https://github.com/simon-weber/Unofficial-Google-Music-API/issues/184 being resolved first, if I interpret it correctly.

hechtus commented 10 years ago

If the station ID is simply "IFD" you could add this to the list of radio stations in Radio.pm/menu(). I would prefer to the top of the list.

hechtus commented 10 years ago

Just a note, if you want to contribute to the code, please use the v0.3 branch and not the master branch.

elfez commented 10 years ago

The "IFL" string worked fine. The code is just the following:

 # Build the Menu
        push @menu, {
                name => "I feel lucky",
                type => 'audio',
                url => "googlemusicradio:station:IFL",
                };

It was so simple it's almost embarrassing :)

Can I leave it in your hands to push this up, or would you prefer a proper patch etc?

hechtus commented 10 years ago

I can do it, sure. I will also add a suitable image to the menu entry.

hechtus commented 10 years ago

Thanks a lot for figuring out!

elfez commented 10 years ago

My pleasure. Your suggestion to just try it with that label saved me a lot of time I suspect.

On the web UI it just uses the headphones image for the radio artwork, which looks OK. It might also be an idea to try and differentiate the string for the I Feel Lucky station to make it stand out a bit from the "normal" radio stations (on the SB3 it just looks like it was seeded with a song called "I feel lucky").

hechtus commented 10 years ago

I also thought about placing this to the main All Access menu, just below or above "My Radio Stations".

elfez commented 10 years ago

Placing it above makes a lot of sense. Maybe label it "I'm feeling lucky radio" or something to that affect. Otherwise it does sort of get lost with the others.

ghost commented 10 years ago

Hi, I'm feeling lucky radio is working, how about creating webradio stations right on the Squeezebox? Is there any chance of getting that working?

Thanks!

hechtus commented 10 years ago

I'm working on this on the v0.4 branch. Currently, I'm not having time for it but it's already working. You may also use the smart mix plugin for playing radio. You should definitely try it.

ghost commented 10 years ago

Hi and thanks for replying. I used SmartMix earlier and it's OK, but ot doesn't work as well as the Deezer and Google Music "Radios". One more question: will the 0.4 plugin report the played tracks back to Google to prevent repeating or is that still unresolved im the API? Thanks!

ghost commented 10 years ago

According to Simon Weber this should help:

http://t.co/dgNR41pG7g

hechtus commented 10 years ago

It may help a bit, yes, but it is not the full story. When fetching radio tracks from Google one has to report back all the tracks that have been fetched last time. This is what the Android app does. I did some research on this. The method get_station_tracks() is not complete yet. It misses the recently played tracks yet.

ghost commented 10 years ago

Thanks. I hope it gets fixed eventually.

simon-weber commented 10 years ago

@hechtus do you have a capture of the call to report the recently played tracks? I wasn't aware of it, but I'm happy to support it.

hechtus commented 10 years ago

@simon-weber Some time ago I captured a request, where the field recentlyPlayed of the radio/stationfeed call was set to something like [{id: Txyz..., type:1}, {id: Txyz..., type: 1},...]. Obviously, this is a list of All-Access track IDs. The type field specifies the type of the ID, where '1' means All-Access and '0' My Library.

I don't know if it is also possible to specify other types than '0' and '1', but it seems that the types are the same being used for the create station call.

ghost commented 10 years ago

Version 0.4 of the plugin has a new menu entry labled "Radio Genres". Sadly, selecting it leads to an endless loading loop and the list never shows up. I hope this is fixable, because ot would be rather useful!

hechtus commented 9 years ago

Done.