v15 Files.PrepareDownload returns path with vfs, but didn't work
#1
I first want to highlight a (slightly) incorrect link on the wiki (hopefully someone can correct this):
http://kodi.wiki/view/JSON-RPC_API chapter 2.2.4 Redirected file download, link points to an older version (v3, but shows v4, which I think should be the current (v6 but soon v8?)
http://kodi.wiki/view/JSON-RPC_API/v3#Fi...reDownload > http://kodi.wiki/view/JSON-RPC_API/#File...reDownload

Edit (2016-12-14): corrected the links on the wiki.

I'm using Files.PrepareDownload on a Rpi (OpenELEC 6.0.3). From the forum threads [1], [2] I get that I should use the whole path returned by 'Files.PrepareDownload'.
But I had to remove 'vfs/' from the path to get it to work. Is that expected, and is this somewhere explained?
I did find a thread [3] with hints that the possibility to download via vfs will be removed. But would expect Files.PrepareDownload not to return a path with 'vfs' (or did I encounter an bug?).

example query:
Code:
http://<host>:<port>/jsonrpc?request={"jsonrpc": "2.0", "method": "Files.preparedownload", "params": { "path": "/storage/.kodi/system/rtl 5.png" }, "id": 1}

response:
Code:
{"id":1,"jsonrpc":"2.0","result":{"details":{"path":"vfs/%2fstorage%2f.kodi%2fsystem%2frtl%205.png"},"mode":"redirect","protocol":"http"}}

working in a browser:
Code:
http://<host>:<port>/image/%2fstorage%2f.kodi%2fsystem%2frtl%205.png
So using ''http://<host>:<port>/image/' and adding the path without 'vfs/'.
Edit (2016-12-14): Above link is working in Crome, but wasn't in IE. I had to remove the additional / behind image (''http://<host>:<port>/image") so url decode results in just one slash.

Edit (2016-12-17): Created an sdcard with Kodi 16.1, and behavior is the same.

[1] http://forum.kodi.tv/showthread.php?tid=249696
[2] http://forum.kodi.tv/showthread.php?tid=205539
[3a] http://forum.kodi.tv/showthread.php?tid=...pid1101319
[3b] http://forum.kodi.tv/showthread.php?tid=...pid1102577
[3c] http://forum.kodi.tv/showthread.php?tid=...pid1102962
[3d] http://forum.kodi.tv/showthread.php?tid=...pid1165847
[3e] http://forum.kodi.tv/showthread.php?tid=...pid1205882
Reply

Logout Mark Read Team Forum Stats Members Help
Files.PrepareDownload returns path with vfs, but didn't work0