Kodi TV show art

Hi!
I’m trying to find a solution for get the TV show art from Kodi instead of thumbnail of the actual video for the entity_picture, like in the Plex integration. I think that would be more useful, because the thumbnail is a random picture about the video, and it’s not really useable for anything…
Is it possible to solve that?

Thank you!

I’d be interested in that too.
I found this partial solution:

http://192.168.xxx.xxx:8080/jsonrpc?request={"jsonrpc":"2.0","method":"Player.GetItem","params":{"properties":["thumbnail","fanart"],"playerid":1},"id":"AudioGetItem"}

If you copy this into your browser you will get something like this:

{"id":"AudioGetItem","jsonrpc":"2.0","result":{"item":{"fanart":"image://smb%3a%2f%2f192.168.2.102%2fMovies%2f-%20%3d%20Movies%20%3d%20-%2fHorrible.Bosses.2011.ReTaiL.THeaTRiCaL.CuT.BDRiP.XviD.HuN-PpB%2fHorrible.Bosses-fanart.jpg/","id":4273,"label":"Horrible.Bosses","thumbnail":"image://smb%3a%2f%2f192.168.2.102%2fMovies%2f-%20%3d%20Filmek%20%3d%20-%2fHorrible.Bosses.2011.ReTaiL.THeaTRiCaL.CuT.BDRiP.XviD.HuN-PpB%2fHorrible.Bosses-poster.jpg/","type":"movie"}}}

But I don’t know what I can do with it.

I think the main problem is that the Kodi WebUI using the thumbnail too, and what I see, that the integration get that image too. For movies, this is fine, because the WebUI using the cover, but for series using the episode thumbnail.
For your example, if you change the “thumbnail”,“fanart” to “art”, you will get back all the images which connected to the played item. It’s a good start btw, just need to figure it out how we can use it in the integration.

Örülök, hogy nem csak engem foglalkoztat ez a probléma :slight_smile:

After half a day of experimentation, a little step forward …
if this:

"Image: //smb%3a%2f%2f192.168.2.102%2fMovies%2f-%20%3d%20Filmek%20%3d%20-%2fHorrible.Bosses.2011.ReTaiL.THeaTRiCaL.CuT.BDRiP.XviD .HuN-ppb% 2fHorrible.Bosses-poster.jpg / "

I copied it into my browser, I didn’t get anything, but if
I corrected it a bit :

file://192.168.2.102/Movies/-%20=%20Filmek%20=%20-/Horrible.Bosses.2011.ReTaiL.THeaTRiCaL.CuT.BDRiP.XviD.HuN-PpB/Horrible.Bosses-poster.jpg

then I got an image in the browser.
But unfortunately this is still not enough ,because I could not put this into e.g. a picture card. :slightly_frowning_face:

Now i had step a bigger one.
I already have a sensor that includes the path and name of the image.

 sensor.kodi_cover        value: https://artworks.thetvdb.com/banners/episodes/73918/132302.jpg	
                          friendly_name: Kodi Cover

There is still no practical use, but perhaps the direction is good.
Here is the sensor:

- platform: command_line
  name: Kodi Cover
  command: 'curl -H "Content-Type: application/json" --data-binary "{\"jsonrpc\": \"2.0\", \"method\": \"Player.GetItem\", \"params\": { \"properties\": [\"thumbnail\"], \"playerid\": 1 }, \"id\": \"VideoGetItem\"}" http://username:[email protected]:8080/jsonrpc'
  value_template: >
    {% set data= value | regex_findall_index('thumbnail(.*)type') | replace('%2f', '/') | replace('%20', ' ') | replace('%3a', ':') | replace('%3d', '=')   %}
    {{ data [11:-4] }}
1 Like

I guess it’s a bit late, but in case you didn’t find a solution, here is how i’ve done it:

      cards:
        - type: custom:layout-card
          layout: vertical
          cards:
            - type: 'custom:config-template-card'
              entities:
                - sensor.caratula_kodi
              card:
                type: 'custom:hui-image-element'
                entity: sensor.caratula_kodi
                image: "${states['sensor.caratula_kodi'].state}"

You should install (through HACS or manually) the module “Config Template Card” so you can use a template to fetch the url from the sensor and show it in a lovelace card:

https://github.com/iantrich/config-template-card