Jump to content

Imagepath of movie covers trough XBMC JSON RCP


BasJaspers

Recommended Posts

BasJaspers

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?

Link to comment
Share on other sites

marcelveldt

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

 

 

Verzonden vanaf mijn iPhone met Tapatalk

Link to comment
Share on other sites

BasJaspers

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.

Link to comment
Share on other sites

xnappo

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

Edited by xnappo
Link to comment
Share on other sites

BasJaspers

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.

Link to comment
Share on other sites

xnappo

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
Link to comment
Share on other sites

BasJaspers

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.

  • Like 1
Link to comment
Share on other sites

xnappo

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?

Link to comment
Share on other sites

  • 2 weeks later...
BasJaspers

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}
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...