Пример #1
0
        public ActionResult Movies(DiscoverMoviesParameters model)
        {
            model.ApiKey = Tmdb.ApiKey;
            model.page = 1;
            Session["currentMovieSearch"] = model;

            var queryResult = model.GetTmdbDiscoverMoviesQueryString();
            var tmdb = new Tmdb();
            var movieResults = tmdb.DiscoverMovies(queryResult);

            return View("MovieList", movieResults);
        }
Пример #2
0
        public ActionResult Tv(DiscoverTvShowsParameters model)
        {
            model.ApiKey = Tmdb.ApiKey;
            model.page = 1;
            Session["currentTvSearch"] = model;

            var queryResult = model.GetTmdbDiscoverTvShowsQueryString();
            var tmdb = new Tmdb();
            var tvShowResults = tmdb.DiscoverTvShows(queryResult);

            return View("TvList", tvShowResults);
        }
Пример #3
0
        public ActionResult TvList(int? id)
        {
            if (Session["currentTvSearch"] == null || id == null)
            {
                return Redirect("Tv");
            }
            DiscoverTvShowsParameters model = Session["currentTvSearch"] as DiscoverTvShowsParameters;
            model.page = id;

            var queryResult = model.GetTmdbDiscoverTvShowsQueryString();
            var tmdb = new Tmdb();
            var tvShowResults = tmdb.DiscoverTvShows(queryResult);

            return View("TvList", tvShowResults);
        }
Пример #4
0
        public ActionResult MovieList(int? id)
        {
            if (Session["currentMovieSearch"] == null || id == null)
            {
                return Redirect("Movies");
            }
            DiscoverMoviesParameters model = Session["currentMovieSearch"] as DiscoverMoviesParameters;
            model.page = id;

            var queryResult = model.GetTmdbDiscoverMoviesQueryString();
            var tmdb = new Tmdb();
            var movieResults = tmdb.DiscoverMovies(queryResult);

            return View("MovieList", movieResults);
        }