2013-06-25, 13:16
Hello
First of all:
I do not use the internal python engine!
I can't use this for some reason.
Well, most of my script works, but now I want to add a detection for active recordings and timeshift.
I don't know if the timeshift detection is possible (I hope, anyone who knows that?) but I found the "PVR.GetProperties" command which should return me if it's recording or not (at least I have understand the manual that way).
But I can't get it working. I always get parser error response if I send the command / url.
There must be something wrong with my query I think. Sad but true I haven't found any example for this method
Thanks in advance
First of all:
I do not use the internal python engine!
I can't use this for some reason.
Well, most of my script works, but now I want to add a detection for active recordings and timeshift.
I don't know if the timeshift detection is possible (I hope, anyone who knows that?) but I found the "PVR.GetProperties" command which should return me if it's recording or not (at least I have understand the manual that way).
But I can't get it working. I always get parser error response if I send the command / url.
Code:
# Retrives the playback details from XBNC for video
def __GetRecordingState(self, BaseUrl):
try:
RawRsp = urllib2.urlopen(BaseUrl + '{"jsonrpc":"2.0","method":"PVR.GetProperties","params":{"properties":["recording"]}')
Response = json.load(RawRsp)
print(Response)
self.Recording = Response['result']['recording']
except:
print("Unexpected error: ", sys.exc_info()[0])
pass # Some serious error happened, ignore.
#end try
#end def
There must be something wrong with my query I think. Sad but true I haven't found any example for this method
Thanks in advance