"Files.PrepareDownload" error from Kodi causes missing movie/show
Closed this issue · 5 comments
For certain elements of my library, Kodi responds with an error, response is like this:
{"error":{"code":-32602,"data":{"details":null},"message":"Invalid params."},"id":"preparedownload","jsonrpc":"2.0"}
I'm not sure yet why this error occurs, "invalid params" does not say too much so I will need to check that.
But in TeX, the error is ERROR TypeError: Cannot read properties of undefined (reading 'details')
, it happens in getPreparedFileUrl
:
map(rep => { return this.getBaseUrl() + rep.details.path})
Here rep
instance is undefined
. I guess in general, any error from Kodi should have some fallback logic in TeX, e.g. showing some placeholder image but the movie/show metadata should still be visible (right now there is just empty space in the list).
I will try to work on this issue in my own fork when I get some more time.
Tanks for your report.
I'm not able to reproduce this issue with my library. Which version of Kodi and TeX do you use?
It turned out to be some issue with Kodi having outdated information about files on disk. For example, if you rename a folder or a file with a movie or a show, then I think you would get that error back from Kodi.
After cleaning and updating the library, all seems OK again.
It's not a bug, it's why kodi works. If you change the path of a file, you need to clean and update your library.
The bug is in TeX as I mentioned above - there is no error handling currently.
Okay I anderstand better now.
It's fixed in V1.1.0