• 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 35
WIP Google Music Addon
Hi,

First of all, thanks for all the work you have put in this add-on.
I have installed the latest (0.8exp10) and it loads my library perfectly.
However, when I attempt to play anything, I only get the first 1 or 2 seconds of the song before it skips to the next song in the list.

I have uploaded xbmc.log to http://sprunge.us/GCeT
I am running OpenELEC 3.2.0

Can you help me get this working?

Edit: looks like I have the same problem Woodzmeister reported a few days ago...
In your logs I can see that you have no mobile device registered in your account.
Please try to access your account from a mobile device first. You can check the devices registered via the web interface settings.
Right now, to play 'All Access' tracks we need to use the mobile api so you need a mobile device registered.
Thanks for your reply. Unfortunately, I have no Android phone available to register to my account. The iPhone app that I use, apparently does not register as a device. I will ask a colleague on Wednesday if I can borrow their Android phone for a minute to register.
Latest dev plugin fails completely in Gotham. .8exp9. I can post a more complete log if you need it, but it's the same error each time.

23:43:44 T:3604 DEBUG: CGUIMediaWindow::GetDirectory (plugin://plugin.audio.googlemusic/)
23:43:44 T:3604 DEBUG: ParentPath = [addons://sources/audio/]
23:43:44 T:1360 DEBUG: XFILE::CPluginDirectory::StartScript - calling plugin Google Music Dev('plugin://plugin.audio.googlemusic/','3','')
23:43:44 T:1360 DEBUG: XFILE::CPluginDirectory::WaitOnScriptResult - waiting on the Google Music Dev (id=7) plugin...
23:43:44 T:692 NOTICE: Thread LanguageInvoker start, auto delete: false
23:43:44 T:692 INFO: initializing python engine.
23:43:44 T:692 DEBUG: CPythonInvoker(7, C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\plugin.audio.googlemusic\default.py): start processing
23:43:44 T:692 NOTICE: -->Python Interpreter Initialized<--
23:43:44 T:692 DEBUG: CPythonInvoker(7, C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\plugin.audio.googlemusic\default.py): the source file to load is C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\plugin.audio.googlemusic\default.py
23:43:44 T:692 DEBUG: CPythonInvoker(7, C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\plugin.audio.googlemusic\default.py): setting the Python path to C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\plugin.audio.googlemusic;C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\script.module.demjson\lib;C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\script.module.chardet\lib;C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\script.module.protobuf\lib;C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\script.module.simplejson\lib;C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\script.module.beautifulsoup\lib;C:\Program Files (x86)\XBMC\addons\script.module.pil\lib;C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\script.module.gmusicapi\lib;C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\script.module.requests\lib;C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\script.module.decorator\lib;C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\script.module.mutagen\lib;C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\script.module.buggalo\lib;C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\script.module.amazon.database\lib;C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\script.module.mechanize\lib;C:\Program Files (x86)\XBMC\addons\xbmc.debug\;C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\script.module.parsedom\lib;C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\script.module.xbmcswift2\lib;C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\script.module.elementtree\lib;C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\script.module.validictory\lib;C:\Program Files (x86)\XBMC\system\python\DLLs;C:\Program Files (x86)\XBMC\system\python\Lib;C:\Program Files (x86)\XBMC\python27.zip;C:\Program Files (x86)\XBMC\system\python\lib\plat-win;C:\Program Files (x86)\XBMC\system\python\lib\lib-tk;C:\Program Files (x86)\XBMC;C:\Program Files (x86)\XBMC\system\python;C:\Program Files (x86)\XBMC\system\python\lib\site-packages
23:43:44 T:692 DEBUG: CPythonInvoker(7, C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\plugin.audio.googlemusic\default.py): entering source directory C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\plugin.audio.googlemusic
23:43:44 T:692 DEBUG: CPythonInvoker(7, C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\plugin.audio.googlemusic\default.py): instantiating addon using automatically obtained id of "plugin.audio.googlemusic" dependent on version 2.1.0 of the xbmc.python api
23:43:44 T:692 NOTICE: GoogleMusic-0.8exp9 ARGV: ['plugin://plugin.audio.googlemusic/', '3', '']
23:43:44 T:692 NOTICE: CommonFunctions-2.5.1
23:43:44 T:692 NOTICE: warning: could not import appdirs; will use current directory
23:43:44 T:692 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.IOError'>
Error Contents: [Errno 13] Permission denied: 'C:\\WINDOWS\\system32\\gmusicapi.log'
Traceback (most recent call last):
File "C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\plugin.audio.googlemusic\default.py", line 55, in <module>
navigation = GoogleMusicNavigation.GoogleMusicNavigation()
File "C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\plugin.audio.googlemusic\GoogleMusicNavigation.py", line 17, in __init__
self.api = GoogleMusicApi.GoogleMusicApi()
File "C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\plugin.audio.googlemusic\GoogleMusicApi.py", line 8, in __init__
self.login = GoogleMusicLogin.GoogleMusicLogin()
File "C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\plugin.audio.googlemusic\GoogleMusicLogin.py", line 18, in __init__
self.gmusicapi = Mobileclient(debug_logging=True,validate=False)
File "C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\plugin.audio.googlemusic\gmusicapi\clients\mobileclient.py", line 19, in __init__
super(Mobileclient, self).__init__(self.__class__.__name__, debug_logging, validate)
File "C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\plugin.audio.googlemusic\gmusicapi\clients\shared.py", line 56, in __init__
utils.configure_debug_log_handlers(self.logger)
File "C:\Users\sdfsdgsg\AppData\Roaming\XBMC\addons\plugin.audio.googlemusic\gmusicapi\utils\utils.py", line 256, in configure_debug_log_handlers
debug_handler = logging.FileHandler(log_filepath)
File "C:\Program Files (x86)\XBMC\system\python\Lib\logging\__init__.py", line 902, in __init__
StreamHandler.__init__(self, self._open())
File "C:\Program Files (x86)\XBMC\system\python\Lib\logging\__init__.py", line 925, in _open
stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: 'C:\\WINDOWS\\system32\\gmusicapi.log'
-->End of Python script error report<--
23:43:44 T:692 INFO: Python script stopped
23:43:44 T:692 DEBUG: Thread LanguageInvoker 692 terminating
23:43:44 T:1360 DEBUG: XFILE::CPluginDirectory::WaitOnScriptResult - plugin exited prematurely - terminating
23:43:44 T:3604 ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.audio.googlemusic/
23:43:44 T:3604 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.audio.googlemusic/) failed
23:43:44 T:3604 DEBUG: CGUIMediaWindow::GetDirectory (addons://sources/audio/)
23:43:44 T:3604 DEBUG: ParentPath = []
23:43:44 T:3604 WARNING: XFILE::CMusicDatabaseDirectory::GetLabel - Unknown nodetype requested 0
Small bug; not all tracks have an icon image etc. associated with them. So, at plugin.audio.googlemusic/GoogleMusicPlaySong.py
line 87 or so, change:

if not label:
label = song[23]
li = self.xbmcgui.ListItem(label, iconImage=song[22], thumbnailImage=song[22])

to

if not label:
label = song[23]
if song[22]:
li = self.xbmcgui.ListItem(label, iconImage=song[22], thumbnailImage=song[22])
else:
li = self.xbmcgui.ListItem(label)

And it'll play songs without a label.

Quick one though - what's the story with authentication ? I think my cookies may have expired, and it's not handling it well;

21:28:41 T:140664675235584 NOTICE: [GoogleMusic-0.8exp10] getSongStreamUrl device: 33c05316b1aa13c7
21:28:41 T:140664675235584 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
(requests kwargs: {'headers': {'X-Device-ID': '33c05316b1aa13c7', 'Authorization': '<omitted>'}, 'params': {'opt': 'hi', 'songid': '6822735d-6af1-3c61-ac51-93a7cdf64b82', 'pt': 'e', 'slt': '1382646521187', 'sig': 'CdqscUCjHIpIVWOiRBP0ZYgSlOA', 'net': 'wifi'}, 'url': 'https://android.clients.google.com/music/mplay', 'verify': False, 'allow_redirects': False, 'method': 'GET'})
(response was: '<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/xbmc/.xbmc/addons/plugin.audio.googlemusic/default.py", line 50, in <module>
song.play(get("song_id"))
File "/home/xbmc/.xbmc/addons/plugin.audio.googlemusic/GoogleMusicPlaySong.py", line 19, in play
url = self.__getSongStreamUrl(song_id)
File "/home/xbmc/.xbmc/addons/plugin.audio.googlemusic/GoogleMusicPlaySong.py", line 70, in __getSongStreamUrl
return self.api.getSongStreamUrl(song_id)
File "/home/xbmc/.xbmc/addons/plugin.audio.googlemusic/GoogleMusicApi.py", line 86, in getSongStreamUrl
stream_url = self.gmusicapi.get_stream_url(song_id, device_id)
File "/home/xbmc/.xbmc/addons/plugin.audio.googlemusic/gmusicapi/clients/mobileclient.py", line 169, in get_stream_url
return self._make_call(mobileclient.GetStreamUrl, song_id, device_id)
File "/home/xbmc/.xbmc/addons/plugin.audio.googlemusic/gmusicapi/clients/shared.py", line 67, in _make_call
return protocol.perform(self.session, self.validate, *args, **kwargs)
File "/home/xbmc/.xbmc/addons/plugin.audio.googlemusic/gmusicapi/protocol/shared.py", line 226, in perform
raise CallFailure(err_msg, call_name)
CallFailure: GetStreamUrl: 403 Client Error: Forbidden
(requests kwargs: {'headers': {'X-Device-ID': '33c05316b1aa13c7', 'Authorization': '<omitted>'}, 'params': {'opt': 'hi', 'songid': '6822735d-6af1-3c61-ac51-93a7cdf64b82', 'pt': 'e', 'slt': '1382646521187', 'sig': 'CdqscUCjHIpIVWOiRBP0ZYgSlOA', 'net': 'wifi'}, 'url': 'https://android.clients.google.com/music/mplay', 'verify': False, 'allow_redirects': False, 'method': 'GET'})
(response was: '<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<--
21:28:41 T:140664675235584 INFO: Python script stopped

Ah. Clearing cookies & cache made it go.
Getting import error no module found for google music api

http://xbmclogs.com/show.php?id=75041

Thanks!
Here, hope this version fix most of the bugs, as I had more time to work on it this week:
https://app.box.com/s/w21aziidzwp5d5n3kyki

- disabled api logging that was present in exp9, caused more trouble than help
- picked some fixes from latest api code
- possible fix for playlists showing empty, needs testing
- added a warning when trying to play all access tracks without a mobile device registered
- refresh cookie data more often
- added BigValen fix, thanks
- make url prefetching optional in settings, so you can test what works best for your config
** ignore ** forgot about my password per app thing.
I've been having difficulty with this too. About 5 days ago it stopped working. I'd started XBMC and was attempting to get a list of all songs. It listed them, but when I moved out and back in it generated the script failed error message.

This is the log generated. Not much info in it.

!-- begin debug log --!
version: 1.2.0-dev
logging to: ./gmusicapi.log
2013-10-28 15:08:22,902 - gmusicapi.Mobileclient1 (shared:58) [INFO]: initialized
2013-10-28 15:08:22,903 - gmusicapi.Mobileclient1 (shared:78) [INFO]: logged out
2013-10-28 15:08:22,904 - gmusicapi.Mobileclient2 (shared:58) [INFO]: initialized
2013-10-28 15:08:22,904 - gmusicapi.Mobileclient2 (shared:78) [INFO]: logged out
2013-10-28 15:08:22,949 - gmusicapi.Mobileclient1 (shared:202) [DEBUG]: ListTracks(args=[], kwargs={'max_results': 20000})
2013-10-28 15:08:29,722 - gmusicapi.Mobileclient1 (shared:243) [DEBUG]: {u'kind': u'sj#trackList', u'data': {u'items': ['<5987 tracks>']}}

This log is generated when I go to music addons and click the google music dev. It processes for a bit and then generates the message.

Here is the last part of the xbmc.log

15:08:19 T:140677867239168 WARNING: The python script "/home/jimbo/.xbmc/addons/service.playitx/TurtleMain.py" has left several classes in memory that we couldn't clean up. The classes include: Addon,Addon,Addon
15:08:22 T:140676779943680 NOTICE: Thread XBPyThread start, auto delete: false
15:08:22 T:140676779943680 NOTICE: -->Python Interpreter Initialized<--
15:08:22 T:140676779943680 NOTICE: GoogleMusic-0.8exp10 ARGV: ['plugin://plugin.audio.googlemusic/', '1', '']
15:08:22 T:140676779943680 NOTICE: CommonFunctions-2.5.1
15:08:22 T:140676779943680 NOTICE: warning: could not import appdirs; will use current directory
15:08:22 T:140676779943680 NOTICE: [GoogleMusic-0.8exp10] Loading library
15:08:22 T:140676779943680 NOTICE: [GoogleMusic-0.8exp10] Loading auth from cache
15:08:23 T:140678482085760 ERROR: XLCDproc::Connect - Unable to connect to host, LCDd not running?
15:08:23 T:140678482085760 ERROR: XLCDproc::Initialize - Connect failed. Retry in 8 seconds.
15:08:29 T:140676779943680 NOTICE: [GoogleMusic-0.8exp10] Library Size: 5987
15:08:29 T:140676779943680 NOTICE: [GoogleMusic-0.8exp10] First Song: {u'comment': u'', u'rating': u'0', u'composer': u'', u'year': 1971, u'creationTimestamp': u'1307490107291618', u'id': u'4a5fc75c-bba6-3738-b5f8-a1d28312538b', u'album': u'Glen Campbell: 20 Greatest Hits', u'totalDiscCount': 1, u'title': u'Both Sides, Now', u'recentTimestamp': u'1307490107287000', u'albumArtist': u'Glen Campbell', u'trackNumber': 15, u'discNumber': 1, u'deleted': False, u'totalTrackCount': 20, u'estimatedSize': u'7363303', u'beatsPerMinute': 0, u'genre': u'Country', u'playCount': 0, u'kind': u'sj#track', u'artist': u'Glen Campbell', u'lastModifiedTimestamp': u'1307494924310831', u'clientId': u'XimV1YCBfIvX8tAG7YFu/w', u'durationMillis': u'223190'}
15:08:29 T:140676779943680 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.AttributeError'>
Error Contents: 'NoneType' object has no attribute 'strip'
Traceback (most recent call last):
File "/home/jimbo/.xbmc/addons/plugin.audio.googlemusic/default.py", line 69, in <module>
navigation.api.updatePlaylistSongs('all_songs')
File "/home/jimbo/.xbmc/addons/plugin.audio.googlemusic/GoogleMusicApi.py", line 68, in updatePlaylistSongs
self.storage.storeApiSongs(api_songs, playlist_id)
File "/home/jimbo/.xbmc/addons/plugin.audio.googlemusic/GoogleMusicStorage.py", line 186, in storeApiSongs
":url, :total_discs, :duration_millis, :album_art_url, :display_name, NULL)", songs())
File "/home/jimbo/.xbmc/addons/plugin.audio.googlemusic/GoogleMusicStorage.py", line 180, in songs
'display_name': self._getSongDisplayName(api_song)
File "/home/jimbo/.xbmc/addons/plugin.audio.googlemusic/GoogleMusicStorage.py", line 301, in _getSongDisplayName
song_artist = song("artist").strip()
AttributeError: 'NoneType' object has no attribute 'strip'
-->End of Python script error report<--
15:08:29 T:140678482085760 ERROR: GetDirectory - Error getting plugin://plugin.audio.googlemusic
15:08:29 T:140678482085760 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.audio.googlemusic) failed
15:08:31 T:140678482085760 ERROR: XLCDproc::Connect - Unable to connect to host, LCDd not running?
15:08:31 T:140678482085760 ERROR: XLCDproc::Initialize - Connect failed. Retry in 16 seconds.
15:08:36 T:140678482085760 NOTICE: Storing total System Uptime
15:08:36 T:140678482085760 NOTICE: Saving settings
15:08:36 T:140678482085760 NOTICE: stop all
15:08:36 T:140678482085760 NOTICE: ES: Stopping event server
15:08:36 T:140678482085760 NOTICE: stopping upnp
15:08:36 T:140678482085760 NOTICE: stopping zeroconf publishing
15:08:36 T:140677440554752 NOTICE: ES: UDP Event server stopped
15:08:36 T:140678482085760 NOTICE: stop dvd detect media
15:08:36 T:140678482085760 NOTICE: stop sap announcement listener
15:08:36 T:140678482085760 NOTICE: clean cached files!
15:08:36 T:140678482085760 NOTICE: unload skin
15:08:36 T:140677858846464 NOTICE: StorageServer-2.5.2 Closed down
15:08:36 T:140678482085760 NOTICE: stop python
15:08:36 T:140678482085760 NOTICE: stopped
15:08:36 T:140678482085760 NOTICE: destroy
15:08:36 T:140678482085760 NOTICE: closing down remote control service
15:08:36 T:140678482085760 NOTICE: unload sections
15:08:37 T:140678482085760 NOTICE: destroy
15:08:37 T:140678482085760 WARNING: Attempted to remove window 10013 from the window manager when it didn't exist
15:08:37 T:140678482085760 WARNING: Attempted to remove window 10014 from the window manager when it didn't exist
15:08:37 T:140678482085760 WARNING: Attempted to remove window 10015 from the window manager when it didn't exist
15:08:37 T:140678482085760 WARNING: Attempted to remove window 10016 from the window manager when it didn't exist
15:08:37 T:140678482085760 WARNING: Attempted to remove window 10017 from the window manager when it didn't exist
15:08:37 T:140678482085760 WARNING: Attempted to remove window 10018 from the window manager when it didn't exist
15:08:37 T:140678482085760 WARNING: Attempted to remove window 10019 from the window manager when it didn't exist
15:08:37 T:140678482085760 WARNING: Attempted to remove window 10021 from the window manager when it didn't exist
15:08:37 T:140678482085760 WARNING: Attempted to remove window 10107 from the window manager when it didn't exist
15:08:37 T:140678482085760 WARNING: Attempted to remove window 10115 from the window manager when it didn't exist
15:08:37 T:140678482085760 WARNING: Attempted to remove window 10104 from the window manager when it didn't exist
15:08:37 T:140678482085760 NOTICE: closing down remote control service
15:08:37 T:140678482085760 NOTICE: unload sections
15:08:37 T:140678482085760 NOTICE: application stopped...


I double checked my account information. I'm running this under Linux, however I tried it on a win7 box and a win8 box.
hi guys,

if I add new songs/albums to google music, whats the best way to get them to show up in this plugin?

cheers
Ok, this version should fix the error:
0.8exp12
In the addon settings, Advanced tab choose option 'clean cache'.

(2013-10-29, 02:52)jbman Wrote: hi guys,

if I add new songs/albums to google music, whats the best way to get them to show up in this plugin?

cheers
I tried it.Cleared cache. It loads the addon. then script error after a short delay. Do the related scripts need updating?
Please post you xbmc.log contents again. It must be a different error.
Still empty playlists (All Access) with latest exp12 :-(
  • 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 35

Logout Mark Read Team Forum Stats Members Help
Google Music Addon5