Exemple #1
0
        /// <summary>
        /// Retrieves the channel list
        /// </summary>
        public async Task <XBMCRPC.PVR.GetChannelsResponse> GetChannels(XBMCRPC.PVR.Fields.Channel 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.GetChannelsResponse>("PVR.GetChannels", jArgs));
        }
Exemple #2
0
        public GetChannelDetailsResponse GetChannelDetails(int channelid = 0, XBMCRPC.PVR.Fields.Channel properties = null)
        {
            var jArgs = new JObject();

            if (channelid != null)
            {
                var jpropchannelid = JToken.FromObject(channelid, _client.Serializer);
                jArgs.Add(new JProperty("channelid", jpropchannelid));
            }
            if (properties != null)
            {
                var jpropproperties = JToken.FromObject(properties, _client.Serializer);
                jArgs.Add(new JProperty("properties", jpropproperties));
            }
            var jRet = _client.GetData <GetChannelDetailsResponse>("PVR.GetChannelDetails", jArgs);

            return(jRet);
        }