private static string GetImage(SearchMovie movie) { if (movie.BackdropPath != null) { return(MessagerHelper.InsertInvisibleLink("https://image.tmdb.org/t/p/w780/" + movie.BackdropPath, ParseMode.Html)); } if (movie.PosterPath != null) { return(MessagerHelper.InsertInvisibleLink("https://image.tmdb.org/t/p/w500/" + movie.PosterPath, ParseMode.Html)); } return(string.Empty); }
private static string GetImage(Series tvShow) { var bannerText = string.Empty; if (tvShow.Banners.Count > 0) { bannerText = MessagerHelper.InsertInvisibleLink( "http://thetvdb.com/banners/" + tvShow.Banners.First().RemotePath, ParseMode.Html); } else if (!string.IsNullOrWhiteSpace(tvShow.BannerRemotePath)) { bannerText = MessagerHelper.InsertInvisibleLink("http://thetvdb.com/banners/" + tvShow.BannerRemotePath, ParseMode.Html); } else if (!string.IsNullOrWhiteSpace(tvShow.PosterRemotePath)) { bannerText = MessagerHelper.InsertInvisibleLink("http://thetvdb.com/banners/" + tvShow.PosterRemotePath, ParseMode.Html); } return(bannerText); }