Kodi Community Forum
Release Experimental Google Music Addon - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Music Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=148)
---- Thread: Release Experimental Google Music Addon (/showthread.php?tid=200640)



RE: Experimental Google Music Addon - sudaltsov - 2016-12-19

Actually may be you are right, it is about encodings. I tried some other albums, still not good.
Code:
20:12:29 T:139863445690112  NOTICE: Thread LanguageInvoker start, auto delete: false
20:12:29 T:139863445690112  NOTICE: -->Python Interpreter Initialized<--
20:12:29 T:139863445690112  NOTICE: [GoogleMusicEXP-1.10.6]  ARGV: ['plugin://plugin.audio.googlemusic.exp/', '-1', '?action=play_all&filter_type=genre&filter_criteria=%27Music+for+the+Royal+Fireworks+%5Cxe2%5Cx80%5Cxa2+Water+Music%27&artist=Georg+Friedrich+H%E4ndel']
20:12:29 T:139863445690112  NOTICE: [GoogleMusicEXP-1.10.6] ### storage getfiltersongs: 'genre' "'Music for the Royal Fireworks \\xe2\\x80\\xa2 Water Music'" 'Georg Friedrich H\xe4ndel'
And I also see messages like that:
Code:
20:12:25 T:139863445690112   ERROR: NEWADDON Unknown Music Info Key "mediatype"
20:12:25 T:139863445690112  NOTICE: [GoogleMusicEXP-1.10.6]  ENCODING FAIL!!! utf-8 '\xd0\xa1\xd0\xb2\xd1\x8f\xd1\x82\xd0\xbe\xd1\x81\xd0\xbb\xd0\xb0\xd0\xb2 \xd0\xa0\xd0\xb8\xd1\x85\xd1\x82\xd0\xb5\xd1\x80'
Please let me know if you need more info to debug and fix it...
Thank you!


RE: Experimental Google Music Addon - Tux2 - 2016-12-21

Hey, first off I just wanted to say thank you so much for this add-on! Now here comes the catch. I am using Kodi 16.1 from the official repository on a first generation Raspberry Pi using Raspbian 8, the model B with 512MB of RAM. Some things can be a little slow on it, but it usually handles things just fine. However, it pauses between each song for about 30 seconds when listening to a radio station as it fetches the next track from the internet. I have tried enabling the "Pre-fetch URL" however that doesn't seem to help as it still pauses just as long between each song. As a control I installed Kodi 16.1 on my main computer with Linux Mint 17.3 and also installed the plugin. The buffering between each song is not noticeable on it. Is there anything else I can try to remove the buffering time between each song, or is that just a limitation of the Kodi API?


RE: Experimental Google Music Addon - hoschilo - 2016-12-21

Using "search" in the main menu for a specific title or artist - giving me a "result" list - choosing one of the results i.e. album - will bring me to the list of titles in this album - so far so good.

Issue: when trying to come back to the last "view" by means of the ".." at the top of each list, it kicks me back to the main menu and I have to start from the beginning.

I recently changed to Krypton B7 I was not aware of this issue before

BTW: a search history such as provided in Tadly's add-on would be highly appreciated :-)

Thank you in advance!


RE: Experimental Google Music Addon - StefanK - 2016-12-21

I just posted a question under Chorus2, http://forum.kodi.tv/showthread.php?tid=301759 but perhaps I should ask here as well:
When I use the web interface to enter a search, I get the search prompt on the tv screen. But only after 60 seconds idle time do I get the search prompt on my web interface. Am I missing something or should (could) something be added to the addon?


RE: Experimental Google Music Addon - foreverguest - 2016-12-23

(2016-12-21, 11:14)Tux2 Wrote: Hey, first off I just wanted to say thank you so much for this add-on! Now here comes the catch. I am using Kodi 16.1 from the official repository on a first generation Raspberry Pi using Raspbian 8, the model B with 512MB of RAM. Some things can be a little slow on it, but it usually handles things just fine. However, it pauses between each song for about 30 seconds when listening to a radio station as it fetches the next track from the internet. I have tried enabling the "Pre-fetch URL" however that doesn't seem to help as it still pauses just as long between each song. As a control I installed Kodi 16.1 on my main computer with Linux Mint 17.3 and also installed the plugin. The buffering between each song is not noticeable on it. Is there anything else I can try to remove the buffering time between each song, or is that just a limitation of the Kodi API?

