Kodi Community Forum

Full Version: Looking for a way to get kodi pictures through the API
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all

I'm looking for a way to display pictures (png/jpg) in a table in a angularJS open source remote.
The remote: https://github.com/gabriel-detassigny/kodi-angular

There's lists created already in the remote and I wanted to use the code structure to create a simular list for pictures.
However, I can't seem to find the proper methods on: http://kodi.wiki/view/JSON-RPC_API/v6 to do the trick.

There's some working code for Music, taken from the remote:
Code:
artists: function(artistNum, size) {
      var deferred = $q.defer();
      KodiWS.send('AudioLibrary.GetArtists', { properties: ['genre'], sort: { method: 'artist' }, limits: { start: artistNum, end: artistNum + size }}).then(function(data) {
        deferred.resolve(data);
      });
      return deferred.promise;
    },

However, I'm not finding any examples for Pictures here: http://kodi.wiki/view/JSON-RPC_API/Examp..._libraries.
Or anywhere else... Tried to achieve something simular via the http://kodi.wiki/view/JSON-RPC_API/v6#Fi...ileDetails method, but alas, no success.

So yeah, if anyone could offer any pointers here, that would be just great.

Thanks in advance.
Just use the thumbnail property or the art property:

Code:
"properties": ["genre","art","thumbnail"]
Hi there

I'm sorry, I was out for 2 weeks. (conference)

I'm looking for a corresponding method that's listed here: http://kodi.wiki/view/JSON-RPC_API/v6

Do you find any in that list that is the equivalent of this thumbnail or genre property?
Some extra info on what I'm trying to achieve really:

There's an easy way to retrieve all movies or all artists, genres, songs.
They are all part of the http://kodi.wiki/view/JSON-RPC_API/v6#AudioLibrary or the http://kodi.wiki/view/JSON-RPC_API/v6#VideoLibrary.

What I want is to retrieve all pictures (png, jpg, whatever i don't even care at this point.
But there is no PictureLibrary and I don't find any corresponding methods in the http://kodi.wiki/view/JSON-RPC_API/v6 API documentation.

Any help would be much appreciated Smile
The more I look into this, the more I'm believing there's just no method or function available for this in the JSON-RPC_API

edit: Maybe there's a method to list all files, items, whatever in one specific folder then?
Exactly what pictures are you trying to get, Give some context..
Yes there is not a image library but there can be image sources, or do you want pictures from your video library? audio library? pictures in picture plugin?
This is all possible.
Just images that are nothing more than a png or jpg image.
They are stored on a SD card in the raspberry in a specific folder.
You want a way of using angularJS to search a filesystem for a particular type of file? A file that may or may not be used by Kodi?

That doesn't sound like a Kodi development question. Sorry I can't be more helpful but I don't know anything about the capabilities of angularJS.

If you must use kodi json-rpc then use recursive calls to GetDirectory.

If angularJS can call a bash script then look at this: http://stackoverflow.com/questions/16758...-with-find