Example #1
0
        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;
        }
Example #2
0
 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);
     }
 }
Example #3
0
 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);
     }
 }
Example #4
0
        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;
        }
Example #5
0
        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;
        }
Example #6
0
 /// <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);
 }
Example #7
0
 private static string buildPosterPath(string path, string filename, PosterSize size)
 {
     return makePathStringSafe(path) + @"\" + filename + size.ToString() + ".jpg";
 }
Example #8
0
 private static string getNoPic(PosterSize size)
 {
     return buildPosterPath(nopicPath, noPicName, size);
 }
Example #9
0
 /// <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));
 }
Example #10
0
 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());
        }
Example #13
0
 /// <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);
 }
Example #14
0
 public string GetPosterUrl(string path, PosterSize size)
 {
     return(BuildPosterUrl(path, size));
 }
Example #15
0
 public Uri CreatePosterLink(IPoster poster, PosterSize posterSize  = PosterSize.w500) => CreatePosterLink(poster.PosterPath, posterSize);
Example #16
0
 public Uri CreatePosterLink(string partPath, PosterSize posterSize = PosterSize.w500) => CreateImageLink(partPath, posterSize.ToString());
Example #17
0
 private Uri Uri(PosterSize size)
 {
     return(MakeImageUri(size.ToString(), PosterPath));
 }
Example #18
0
 /// <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());
        }