Jump to content


Photo

Imagepath of movie covers trough XBMC JSON RCP

JSON Cover

  • This topic is locked This topic is locked
8 replies to this topic

#1 BasJaspers OFFLINE  

BasJaspers

    Member

  • Members
  • 29 posts
  • Local time: 03:50 PM

Posted 29 December 2016 - 09:51 AM

I made a KODI remote that works on an iPad. All data displayed on the iPad is fetched trough the XBMC JSON RCP.

So to get information for all movies I am using the following command:

{"jsonrpc":"2.0","method":"VideoLibrary.GetMovies","params":{"properties":["thumbnail"]},"id":2}

This will give me all movies in the database of the Kodi client. One of the responses is the image path of the thumbnail.

Because i let the system save the image in the folders of the movies I would expect that response would be something similar like:

image://smb//server/movies/moviedir/coverwithmoviename.jpg

That is also exactly what i got before using the emby server as movie manager.

 

But now when i fetch a thumb i get:

image://http%3a%2f%2f172.16.65.31%3a8096%2femby%2fItems%2f036ed9eb3863c9ddfd23a944557b2cca%2fImages%2fPrimary%2f0%3fMaxWidth%3d10000%26MaxHeight%3d10000%26Format%3doriginal%26Tag%3d59fa47e518f240a4bde9cd3fe52f6653/

This looks like the location of the emby webserver which I am finding strange because the posters are saved in the movie folder.

Now this should not be a problem, but my system can not work with image strings longer then 256 characters (don't ask me why, the program environment is just stupid).

 

I have tried to save the image path in the *.nfo and that is save correct but when i query Kodi whe the JSON command it still fetches the http server location and not the smb location.

 

Is there something I could easily edit in some sort of xml file or make a change in the Emby settings or is this a bug?



#2 marcelveldt OFFLINE  

marcelveldt

    Advanced Member

  • Developers
  • 1836 posts
  • Local time: 03:50 PM
  • LocationRosmalen, The Netherlands

Posted 30 December 2016 - 11:41 AM

This is by design and not a bug. Emby sits between your actual files and the client


Verzonden vanaf mijn iPhone met Tapatalk

#3 BasJaspers OFFLINE  

BasJaspers

    Member

  • Members
  • 29 posts
  • Local time: 03:50 PM

Posted 31 December 2016 - 01:18 PM

And there is no way to shorten the name? Now it contains e.g. the with and height which is useless information for me. It is no problem for me if I need to edit some of the java script files, if someone could point me in the right direction.



#4 xnappo OFFLINE  

xnappo

    Advanced Member

  • Developers
  • 4755 posts
  • Local time: 08:50 AM
  • LocationAustin, TX

Posted 01 January 2017 - 04:44 PM

Just use a regular expression to cut off the size info and format and it will send you the default size.

Edited by xnappo, 01 January 2017 - 04:46 PM.


#5 BasJaspers OFFLINE  

BasJaspers

    Member

  • Members
  • 29 posts
  • Local time: 03:50 PM

Posted 04 January 2017 - 05:43 AM

Just use a regular expression to cut off the size info and format and it will send you the default size.

I am not really sure what you mean? I can not shorten the string on client side because then the image will not be opened.

So to fix this I need to do something on either the Emby server side or the emby plugin on the Kodi side. But it would be nice to know in which file(s) I need to look to edit this.



#6 xnappo OFFLINE  

xnappo

    Advanced Member

  • Developers
  • 4755 posts
  • Local time: 08:50 AM
  • LocationAustin, TX

Posted 04 January 2017 - 10:14 AM

You can use this:

http%3a%2f%2f172.16.65.31%3a8096%2femby%2fItems%2f036ed9eb3863c9ddfd23a944557b2cca%2fImages%2fPrimary%2f0%3fTag%3d59fa47e518f240a4bde9cd3fe52f6653/

instead of this:

http%3a%2f%2f172.16.65.31%3a8096%2femby%2fItems%2f036ed9eb3863c9ddfd23a944557b2cca%2fImages%2fPrimary%2f0%3fMaxWidth%3d10000%26MaxHeight%3d10000%26Format%3doriginal%26Tag%3d59fa47e518f240a4bde9cd3fe52f6653/

Just use a regular expression to cut out the fields you don't need in your code.

 

Translations with encodings replaced:

 

Use:

http://172.16.65.31:8096/emby/Items/036ed9eb3863c9ddfd23a944557b2cca/Images/Primary/?Tag=59fa47e518f240a4bde9cd3fe52f6653/

Instead of:

http://172.16.65.31:8096/emby/Items/036ed9eb3863c9ddfd23a944557b2cca/Images/Primary/?MaxWidth=10000&MaxHeight=10000&Format=original&Tag=59fa47e518f240a4bde9cd3fe52f6653/

What language are you using?  There is probably something to un-encode the url characters as well.

 

Here is the regular expression for the search part:

/Max.*original%26/

Edited by xnappo, 04 January 2017 - 10:45 AM.


#7 BasJaspers OFFLINE  

BasJaspers

    Member

  • Members
  • 29 posts
  • Local time: 03:50 PM

Posted 10 January 2017 - 08:43 AM

Thank you very much. I was not aware that the text after the "?" where parameters. Now it is totally logical that you can remove these.

This helped me a lot.


  • xnappo likes this

#8 xnappo OFFLINE  

xnappo

    Advanced Member

  • Developers
  • 4755 posts
  • Local time: 08:50 AM
  • LocationAustin, TX

Posted 14 January 2017 - 01:13 PM

Glad to help.

 

I am curious - currently there is a problem with the Yatse remote when using Emby for Kodi redirects instead of direct paths.  Are you able to launch playback without changing the addon to use direct paths?



#9 BasJaspers OFFLINE  

BasJaspers

    Member

  • Members
  • 29 posts
  • Local time: 03:50 PM

Posted 25 January 2017 - 05:25 AM

Glad to help.

 

I am curious - currently there is a problem with the Yatse remote when using Emby for Kodi redirects instead of direct paths.  Are you able to launch playback without changing the addon to use direct paths?

 

I am using direct paths. But when I have some spare time I will check if it also works with indirect paths.

I am using the following JSON command to start a movie:

 

Get movie ID's:

{"jsonrpc":"2.0","method":"VideoLibrary.GetMovies","params":{"limits":{"end":10,"start":0}},"id":4}

Which results in:

{
"limits": {
"end": 10,
"start": 0,
"total": 23
},
"movies": [
{
"label": "We Were Soldiers",
"movieid": 1
},
{
"label": "X-Men 2",
"movieid": 2
},
{
"label": "300: Rise of an Empire",
"movieid": 3
},
{
"label": "About Time",
"movieid": 4
},
{
etc.

After that I start a movie by opening it with the movieid:

{"jsonrpc": "2.0", "method": "Player.Open", "params": {"item": {"movieid":7}}, "id": 4}






Also tagged with one or more of these keywords: JSON, Cover

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users