Try to decrease the size of Kodi cache. Larger cache means more time buffering the stream. Check this wiki: http://kodi.wiki/view/HOW-TO:Modify_the_video_cache


RE: Experimental Google Music Addon - foreverguest - 2016-12-23

(2016-12-21, 12:10)hoschilo Wrote: Using "search" in the main menu for a specific title or artist - giving me a "result" list - choosing one of the results i.e. album - will bring me to the list of titles in this album - so far so good.

Issue: when trying to come back to the last "view" by means of the ".." at the top of each list, it kicks me back to the main menu and I have to start from the beginning.

I recently changed to Krypton B7 I was not aware of this issue before

BTW: a search history such as provided in Tadly's add-on would be highly appreciated :-)

Thank you in advance!

Thanks for the feedback, I'll try to fix it for a future version. Search history may be added too.


RE: Experimental Google Music Addon - sudaltsov - 2016-12-25

Would you be able to look at the encoding issue as well please? Thank you


RE: Experimental Google Music Addon - hoschilo - 2016-12-27

As soon as I play music from a "radio station" "artist"-Label doesn't get any value and there is no indication in the skin. Addins like "artist slideshow" will accordingly not do its job.

For the first song of a radio station it is working correct but for the following it seems as the Music.player(Artist) does not get any value. Therefore nothing to display or to work with. When jumping to the next song "manually" it works again so the issue only exist if songs are played "automatically" from the queue.

Pressing "n" will show a playlist with information of artist and song so the information should be available. This issue only exist for radio stations for all others it works very well.


RE: Experimental Google Music Addon - ray2301 - 2016-12-29

(2016-12-27, 19:09)hoschilo Wrote: As soon as I play music from a "radio station" "artist"-Label doesn't get any value and there is no indication in the skin. Addins like "artist slideshow" will accordingly not do its job.

......

i hate that too. would like to see it fixed.


RE: Experimental Google Music Addon - Abbaskip - 2016-12-31

I just noticed that we can't start a radio from a playlist - as we can with Play Music usually. We can only start a radio from a particular song/artists.

I often start radios from my playlists (so I can semi build a playlist, start a radio and it usually gets the idea of what I'm after) so would love this feature.

Also, the Youtube is great but still gets way too many live or unofficial versions. Can you prioritise the word official and remove priority from videos with Live in the title perhaps?

EDIT: Oh and a "Shuffle from here" would be great. ie. go to a playlist, select the song you want to start on, and shuffle from here to play that song first, then the list shuffled.


RE: Experimental Google Music Addon - responsible - 2017-01-17

I have two-factor authorization enabled with a app specific app set up. I get an error when I try to run this add-on in Kodi. Looking at the error log I see the following issue:

Quote:14:36:54 T:4552 NOTICE: [GoogleMusicEXP-1.10.6] ARGV: ['plugin://plugin.audio.googlemusic.exp/', '5', '']
14:36:54 T:4552 NOTICE: [GoogleMusicEXP-1.10.6] Checking init data
14:36:54 T:4552 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ValueError'>
Error Contents: time data '2016-06-16 06:16:20' does not match format '%Y-%m-%d %H:%M:%S.%f'
Traceback (most recent call last):
File "C:\Users\Farmer\AppData\Roaming\Kodi\addons\plugin.audio.googlemusic.exp\default.py", line 21, in <module>
utils.checkInit()
File "C:\Users\Farmer\AppData\Roaming\Kodi\addons\plugin.audio.googlemusic.exp\utils.py", line 104, in checkInit
login.checkCookie()
File "C:\Users\Farmer\AppData\Roaming\Kodi\addons\plugin.audio.googlemusic.exp\GoogleMusicLogin.py", line 22, in checkCookie
if (datetime.now() - datetime(*time.strptime(utils.addon.getSetting('cookie-date'), '%Y-%m-%d %H:%M:%S.%f')[0:6])).days >= 7:
File "C:\Program Files\Kodi\system\python\Lib\_strptime.py", line 467, in _strptime_time
return _strptime(data_string, format)[0]
File "C:\Program Files\Kodi\system\python\Lib\_strptime.py", line 325, in _strptime
(data_string, format))
ValueError: time data '2016-06-16 06:16:20' does not match format '%Y-%m-%d %H:%M:%S.%f'
-->End of Python script error report<--
14:36:54 T:4364 ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.audio.googlemusic.exp/
14:36:54 T:4364 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.audio.googlemusic.exp/) failed


