Example #1
0
        /// <summary>
        /// Retrieves the recordings
        /// </summary>
        public async Task <XBMCRPC.PVR.GetRecordingsResponse> GetRecordings(XBMCRPC.PVR.Fields.Recording properties = null, XBMCRPC.List.Limits limits = null)
        {
            var jArgs = new JObject();

            if (properties != null)
            {
                var jpropproperties = JToken.FromObject(properties, _client.Serializer);
                jArgs.Add(new JProperty("properties", jpropproperties));
            }
            if (limits != null)
            {
                var jproplimits = JToken.FromObject(limits, _client.Serializer);
                jArgs.Add(new JProperty("limits", jproplimits));
            }
            return(await _client.GetData <XBMCRPC.PVR.GetRecordingsResponse>("PVR.GetRecordings", jArgs));
        }
Example #2
0
        /// <summary>
        /// Retrieves the details of a specific recording
        /// </summary>
        public async Task <XBMCRPC.PVR.GetRecordingDetailsResponse> GetRecordingDetails(int recordingid = 0, XBMCRPC.PVR.Fields.Recording properties = null)
        {
            var jArgs = new JObject();

            if (recordingid != null)
            {
                var jproprecordingid = JToken.FromObject(recordingid, _client.Serializer);
                jArgs.Add(new JProperty("recordingid", jproprecordingid));
            }
            if (properties != null)
            {
                var jpropproperties = JToken.FromObject(properties, _client.Serializer);
                jArgs.Add(new JProperty("properties", jpropproperties));
            }
            return(await _client.GetData <XBMCRPC.PVR.GetRecordingDetailsResponse>("PVR.GetRecordingDetails", jArgs));
        }