Kodi(XBMC):使用Files.PrepareDownload(无效参数。错误)

时间:2015-11-26 22:32:47

标签: json-rpc xbmc kodi

当我尝试使用Files.PrepareDownload获取fanart网址时,它会回复错误。

首先我用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回复:

{"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"}}

然后我尝试使用Files.PrepareDownload获取准备好的URL: 请求:

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回复:

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

任何人都可以帮助我吗?

1 个答案:

答案 0 :(得分:0)

您需要对Files.PrepareDownload

进行POST