vially / googlemusic-xbmc

Google Music addon for Kodi
GNU General Public License v3.0
176 stars 48 forks source link

Doesn't work with all access #27

Closed trixor closed 10 years ago

trixor commented 11 years ago

Hi,

I noticed that the plugin doesn't work with the all access service from Google. The plugin from Simon received an update so perhaps we can implement it as well in this version?

Unofficial-Google-Music-API https://github.com/simon-weber/Unofficial-Google-Music-API/blob/develop/HISTORY.rst

Thanks

foreverguest commented 11 years ago

Unfortunately even with the api support it is not easy to implement in the addon. I have some ideas how it could be done, but I don't have access to 'All Access', so I can't test. Hopefully someone with an 'All Access' account can step in to implement this.

werty1st commented 11 years ago

hello,

i have an "all access" enabled account and want to give it a try. i just copied the new gmusic api over the old one in the plugin, but this didnt help.

can you explain why it is not so easy and how you would do it?

thanks.

foreverguest commented 11 years ago

Because in "all access" each track return several url streams. Thats different from normal xbmc assumption where each track has one url stream. I have made a workaround assembling a extended m3u playlist with the urls when playing an "all access" track, but for now this have the issue of not playing the next track in the playlist. You can test this experimental addon here: https://www.box.com/s/304b3na2pwqsgnwtprve

zoic21 commented 10 years ago

Hi, is there any new on this subject ?

tlm2021 commented 10 years ago

This should be completely working after pull 35 was all cleared up. (It's working for me).

zoic21 commented 10 years ago

For me it's doesn't work I got "403 unauthorized" error. I don't know why. I wonder if there anything a i can do to avoid this error ?

tlm2021 commented 10 years ago

Incorrect username or password maybe? That might cause a 403 error.

zoic21 commented 10 years ago

No I can get list of my artist, playlist and song within my librairie work.

foreverguest commented 10 years ago

Hi Travis, are you using an addon packed by yourself or the one I distribute in the forums?

zoic21 commented 10 years ago

I used this version : http://forum.xbmc.org/showthread.php?tid=134783&page=37 (Version 0.8exp17)

tlm2021 commented 10 years ago

I'm using one I packed myself. I can update and try again.

zoic21 commented 10 years ago

Yes if could update I can try your package

foreverguest commented 10 years ago

Please try the version from the forum too. So we can track where is the problem.

zoic21 commented 10 years ago

I tried forum version but same probleme. I can't tried @tlm2021 version beacause I get an dependance error but I read his code and I wonder if alla acces work because of that :

def getSongStreamUrl(self, song_id): self.login.login() stream_url = self.gmusicapi.get_stream_url(song_id)

self.storage.updateSongStreamUrl(song_id, stream_url)

    return stream_url

I don't use google api but in doc get_stream_url must be used with device ID

tlm2021 commented 10 years ago

You're looking in the master branch. The develop branch has the correct definition.

On Fri, Jan 10, 2014 at 11:23 AM, zoic21 notifications@github.com wrote:

I tried forum version but same probleme. I can't tried @tlm2021https://github.com/tlm2021version beacause I get an dependance error but I read his code and I wonder if alla acces work because of that :

def getSongStreamUrl(self, song_id): self.login.login() stream_url = self.gmusicapi.get_stream_url(song_id)

self.storage.updateSongStreamUrl(song_id, stream_url)

return stream_url

I don't use google api but in doc get_stream_url must be used with device ID

— Reply to this email directly or view it on GitHubhttps://github.com/vially/googlemusic-xbmc/issues/27#issuecomment-32056849 .

zoic21 commented 10 years ago

I just try with develop branch I got the same error "403 Forbiden". Maybe it's du to device id but I look my phone is correctly recognize...

tlm2021 commented 10 years ago

I'll look at it this weekend. Just noting that that particular function does appear to be the cause. On Jan 10, 2014 1:59 PM, "zoic21" notifications@github.com wrote:

I just try with develop branch I got the same error "403 Forbiden". Maybe it's du to device id but I look my phone is correctly recognize...

— Reply to this email directly or view it on GitHubhttps://github.com/vially/googlemusic-xbmc/issues/27#issuecomment-32070632 .

zoic21 commented 10 years ago

If I can help you I will be available today and tomorrow. I can test some code if you need

tlm2021 commented 10 years ago

I'm able to reproduce the error. Oddly, calling MobileClient.get_stream_url with same arguments in an ipython session works fine.

The MobileClient in XBMC is reporting it's still authorized. Still digging.

tlm2021 commented 10 years ago

Looks like it's an issue with authorization caching. Setting nocache=True when logging in just before getting a stream lets me play the music.

Working on fixing that, but I'm not very familiar with that system yet, so it'll take me a bit.

foreverguest commented 10 years ago

Just had posted a fix for this in the forums, seems to solve the problem. Thanks.

mikesalmonuk commented 10 years ago

What's the link to the forums? Be handy to follow the fixes there as well as here on github. Thanks.

foreverguest commented 10 years ago

http://forum.xbmc.org/showthread.php?tid=134783

mikesalmonuk commented 10 years ago

Thanks @foreverguest