Example #1
0
        public ActionResult Index()
        {
            if (!Request.IsLocal)
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.BadRequest));
            }

            var model = new List <Tuple <DateTime, string, string, string> >();

            var logs = Task.Run(DocumentRepository <RequestLog> .GetItemsAsync).Result;

            foreach (var requestLog in logs.Where(x => x.ShowName != "-").OrderByDescending(x => x.TimeStamp))
            {
                var match = TvInfoService.FindShow(requestLog.ShowName, "en-GB", true);

                model.Add(new Tuple <DateTime, string, string, string>(requestLog.TimeStamp, requestLog.ShowName, match != null ? match.Name : "Unmatched", requestLog.ResponseText));
            }

            return(View(model));
        }
Example #2
0
 public void Run()
 {
     TvInfoService.StoreShows();
     AppCache.Clear();
     TvInfoService.GetShows();
 }
        public ActionResult Index()
        {
            var model = TvInfoService.GetShows();

            return(View(model));
        }
        public ActionResult Index()
        {
            TvInfoService.StoreShows();

            return(View());
        }