I'd like to know how I can instruct Kodi to search for new (music) content only inside a particular directory via JSON-RPC. I have my Kodi (more specifically OSMC) installed on a Raspberry Pi 2 and my music is hosted on another system via Samba (another Linux machine; Banana Pi). Now and then I get new music and first tag the whole album utilizing beets on the Banana Pi. Then, after the music was placed into its destination folder I perform a JSON-RPC call to my Kodi machine using this command:
curl --data-binary "{\"jsonrpc\": \"2.0\", \"method\": \"AudioLibrary.Scan\", \"id\": 1}" -H "content-type: application/json;" http://$KODIHOST/jsonrpc
Now I know that I can pass a parameter directory
to the AudioLibrary.Scan command, but I don't quite know the correct syntax for that. When I only want one particular album folder to be scanned, what would the correct syntax look like? Should I pass it the physical path where the music lies on the music host (like smb://{HOST}/HDD1/Media/Music/Albums/{Album_Name}
) or rather use the virtual directory names that I have in my Kodi library (like Albums
, Compilations
etc.)?
I already tried it a few times with the smb:// prefix approach in different variations but it either wouldn't work at all or it would just scan the whole music library which takes quite some time.
Any advice on how to achieve what I want and whether it's possible to the granularity I'd expect is highly appreciated!