Exemplo n.º 1
0
        public string Open2(XBMCRPC.Playlist.Item item = null, optionsType options = null)
        {
            var jArgs = new JObject();

            if (item != null)
            {
                var jpropitem = JToken.FromObject(item, _client.Serializer);
                jArgs.Add(new JProperty("item", jpropitem));
            }
            if (options != null)
            {
                var jpropoptions = JToken.FromObject(options, _client.Serializer);
                jArgs.Add(new JProperty("options", jpropoptions));
            }
            var jRet = _client.GetData <string>("Player.Open", jArgs);

            return(jRet);
        }
Exemplo n.º 2
0
        public string Add(int playlistid = 0, XBMCRPC.Playlist.Item item = null)
        {
            var jArgs = new JObject();

            if (playlistid != null)
            {
                var jpropplaylistid = JToken.FromObject(playlistid, _client.Serializer);
                jArgs.Add(new JProperty("playlistid", jpropplaylistid));
            }
            if (item != null)
            {
                var jpropitem = JToken.FromObject(item, _client.Serializer);
                jArgs.Add(new JProperty("item", jpropitem));
            }
            var jRet = _client.GetData <string>("Playlist.Add", jArgs);

            return(jRet);
        }