Exemple #1
0
 public bool SetResponseFormat()
 {
     if (parent.GetIp() != null && parent.GetIp() != "")
     {
         string[] response = parent.Request("SetResponseFormat", null, parent.GetIp());
         return(parent.CreateBoolRespose(response));
     }
     else
     {
         return(false);
     }
 }
Exemple #2
0
        public Image GetCoverArt()
        {
            String[]     stringList;
            MemoryStream stream       = null;
            Image        thumbnail    = null;
            WebClient    client       = new WebClient();
            Uri          xbmcThumbUri = new Uri("http://" + parent.GetIp() + "/thumb.jpg");

            stringList = parent.Request("GetCurrentlyPlaying", "q:/web/thumb.jpg");

            try
            {
                stream    = new MemoryStream(client.DownloadData(xbmcThumbUri));
                thumbnail = new Bitmap(Image.FromStream(stream));
            }
            catch (Exception e)
            {
                error = e.Message;
            }
            finally
            {
                client.Dispose();
            }

            return(thumbnail);
        }
Exemple #3
0
        public bool SetResponseFormat()
        {
            string[] aResult = null;
            string   ip      = parent.GetIp();

            if (ip != null && ip != "")
            {
                aResult = parent.Request("SetResponseFormat", null, ip);
            }

            if (aResult == null)
            {
                return(false);
            }
            else
            {
                return((aResult[0] == "OK") ? true : false);
            }
        }