예제 #1
0
        public ActionResult Refresh()
        {
            var videos = backendDomain.GetVideos(true, VideoSearchConstants.GetRandomQuery()).Result as List <VideoDatabaseResposne>;

            Counter.setSize(videos.Count);
            VideoList.SetVideos(videos);

            ViewBag.VideoTitle = VideoList.GetVideo(Counter.GetCounter()).Title;
            ViewBag.Url        = VideoList.GetVideo(Counter.GetCounter()).Url;
            Counter.HitCounter();

            return(View("About"));
        }
예제 #2
0
        public ActionResult About()
        {
            if (Counter.GetCounter() == 0)
            {
                backendDomain.SetupDatabase();
                var videos = backendDomain.GetVideos() as List <VideoDatabaseResposne>;
                VideoList.SetVideos(videos);

                var vid = VideoList.GetVideo(Counter.GetCounter());
                ViewBag.VideoTitle = vid.Title;
                ViewBag.Url        = vid.Url;

                Counter.setSize(videos.Count);
                Counter.HitCounter();
            }

            return(View());
        }
예제 #3
0
        public ActionResult About()
        {
            if (!this.backendDomain.AreThereVideosCurrently())
            {
                this.backendDomain.SetupDatabase();
            }
            else
            {
                var videos = this.backendDomain.GetVideos().Result as List <VideoDatabaseResposne>;
                VideoList.SetVideos(videos);

                var vid = VideoList.GetVideo(Counter.GetCounter());
                this.ViewBag.VideoTitle = vid.Title;
                this.ViewBag.Url        = vid.Url;

                Counter.setSize(videos.Count);
                Counter.HitCounter();
            }

            return(this.View());
        }