Example #1
0
        /// <summary>
        /// Set the repeat mode of the player
        /// </summary>
        public async Task <string> SetRepeat(XBMCRPC.Player.Repeat repeat, int playerid = 0)
        {
            var jArgs = new JObject();

            if (playerid != null)
            {
                var jpropplayerid = JToken.FromObject(playerid, _client.Serializer);
                jArgs.Add(new JProperty("playerid", jpropplayerid));
            }
            if (repeat != null)
            {
                var jproprepeat = JToken.FromObject(repeat, _client.Serializer);
                jArgs.Add(new JProperty("repeat", jproprepeat));
            }
            return(await _client.GetData <string>("Player.SetRepeat", jArgs));
        }
Example #2
0
        public string SetRepeat2(int playerid = 0, XBMCRPC.Player.Repeat repeat = 0)
        {
            var jArgs = new JObject();

            if (playerid != null)
            {
                var jpropplayerid = JToken.FromObject(playerid, _client.Serializer);
                jArgs.Add(new JProperty("playerid", jpropplayerid));
            }
            if (repeat != null)
            {
                var jproprepeat = JToken.FromObject(repeat, _client.Serializer);
                jArgs.Add(new JProperty("repeat", jproprepeat));
            }
            var jRet = _client.GetData <string>("Player.SetRepeat", jArgs);

            return(jRet);
        }