0

when i try to get fanart url with Files.PrepareDownload, it responses error.

first I get movies with VideoLibrary.GetMovies:

http://<ip>/jsonrpc?request={"jsonrpc": "2.0", "params": {"sort": {"order": "ascending", "method": "title"}, "properties": ["title", "art", "file"]}, "method": "VideoLibrary.GetMovies", "id": "libMovies"}

VideoLibrary.GetMovies Response:

{"id":"libMovies","jsonrpc":"2.0","result":{"limits":{"end":1,"start":0,"total":1},"movies":[{"art":{"fanart":"image://http%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2f3Kgu3ys6W6UZWWFty7rlTWgST63.jpg​/","poster":"image://http%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fg23cs30dCMiG4ldaoVNP1ucjs6.jpg/"},"file":"D:\\Movie\\Film\\Fantastic.Four.2015.720p.BluRay.x264-GECKOS\\Fantastic.Four.2015.720p.BluRay.x264-GECKOS.mkv","label":"Fantastic Four","movieid":1,"title":"Fantastic Four"}]}}{"jsonrpc":"2.0","method":"GUI.OnScreensaverActivated","params":{"data":null,"sender":"xbmc"}}

Then i try to get prepared url with Files.PrepareDownload: Request:

http://<ip>/jsonrpc?request={"jsonrpc": "2.0", "params": {"path": "image://http%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2f3Kgu3ys6W6UZWWFty7rlTWgST63.jpg​/"}, "method": "Files.PrepareDownload", "id": "preparedl"}

Files.PrepareDownload Response:

{"error":{"code":-32602,"data":{"details":null},"message":"Invalid params."},"id":1,"jsonrpc":"2.0"}

Can anyone help me?

hrrs
  • 68
  • 8

1 Answers1

0

You need to do a POST to Files.PrepareDownload

Razze
  • 4,124
  • 3
  • 16
  • 23
  • would you give me an example about how to do it? – hrrs Nov 28 '15 at 00:26
  • Have a look at this code, it might help you to understand what I mean with POST instead of GET https://github.com/MilhouseVH/texturecache.py/blob/master/texturecache.py#L2178 – Razze Nov 29 '15 at 18:16