2017-10-30, 12:22
Hi,
I'm wondering whether there is any way to delete a PVR recording via a Python script.
I'm using Kodi v17.5 with TVHeadend 4.2.2.
My script is intended to delete all watched PVR recordings, which I was then going to map to a remote button in the TVRecordings window.
I can identify the recordings to delete via the JSON API using PVR.GetRecordings and picking out those where playcount>0.
However, I cannot find any methods within either the JSON API or the Python modules to perform the deletion. I switched on debug logging and manually deleted a recording and from what I can tell it makes a call to the pvr.hts addon, so I am guessing it's all wrapped up in the C++ code. I've read through the JSON API and Python manuals and cannot find any methods for deleting a recording via a python script.
I also tried using xbmcvfs.delete and passing the filename (pvr://....), but this method does not seem to support PVR files.
I have thought of trying to interface directly into TVHeadend using it's API, but though I would check I haven't missed anything before I throw away my python script and start again.
The script I have so far can be found here: http://sprunge.us/XHVE
Thanks in advance...
I'm wondering whether there is any way to delete a PVR recording via a Python script.
I'm using Kodi v17.5 with TVHeadend 4.2.2.
My script is intended to delete all watched PVR recordings, which I was then going to map to a remote button in the TVRecordings window.
I can identify the recordings to delete via the JSON API using PVR.GetRecordings and picking out those where playcount>0.
However, I cannot find any methods within either the JSON API or the Python modules to perform the deletion. I switched on debug logging and manually deleted a recording and from what I can tell it makes a call to the pvr.hts addon, so I am guessing it's all wrapped up in the C++ code. I've read through the JSON API and Python manuals and cannot find any methods for deleting a recording via a python script.
I also tried using xbmcvfs.delete and passing the filename (pvr://....), but this method does not seem to support PVR files.
I have thought of trying to interface directly into TVHeadend using it's API, but though I would check I haven't missed anything before I throw away my python script and start again.
The script I have so far can be found here: http://sprunge.us/XHVE
Thanks in advance...