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 - foreverguest - 2014-12-22

@bromix
It would be great if a similar login method was available for Google Music.
About the albums list, browsing by My Library/Artists should work better in this case. I just checked the web interface and it list all Albums regardless of artists names.
Thanks for the tip. Any contribution will be welcome!

@dexdeadly
I wasn't able to enable AA on my account, probably some country restriction. If you could provide a test account with AA enabled would be great.


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

New test version:
plugin.audio.googlemusic.exp-1.3alpha1
Changes to test:
- show artist art when browsing by artist
- show album art when playing song
- show album art in most playlists
- change view when browsing library (only works in confluence)
- added alternative sort methods


RE: Experimental Google Music Addon - wrayan - 2014-12-29

Hi,

when I tried to perform a search (using exp1.2), I always ran into this python error:

Code:
ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
               Error Type: <type 'exceptions.UnicodeEncodeError'>
               Error Contents: 'ascii' codec can't encode character u'\xdf' in position 26: ordinal not in range(128)
               Traceback (most recent call last):
                 File "/home/kodi/.kodi/addons/plugin.audio.googlemusic.exp/default.py", line 84, in <module>
                   navigation.listMenu(params)  
                 File "/home/kodi/.kodi/addons/plugin.audio.googlemusic.exp/GoogleMusicNavigation.py", line 66, in listMenu
                   listItems = self.getSearch(query)
                 File "/home/kodi/.kodi/addons/plugin.audio.googlemusic.exp/GoogleMusicNavigation.py", line 280, in getSearch
                   listItems.append(self.addFolderListItem(album[0],{'path':"search_result",'query':album[0]+' '+album[1]}))
                 File "/home/kodi/.kodi/addons/plugin.audio.googlemusic.exp/GoogleMusicNavigation.py", line 130, in addFolderListItem
                   url = "?".join([sys.argv[0],urllib.urlencode(params)])
                 File "/usr/lib/python2.7/urllib.py", line 1332, in urlencode
                   v = quote_plus(str(v))
               UnicodeEncodeError: 'ascii' codec can't encode character u'\xdf' in position 26: ordinal not in range(128)
               -->End of Python script error report<--

Seems urlencode has some trouble with unicode. I'm not very familiar with python but after some googling I found the following workaround that fixed it for me:

Code:
--- old/GoogleMusicNavigation.py    2014-10-16 16:30:32.000000000 +0200
+++ new/GoogleMusicNavigation.py    2014-12-29 19:12:47.513368708 +0100
@@ -127,7 +127,10 @@
     def addFolderListItem(self, name, params, contextMenu=[], album_art_url=''):
         li = self.xbmcgui.ListItem(label=name, iconImage=album_art_url, thumbnailImage=album_art_url)
         li.addContextMenuItems(contextMenu, replaceItems=True)
+        str_params = {}
+        for p_key,p_value in params.iteritems():
+            str_params[p_key] = unicode(p_value).encode('utf-8')
-        url = "?".join([sys.argv[0],urllib.urlencode(params)])
+        url = "?".join([sys.argv[0],urllib.urlencode(str_params)])
         return url, li, "true"

     def listPlaylistSongs(self, playlist_id):

edit: Unfortunately this workaround broke other things in artist / album lists etc. Sad Assume I should leave the bug fixing to someone with better python skills, will be glad to assist with testing and providing logs though.

-- wrayan


RE: Experimental Google Music Addon - jodgi - 2015-01-02

On openELEC 5, with 1.3alpha1 I get this:

Code:
20:34:44 T:139797544785664  NOTICE: -->Python Interpreter Initialized<--
20:34:44 T:139797544785664  NOTICE: GoogleMusicEXP-1.3alpha1 ARGV: ['plugin://plugin.audio.googlemusic.exp/', '-1', '?action=clear_cache']
20:34:44 T:139797595141888  NOTICE: Thread BackgroundLoader start, auto delete: false
20:34:45 T:139797544785664  NOTICE: Previous line repeats 1 times.
20:34:45 T:139797544785664  NOTICE: [GoogleMusicEXP-1.3alpha1] Logging in
20:34:46 T:139797544785664  NOTICE: [GoogleMusicEXP-1.3alpha1] Login succeeded
20:34:47 T:139797544785664  NOTICE: Thread LanguageInvoker start, auto delete: false
20:34:47 T:139797544785664  NOTICE: -->Python Interpreter Initialized<--
20:34:47 T:139797544785664  NOTICE: GoogleMusicEXP-1.3alpha1 ARGV: ['plugin://plugin.audio.googlemusic.exp/', '14', '']
20:34:49 T:139797544785664   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.NameError'>
                                            Error Contents: name 'version' is not defined
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/plugin.audio.googlemusic.exp/default.py", line 59, in <module>
                                                settings.setSetting('version',version)
                                            NameError: name 'version' is not defined
                                            -->End of Python script error report<--
20:34:49 T:139798983464832   ERROR: GetDirectory - Error getting plugin://plugin.audio.googlemusic.exp/
20:34:49 T:139798983464832   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.audio.googlemusic.exp/) failed
20:34:49 T:139797544785664  NOTICE: Thread BackgroundLoader start, auto delete: false

