Retrieve Library.Id by path using JSON API?
#1
Hi guys,

My scenario is as follows:

I have a local server in my network with multiple TV recordings.
A simple inotify script automatically adds files to my library when they are written on the server.
To do that I am simply sending a JSON-RPC request to update that specific path in my library.
This works perfectly.

Now I would also like to automate the removal of files:
When a file is deleted and emits an IN_DELETE inotify event I want to send a VideoLibrary.RemoveEpisode request to Kodi.
Problem is I need the Library.Id for that file, if I am not mistaken.

Is there any way to retrieve the library id by specifying the URL of the file?

Doing a full VideoLibrary.Clean is out of the question because that would simply take too long.
Or is there maybe a way to specify which path to clean?

I am not very experienced with using the Kodi API, so if I missed something obvious, I am sorry.
I searched but couldn't find a solution to my problem.


Thanks a lot,
xiasou

edit: Damnit, sorry. I posted this to the wrong category by accident. This was meant to be posted to the JSON-RPC board.
Reply

Logout Mark Read Team Forum Stats Members Help
Retrieve Library.Id by path using JSON API?0