Beispiel #1
0
        public static LogoChannel[] GetChannel(string channel)
        {
            List <LogoChannel> oReturn = new List <LogoChannel>();

            try
            {
                string  request  = "http://www.thelogodb.com/api/json/v1/2112/tvchannel.php?s=" + channel.ToLower().Trim().Replace(" ", "_");
                string  sContent = WebCache.Instance.GetWebData(request);
                JObject tObj     = JObject.Parse(sContent);
                JArray  tArray   = (JArray)tObj["channels"];
                foreach (JObject item in tArray)
                {
                    LogoChannel newItem = new LogoChannel()
                    {
                        LogoWide = (string)item["strLogoWide"]
                    };
                    oReturn.Add(newItem);
                }
            }
            catch { }

            return(oReturn.ToArray());
        }
Beispiel #2
0
        public static LogoChannel[] GetChannel(string channel)
        {
            List<LogoChannel> oReturn = new List<LogoChannel>();

            try
            {
                string request = "http://www.thelogodb.com/api/json/v1/2112/tvchannel.php?s=" + channel.ToLower().Trim().Replace(" ", "_");
                string sContent = WebCache.Instance.GetWebData(request);
                JObject tObj = JObject.Parse(sContent);
                JArray tArray = (JArray)tObj["channels"];
                foreach (JObject item in tArray)
                {
                    LogoChannel newItem = new LogoChannel()
                    {
                        LogoWide = (string)item["strLogoWide"]
                    };
                    oReturn.Add(newItem);
                }
            }
            catch { }

            return oReturn.ToArray();
        }