Any guidance on how to address this error? Thanks.


RE: Experimental Google Music Addon - benj - 2017-01-19

Also having issues with playback.
Kodi 17 b7, google with 2 step auth (application password). Installed the addon, my library is fetched without issues. i can see my artists, albums, and playlists.
I can play the track on my mobile with the google app, and i only have 3 authorized machines (desktop and phones).
When trying to play the track on Kodi, it fails with "one or more items failed to play."...
kodi.log shows a ton of errors including:
Code:
Error Type: <class 'gmusicapi.exceptions.CallFailure'>
Error Contents: GetStreamUrl: 403 Client Error: Forbidden for url:

and
Code:
(response was: u'<HTML>\n<HEAD>\n<TITLE>Forbidden</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>Forbidden</H1>\n<H2>Error 403</H2>\n</BODY>\n</HTML>\n')

Any ideas on how to resolve this would be appreciated.

Thanks.


RE: Experimental Google Music Addon - procmon - 2017-01-21

Hi guys, I think I am also seeing a similar error as the last person on this thread, I am running Kodi 16.1 on a Raspberry Pi3, I have turned off two two step verification and have allowed less secure apps

Code:
13:17:24 T:1377825712    INFO: initializing python engine.
13:17:24 T:1377825712   DEBUG: CPythonInvoker(73, /home/kodi/.kodi/addons/plugin.audio.googlemusic.exp/default.py): start processing
13:17:24 T:1945219072   DEBUG: ------ Window Deinit (DialogProgress.xml) ------
13:17:24 T:1377825712   DEBUG: -->Python Interpreter Initialized<--
13:17:24 T:1377825712   DEBUG: CPythonInvoker(73, /home/kodi/.kodi/addons/plugin.audio.googlemusic.exp/default.py): the source file to load is "/home/kodi/.kodi/addons/plugin.audio.googlemusic.exp/default.py"
13:17:24 T:1377825712   DEBUG: CPythonInvoker(73, /home/kodi/.kodi/addons/plugin.audio.googlemusic.exp/default.py): setting the Python path to /home/kodi/.kodi/addons/plugin.audio.googlemusic.exp:/home/kodi/.kodi/addons/script.module.decorator/lib:/home/kodi/.kodi/addons/script.module.requests/lib:/usr/lib/python2.7:/usr/lib/python2.7/plat-arm-linux-gnueabihf:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages/PILcompat:/usr/lib/python2.7/dist-packages/gtk-2.0:/usr/lib/pymodules/python2.7
13:17:24 T:1377825712   DEBUG: CPythonInvoker(73, /home/kodi/.kodi/addons/plugin.audio.googlemusic.exp/default.py): entering source directory /home/kodi/.kodi/addons/plugin.audio.googlemusic.exp
13:17:24 T:1377825712   DEBUG: CPythonInvoker(73, /home/kodi/.kodi/addons/plugin.audio.googlemusic.exp/default.py): instantiating addon using automatically obtained id of "plugin.audio.googlemusic.exp" dependent on version 2.1.0 of the xbmc.python api
13:17:24 T:1377825712  NOTICE: [GoogleMusicEXP-1.10.6]  ARGV: ['plugin://plugin.audio.googlemusic.exp/', '53', "?action=play_song&song_id=Tepu3kvydj3hb6zplh3cn3llxsa&title=Don't Bring Me Down&artist=Sia&albumart=http://lh3.googleusercontent.com/oywZI7UET-puGDQQQPJjyjWsyHpOaGG08ty9yPOSEBym73JBu603WRufqzI1MMt-pQXKPrYjew&tracknumber=6&album=Colour The Small One (Deluxe Edition)&year=2004&rating=0&artistart=http://lh3.googleusercontent.com/VQ_7c4ckb_whqMwWLm-sJRtKeyaxKuIDOJinq4QiYFqzsBNfSqQ6kVj9OapdeRHmwAvSlMlYrA"]
13:17:25 T:1580716976   DEBUG: webserver: request received for /jsonrpc
13:17:25 T:1945219072   DEBUG: Previous line repeats 1 times.
13:17:25 T:1945219072   DEBUG: DialogProgress::Open called
13:17:25 T:1945219072   DEBUG: ------ Window Init (DialogProgress.xml) ------
13:17:26 T:1377825712  NOTICE: [GoogleMusicEXP-1.10.6] Loading auth from cache
13:17:26 T:1377825712  NOTICE: [GoogleMusicEXP-1.10.6] getStreamUrl songid: Tepu3kvydj3hb6zplh3cn3llxsa device:  quality: hi
13:17:26 T:1377825712   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <class 'gmusicapi.exceptions.CallFailure'>
                                            Error Contents: GetStreamUrl: 403 Client Error: Forbidden for url: https://mclients.googleapis.com/music/mplay?opt=hi&dv=0&hl=en_US&mjck=Tepu3kvydj3hb6zplh3cn3llxsa&sig=a5uj_VQc9MBIKHtY9EBGQJ6QDcY&pt=a&audio_formats=mp3&slt=1485004646483&net=mob&tier=fr
                                            (requests kwargs: {'url': 'https://mclients.googleapis.com/music/mplay', 'headers': {'X-Device-ID': '', 'Authorization': '<omitted>'}, 'allow_redirects': False, 'params': {'opt': 'hi', 'dv': 0, 'hl': 'en_US', 'mjck': 'Tepu3kvydj3hb6zplh3cn3llxsa', 'sig': 'a5uj_VQc9MBIKHtY9EBGQJ6QDcY', 'pt': 'a', 'audio_formats': 'mp3', 'slt': '1485004646483', 'net': 'mob', 'tier': 'fr'}, 'method': 'GET'})
                                            (response was: u'<HTML>\n<HEAD>\n<TITLE>Forbidden</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>Forbidden</H1>\n<H2>Error 403</H2>\n</BODY>\n</HTML>\n')
                                            Traceback (most recent call last):
                                              File "/home/kodi/.kodi/addons/plugin.audio.googlemusic.exp/default.py", line 13, in <module>
                                                GoogleMusicPlaySong.GoogleMusicPlaySong().play(params)
                                              File "/home/kodi/.kodi/addons/plugin.audio.googlemusic.exp/GoogleMusicPlaySong.py", line 13, in play
                                                params = self.__getSongStreamUrl(song_id, params)
                                              File "/home/kodi/.kodi/addons/plugin.audio.googlemusic.exp/GoogleMusicPlaySong.py", line 65, in __getSongStreamUrl
                                                params['url'] = self.api.getSongStreamUrl(song_id, session_token=params.pop('sessiontoken',None), wentry_id=params.pop('wentryid',None))
                                              File "/home/kodi/.kodi/addons/plugin.audio.googlemusic.exp/GoogleMusicApi.py", line 85, in getSongStreamUrl
                                                stream_url = self.getLogin().getStreamUrl(song_id, session_token=session_token, wentry_id=wentry_id)
                                              File "/home/kodi/.kodi/addons/plugin.audio.googlemusic.exp/GoogleMusicLogin.py", line 43, in getStreamUrl
                                                return self.gmusicapi.get_stream_url(song_id, device_id, quality, session_token, wentry_id)
                                              File "/home/kodi/.kodi/addons/plugin.audio.googlemusic.exp/gmusicapi/clients/mobileclient.py", line 361, in get_stream_url
                                                return self._make_call(mobileclient.GetStreamUrl, song_id, device_id, quality, session_token, wentry_id)
                                              File "/home/kodi/.kodi/addons/plugin.audio.googlemusic.exp/gmusicapi/clients/shared.py", line 81, in _make_call
                                                return protocol.perform(self.session, self.validate, *args, **kwargs)
                                              File "/home/kodi/.kodi/addons/plugin.audio.googlemusic.exp/gmusicapi/protocol/shared.py", line 225, in perform
                                                raise CallFailure(err_msg, call_name)
                                            CallFailure: GetStreamUrl: 403 Client Error: Forbidden for url: https://mclients.googleapis.com/music/mplay?opt=hi&dv=0&hl=en_US&mjck=Tepu3kvydj3hb6zplh3cn3llxsa&sig=a5uj_VQc9MBIKHtY9EBGQJ6QDcY&pt=a&audio_formats=mp3&slt=1485004646483&net=mob&tier=fr
                                            (requests kwargs: {'url': 'https://mclients.googleapis.com/music/mplay', 'headers': {'X-Device-ID': '', 'Authorization': '<omitted>'}, 'allow_redirects': False, 'params': {'opt': 'hi', 'dv': 0, 'hl': 'en_US', 'mjck': 'Tepu3kvydj3hb6zplh3cn3llxsa', 'sig': 'a5uj_VQc9MBIKHtY9EBGQJ6QDcY', 'pt': 'a', 'audio_formats': 'mp3', 'slt': '1485004646483', 'net': 'mob', 'tier': 'fr'}, 'method': 'GET'})
                                            (response was: u'<HTML>\n<HEAD>\n<TITLE>Forbidden</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>Forbidden</H1>\n<H2>Error 403</H2>\n</BODY>\n</HTML>\n')
                                            -->End of Python script error report<--
