コード例 #1
0
        public Movie GetTrailerInformation(string search)
        {
            Movie movie = CacheHelper.GetValue(search) as Movie;

            if (movie == null)
            {
                movie = new Movie();
                IVideo youtubeTrailerService = VideoFactory.Get(VideoFactory.VideoTypes.Youtube);
                IMovie opendbTrailerService  = MovieDBFactory.Get(MovieDBFactory.MovieDBTypes.Opendb);

                movie = opendbTrailerService.GetMovieInformation(search);

                if (movie.Title != null)
                {
                    GetMovieSources(movie, youtubeTrailerService);
                }
            }
            return(movie);
        }