public async Task <TvShowRequestBuilderV2> GetShowInfo(int id) { TheMovieDbRecord = await MovieDbApi.GetTVInfo(id.ToString()); BackdropPath = TheMovieDbRecord.Images?.Backdrops?.OrderBy(x => x.VoteCount).ThenBy(x => x.VoteAverage).FirstOrDefault()?.FilePath;; DateTime.TryParse(TheMovieDbRecord.first_air_date, out var dt); FirstAir = dt; // For some reason the poster path is always http PosterPath = TheMovieDbRecord.Images?.Posters?.OrderBy(x => x.VoteCount).ThenBy(x => x.VoteAverage).FirstOrDefault()?.FilePath; return(this); }
public async Task <TvShowRequestBuilderV2> GetShowInfo(int id, string langCode = "en") { TheMovieDbRecord = await MovieDbApi.GetTVInfo(id.ToString(), langCode); // Remove 'Specials Season' var firstSeason = TheMovieDbRecord.seasons.OrderBy(x => x.season_number).FirstOrDefault(); if (firstSeason?.season_number == 0) { TheMovieDbRecord.seasons.Remove(firstSeason); } BackdropPath = TheMovieDbRecord.Images?.Backdrops?.OrderBy(x => x.VoteCount).ThenBy(x => x.VoteAverage).FirstOrDefault()?.FilePath;; DateTime.TryParse(TheMovieDbRecord.first_air_date, out var dt); FirstAir = dt; // For some reason the poster path is always http PosterPath = TheMovieDbRecord.Images?.Posters?.OrderBy(x => x.VoteCount).ThenBy(x => x.VoteAverage).FirstOrDefault()?.FilePath; return(this); }