예제 #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;
        }
예제 #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);
     }
 }
예제 #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);
     }
 }
예제 #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;
        }
예제 #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;
        }
예제 #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);
 }
예제 #7
0
 private static string buildPosterPath(string path, string filename, PosterSize size)
 {
     return makePathStringSafe(path) + @"\" + filename + size.ToString() + ".jpg";
 }
예제 #8
0
 private static string getNoPic(PosterSize size)
 {
     return buildPosterPath(nopicPath, noPicName, size);
 }
예제 #9
0
파일: Movie.cs 프로젝트: mam59/Xbmc2ndScr
 /// <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));
 }
예제 #10
0
파일: Tmdb.cs 프로젝트: punker76/Moviebase
 public string GetPosterUrl(string path, PosterSize size)
 {
     return(PosterEndPoint + size + path);
 }
예제 #11
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));
 }
        public List <TvShow> GetTopRatedTvShows(string defaultPosterPath, PosterSize size = PosterSize.w500)
        {
            var shows = service.GetTopRatedTvShows(defaultPosterPath, size);

            return(shows.Select(Map).ToList());
        }
예제 #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);
 }
예제 #14
0
파일: Tmdb.cs 프로젝트: kkzhong/Moviebase
 public string GetPosterUrl(string path, PosterSize size)
 {
     return(BuildPosterUrl(path, size));
 }
예제 #15
0
 public Uri CreatePosterLink(IPoster poster, PosterSize posterSize  = PosterSize.w500) => CreatePosterLink(poster.PosterPath, posterSize);
예제 #16
0
 public Uri CreatePosterLink(string partPath, PosterSize posterSize = PosterSize.w500) => CreateImageLink(partPath, posterSize.ToString());
예제 #17
0
 private Uri Uri(PosterSize size)
 {
     return(MakeImageUri(size.ToString(), PosterPath));
 }
예제 #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());
        }