Exemple #1
0
        public List <DetailVideoInfo> GetVideoChoices(VideoInfo video)
        {
            List <DetailVideoInfo> DetailedVideos = new List <DetailVideoInfo>();

            DetailedVideos.Add(new TMDBVideoInfo(video)
            {
                Title2 = "Full Movie", parent = this
            });
            if (video.Other.GetType() == typeof(TMDbVideoDetails))
            {
                TMDbVideoDetails videoDetail = (TMDbVideoDetails)video.Other;

                foreach (TMDB.Trailer trailer in videoDetail.TMDbDetails.videos.TrailerList())
                {
                    var clip = new TMDBVideoInfo();
                    clip.Description = videoDetail.TMDbDetails.overview;
                    clip.Thumb       = videoDetail.TMDbDetails.PosterPathFullUrl();
                    clip.Title       = string.Format("{0}  –  {1}", video.Title, trailer.name);
                    clip.Airdate     = videoDetail.TMDbDetails.ReleaseDateAsString();
                    clip.Title2      = trailer.name;
                    clip.VideoUrl    = "https://www.youtube.com/watch?v=" + trailer.key;
                    DetailedVideos.Add(clip);
                }
            }
            return(DetailedVideos);
        }
        public List<DetailVideoInfo> GetVideoChoices(VideoInfo video)
        {
            List<DetailVideoInfo> DetailedVideos = new List<DetailVideoInfo>();
            DetailedVideos.Add(new TMDBVideoInfo(video) { Title2 = "Full Movie", parent = this });
            if (video.Other != null && video.Other.GetType() == typeof(TMDbVideoDetails))
            {
                TMDbVideoDetails videoDetail = (TMDbVideoDetails)video.Other;

                foreach (TMDB.Trailer trailer in videoDetail.TMDbDetails.videos.TrailerList())
                {
                    var clip = new TMDBVideoInfo();
                    clip.Description = videoDetail.TMDbDetails.overview;
                    clip.Thumb = videoDetail.TMDbDetails.PosterPathFullUrl();
                    clip.Title = string.Format("{0}  –  {1}", video.Title, trailer.name);
                    clip.Airdate = videoDetail.TMDbDetails.ReleaseDateAsString();
                    clip.Title2 = trailer.name;
                    clip.VideoUrl = "https://www.youtube.com/watch?v=" + trailer.key;
                    DetailedVideos.Add(clip);
                }
            }
            return DetailedVideos;
        }