13:17:26 T:1377825712    INFO: Python script stopped
13:17:27 T:1377825712   DEBUG: Thread LanguageInvoker 1377825712 terminating
13:17:27 T:1945219072   DEBUG:  WaitOnScriptResult - plugin exited prematurely - terminating
13:17:27 T:1945219072   ERROR: Playlist Player: skipping unplayable item: 6, path [plugin://plugin.audio.googlemusic.exp/?action=play_song&song_id=Tepu3kvydj3hb6zplh3cn3llxsa&title=Don't Bring Me Down&artist=Sia&albumart=http://lh3.googleusercontent.com/oywZI7UET-puGDQQQPJjyjWsyHpOaGG08ty9yPOSEBym73JBu603WRufqzI1MMt-pQXKPrYjew&tracknumber=6&album=Colour The Small One (Deluxe Edition)&year=2004&rating=0&artistart=http://lh3.googleusercontent.com/VQ_7c4ckb_whqMwWLm-sJRtKeyaxKuIDOJinq4QiYFqzsBNfSqQ6kVj9OapdeRHmwAvSlMlYrA]
13:17:27 T:1945219072   DEBUG: Playlist Player: one or more items failed to play... aborting playback


Can anyone provide any insight as to what is going wrong? Thanks


RE: Experimental Google Music Addon - foreverguest - 2017-01-22

procmon, you can see in this line:
Code:
13:17:26 T:1377825712  NOTICE: [GoogleMusicEXP-1.10.6] getStreamUrl songid: Tepu3kvydj3hb6zplh3cn3llxsa device: quality: hi
that the device id is missing.

Please check if you have an Android device registered in your account.


RE: Experimental Google Music Addon - procmon - 2017-01-23

Hi foreverguest, thanks for that. Oddly enough the RPi3 was listed under my Google account settings as an Android device and I had previously installed the google music app on my android phone, so there was a mobile device listed in the Google Music settings. I eventually got it to work by uninstalling the add-on, deleting the settings.xml rebooting the device and starting again. I didn't have much faith that it would work but surprisingly it did first time! Thanks for the reply and many thanks to the addon. I will be sure to send a donation your way on payday.


This forum uses Lukasz Tkacz MyBB addons.