Just installed the zip, and input the credentials in addon settings[/code]


RE: Experimental Google Music Addon - wrayan - 2015-01-02

(2015-01-02, 21:48)jodgi Wrote: On openELEC 5, with 1.3alpha1 I get this:

Code:
20:34:44 T:139797544785664  NOTICE: -->Python Interpreter Initialized<--
20:34:44 T:139797544785664  NOTICE: GoogleMusicEXP-1.3alpha1 ARGV: ['plugin://plugin.audio.googlemusic.exp/', '-1', '?action=clear_cache']
20:34:44 T:139797595141888  NOTICE: Thread BackgroundLoader start, auto delete: false
20:34:45 T:139797544785664  NOTICE: Previous line repeats 1 times.
20:34:45 T:139797544785664  NOTICE: [GoogleMusicEXP-1.3alpha1] Logging in
20:34:46 T:139797544785664  NOTICE: [GoogleMusicEXP-1.3alpha1] Login succeeded
20:34:47 T:139797544785664  NOTICE: Thread LanguageInvoker start, auto delete: false
20:34:47 T:139797544785664  NOTICE: -->Python Interpreter Initialized<--
20:34:47 T:139797544785664  NOTICE: GoogleMusicEXP-1.3alpha1 ARGV: ['plugin://plugin.audio.googlemusic.exp/', '14', '']
20:34:49 T:139797544785664   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.NameError'>
                                            Error Contents: name 'version' is not defined
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/plugin.audio.googlemusic.exp/default.py", line 59, in <module>
                                                settings.setSetting('version',version)
                                            NameError: name 'version' is not defined
                                            -->End of Python script error report<--
20:34:49 T:139798983464832   ERROR: GetDirectory - Error getting plugin://plugin.audio.googlemusic.exp/
20:34:49 T:139798983464832   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.audio.googlemusic.exp/) failed
20:34:49 T:139797544785664  NOTICE: Thread BackgroundLoader start, auto delete: false

Just installed the zip, and input the credentials in addon settings[/code]

Yeah confirmed, just ran into that, too (kodi 14.0 Git:ad747d9). Inserted the following line in default.py after line 6 to make it work:

version = settings.getAddonInfo('version')

-- wrayan


RE: Experimental Google Music Addon - jodgi - 2015-01-02

(2015-01-02, 21:54)wrayan Wrote: Yeah confirmed, just ran into that, too (kodi 14.0 Git:ad747d9). Inserted the following line in default.py after line 6 to make it work:

version = settings.getAddonInfo('version')

-- wrayan

Thanks! That fixed it


RE: Experimental Google Music Addon - foreverguest - 2015-01-07

Thanks for testing.

Check latest version:
plugin.audio.googlemusic.exp-1.3alpha2
- fixes for all access search
- reorganized search results
- show album/artist art in search results
- fixed some regressions


RE: Experimental Google Music Addon - wrayan - 2015-01-07

(2015-01-07, 04:52)foreverguest Wrote: Thanks for testing.

Check latest version:
plugin.audio.googlemusic.exp-1.3alpha2
- fixes for all access search
- reorganized search results
- show album/artist art in search results
- fixed some regressions

Works quite well so far, search exceptions are gone and I like the artwork in search results Smile I only found a minor issue - if I search for an album (e.g. "toto tambu"), I get results for all access songs, all access albums and all access artists but no library results although the album is in there, too. If I just search for "toto", I also get a list of songs (not albums though) in my library. So, it looks like album search only works for all access.

Also, I have a small feature request. At the moment, search results are one big list with separators for "my library", "all access songs", "all access albums" and "all access artists". As especially the first two categories can be quite big result lists, I think organizing the results in subfolders (maybe with number of results in folder name) would be better than just one big list. If this is not possible, an option for changing the order of the result categories would be nice (would prefer artists first, then albums, then tracks).

Anyway, thanks very much for the quick update, all access is so much more fun now as I don't have to add everything to my library via webbrowser before playing on kodi Smile

-- wrayan


RE: Experimental Google Music Addon - welshboy - 2015-01-09

EDIT : Nevermind, No idea what I did, but it works now! Thanks


RE: Experimental Google Music Addon - Skank - 2015-01-10

Hi
A big question, are we able to populate xbmc's music library with my own library inside google music?
If you know what i mean..


RE: Experimental Google Music Addon - foreverguest - 2015-01-11

It is not possible for Google Music as its streams are valid for only 1 minute.


RE: Experimental Google Music Addon - Skank - 2015-01-11

Why is that? It is possible with spotify..


RE: Experimental Google Music Addon - Skank - 2015-01-11

I meant just showing the covers of the albums ive put into my library in google music


RE: Experimental Google Music Addon - foreverguest - 2015-01-12

Do you mean showing the covers in XBMC library or inside Google Music Addon library?


RE: Experimental Google Music Addon - da-anda - 2015-01-12

please no forced views - they suck. Rather define the correct content type and let the skin/Kodi handle the user preferred view mode for this type. Or at least add a plugin option to disable the forced view mode