Kodi Community Forum

Full Version: MAc OS X - retrieving music thumbnails
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,

I have been developping a remote control for XBMC based on the JSON-rpc interface for a web application.

Everything is going fine until yesterday, I think I found a bug:

Everytime I am trying to retrieve the thumbnail of an album (it works perfectly with movies / TV shows), the websocket connection (that is what I am using to communicate) just close down. No error, nothing.

Again, it is working just fine for movies, but crashes for music. Even if I am retrieving the thumbnail for a single album (either it is populated in XBMC or not), it just crashes.

I am using Frodo 12.3 XBMC for Mac (64 bit version). Anyone has an idea?


These are extracts of my code:
This works perfectly as soon as I remove "thumbnail" in the second list... Otherwise the websocket connexion crashes.

I have the same problem with AudioLibrary.getSongs or any other audio-related method, when retrieving (only) the athumbnail. I have been on this bug for 24H,... I am sure it is coming from XBMC...
And I looked everywhere noone seems to have the same problem...


Code:
this.request({
                            'method': "Player.GetItem",
                            "params": {
                                "properties": data.result[0].type=="video" ?
                                    ["title", "album", "artist", "season", "episode", "duration", "showtitle", "tvshowid", "thumbnail", "file", "fanart", "streamdetails"]:
                                    ["title", "album", "artist", "thumbnail", "duration", "file", "fanart", "streamdetails"],
                                "playerid":this.playerid
                                },
                            'success': function(data){
                                console.debug('here');
                                /*... do more things ... */
                            }
                        });
There is a bug on OSX where the filesystem reports bad UTF-8 paths which can't be decoded by the client. But then the same should probably happen for videos as well or the problem could also happen with the "file" property.

I don't have an OSX install so I was never able to confirm this myself or try to fix it.

Could you post a debug log where you run the troublesome request?
There is nothing in the debug log. I'll get one debug log in 2 minutes.

That is the part of the log:

13:20:11 T:4558729216 DEBUG: JSONRPC: Incoming request: {"jsonrpc":"2.0","method":"AudioLibrary.GetAlbums","id":3,"params":{"properties":["description","theme","mood","style","type","albumlabel","artist","genre","rating","title","year","thumbnail"],"sort":{"method":"artist"}}}
13:20:11 T:4558729216 DEBUG: JSONRPC: Calling audiolibrary.getalbums
13:20:11 T:4558729216 DEBUG: GetAlbumsByWhere query: SELECT albumview.* FROM albumview WHERE albumview.strAlbum <> ''
13:20:11 T:4558729216 DEBUG: GetAlbumsByWhere - query took 49 ms
13:20:11 T:4558729216 DEBUG: DatabaseUtils::GetSortFieldList: unknown field 26
13:20:12 T:4558729216 INFO: JSONRPC Server: Disconnection detected
I just tested from a Windows PC and it works. So it is coming from the OS X version....
Ok the bug was coming some UTF8 character in the music thumbnail. Safari (only) gave me this error, FF would just say connection closed...

[Error] WebSocket connection to 'ws://null:[email protected]:9090/jsonrpc' failed: Could not decode a text frame as UTF-8. (192.168.0.204, line 0)

It is not really important for me right now, but could you explain more of the problem. The client cannot decode UTF8?!
See http://trac.xbmc.org/ticket/13878 for some details on the matter.