public TMDbTvShow GetTvShow(string id, PosterSize size = PosterSize.w500, string defaultPosterPath = "") { var show = client.GetTvShow(id); show.PosterPath = show.PosterPath.HasValue() ? BasePosterPath + size + show.PosterPath : defaultPosterPath; return show; }
public static string getMoviePosterPath(int idMovies, PosterSize size) { string path = buildPosterPath(movieImagesPath + idMovies.ToString(), moviePosterName, size); if (moviePosterInDB(idMovies)) { return path; } else { return getNoPic(size); } }
public static string getPersonPortraitPath(int idPerson, PosterSize size) { string path = buildPosterPath(personImagesPath + idPerson.ToString(), personPortraitName, size); if (personPortraitInDB(idPerson)) { return path; } else { return getNoPic(size); } }
public List<TMDbTvShow> GetTopRatedTvShows(string defaultPosterPath = "", PosterSize size = PosterSize.w500) { var shows = client.GetTopRatedTvShows(); foreach (var show in shows) { show.PosterPath = show.PosterPath.HasValue() ? BasePosterPath + size + show.PosterPath : defaultPosterPath; } return shows; }
public List<TMDbTvShow> SearchTvShows(string query, PosterSize size = PosterSize.w500, string defaultPosterPath = "") { if (query.IsNullOrEmpty()) return new List<TMDbTvShow>(); var shows = client.SearchTvShows(query); foreach (var show in shows) { show.PosterPath = show.PosterPath.HasValue() ? BasePosterPath + size + show.PosterPath : defaultPosterPath; } return shows; }
/// <summary> /// Uri to the profile image. /// </summary> /// <param name="size">The size for the image as required</param> /// <returns>The uri to the sized image</returns> public Uri Uri(PosterSize size) { return Extensions.MakeImageUri(size.ToString(), FilePath); }
private static string buildPosterPath(string path, string filename, PosterSize size) { return makePathStringSafe(path) + @"\" + filename + size.ToString() + ".jpg"; }
private static string getNoPic(PosterSize size) { return buildPosterPath(nopicPath, noPicName, size); }
/// <summary> /// Uri to the poster image. /// </summary> /// <param name="size">The size for the image as required</param> /// <returns>The uri to the sized image</returns> public Uri Uri(PosterSize size) { return(Utilities.Extensions.MakeImageUri(size.ToString(), PosterPath)); }
public string GetPosterUrl(string path, PosterSize size) { return(PosterEndPoint + size + path); }
/// <summary> /// Uri to the poster image. /// </summary> /// <param name="size">The size for the image as required</param> /// <returns>The uri to the sized image</returns> public Uri Uri(PosterSize size = PosterSize.w342) { return(Extensions.MakeImageUri(size.ToString(), PosterPath)); }
public List <TvShow> GetTopRatedTvShows(string defaultPosterPath, PosterSize size = PosterSize.w500) { var shows = service.GetTopRatedTvShows(defaultPosterPath, size); return(shows.Select(Map).ToList()); }
/// <summary> /// Uri to the poster image. /// </summary> /// <param name="size">The size for the image as required</param> /// <returns>The uri to the sized image</returns> public Uri Uri(PosterSize size = PosterSize.w342) { return Extensions.MakeImageUri(size.ToString(), PosterPath); }
public string GetPosterUrl(string path, PosterSize size) { return(BuildPosterUrl(path, size)); }
public Uri CreatePosterLink(IPoster poster, PosterSize posterSize = PosterSize.w500) => CreatePosterLink(poster.PosterPath, posterSize);
public Uri CreatePosterLink(string partPath, PosterSize posterSize = PosterSize.w500) => CreateImageLink(partPath, posterSize.ToString());
private Uri Uri(PosterSize size) { return(MakeImageUri(size.ToString(), PosterPath)); }
/// <summary> /// Uri to the poster image. /// </summary> /// <param name="size">The size for the image as required</param> /// <returns>The uri to the sized image</returns> public Uri Uri(PosterSize size) { return Utilities.Extensions.MakeImageUri(size.ToString(), PosterPath); }
public List <TvShow> SearchTvShows(string query, string defaultPosterPath, PosterSize size = PosterSize.w500) { var shows = service.SearchTvShows(query, PosterSize.w500, defaultPosterPath); return(shows.Select(Map).ToList()); }