Kodi Community Forum
PVR.GetRecordings - Missing Details - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+---- Forum: JSON-RPC (https://forum.kodi.tv/forumdisplay.php?fid=174)
+---- Thread: PVR.GetRecordings - Missing Details (/showthread.php?tid=309891)



PVR.GetRecordings - Missing Details - Fergus - 2017-03-18

Kodi Device : Raspberry Pi 2
Kodi Version: OSMC / Kodi 17 RC1
PVR: HTS Tvheadend 4.0.9-16~g63c1034~xenial (running on a separate server)

I've been trying to access details of my recorded shows from the JSON interface so that I can view the list and make selections directly from my old Philips TSU9600 Remote Control.

I can retrieve the name ("label") and recordingid of each show, and am able to list and select these successfully from my remote control. What I can't do however is retrieve additonal information such as the starttime for each recording. Where I've recorded multiple episodes of the same show, this means I can't easily tell which is which!

According to the Wiki, I should be able to retrieve a wider set of results from PVR.GetRecordings than I'm getting.
http://kodi.wiki/view/JSON-RPC_API/v8#PVR.GetRecordings leads me to http://kodi.wiki/view/JSON-RPC_API/v8#PVR.Details.Recording

My Request: http://192.168.1.4:8080/jsonrpc?request={"jsonrpc": "2.0", "method": "PVR.GetRecordings","params":{"properties":[],"limits":{"start":0}}, "id": 1}
Kodi Resonse:
Code:
{"id":1,"jsonrpc":"2.0","result":{"limits":{"end":10,"start":0,"total":10},"recordings":[{"label":"Live at the Apollo","recordingid":7},{"label":"Whole Lotta Riffs","recordingid":1},{"label":"Live at the Apollo","recordingid":8},{"label":"The Last Leg","recordingid":9},{"label":"Mystery of the Man on the Moor","recordingid":10},{"label":"The Last Leg","recordingid":2},{"label":"Classic Albums: Primal Scream -...","recordingid":3},{"label":"Live at the Apollo","recordingid":4},{"label":"Top Gear","recordingid":5},{"label":"Crufts 2017","recordingid":6}]}}

I thought perhaps I might need to make a call to PVR.GetRecordingDetails, but this doesn't seem to appear any additional data.

My Request: http://192.168.1.4:8080/jsonrpc?request={"jsonrpc": "2.0", "method": "PVR.GetRecordingDetails","params":{"recordingid":10,"properties":[]}, "id": 1}
Kodi Response:
Code:
{"id":1,"jsonrpc":"2.0","result":{"recordingdetails":{"label":"Mystery of the Man on the Moor","recordingid":10}}}

Any idea what I'm doing wrong here, or whether there's a bug with the JSON interface that needs to be raised?

For what it's worth - both the Estuary skin and the Official Kodi Remote for iOS have no problems showing channel, recording date etc, but the browser-based interface shows some anomolies:
ImageCapture by Fergus George


RE: PVR.GetRecordings - Missing Details - djbloc - 2017-03-19

I new to the Kodi JSON API but I think you need to specify the attributes you want in the properties list.

Run both of the commands below and note the difference in results between:

Code:
{"jsonrpc":"2.0","method":"VideoLibrary.GetTVShows","params": { "limits": { "start" : 0, "end": 500 } }, "id":1}

and


Code:
{"jsonrpc":"2.0","method":"VideoLibrary.GetTVShows","params": { "limits": { "start" : 0, "end": 500 }, "properties": ["episode", "art", "plot", "title", "originaltitle", "rating", "thumbnail", "playcount", "file", "fanart"] }, "id":1}



RE: PVR.GetRecordings - Missing Details - Fergus - 2017-03-19

Thanks djbloc, I thought an empty properties list returned every attribute but you're absolutely right - I need to specify the ones I want!

Many thanks for taking the time to respond and setting me straight!