我正在尝试从电影数据库https://www.themoviedb.org/下载电影海报以获取电影列表。对于某些电影,下载的艺术品不是英文版。如何确保下载的每件艺术品都是英文的?
我正在使用TMDbLib。
我的代码目前如下:
WebClient webClient = new WebClient();
SearchContainer<SearchMovie> results = client.SearchMovie("Guardians of the Galaxy");
string year = "2014";
TMDbConfig cfg = new TMDbConfig();
Movie movie = new Movie();
string uri = "";
foreach (SearchMovie result in results.Results)
{
movie = client.GetMovie(result.Id, MovieMethods.Credits | MovieMethods.Keywords | MovieMethods.Images | MovieMethods.Videos | MovieMethods.Reviews | MovieMethods.Releases);
DateTime value = Convert.ToDateTime(movie.ReleaseDate);
uri = GetMediaInformation.FetchImage(result.Id).ToString();
Console.WriteLine(uri);
if (year == value.Year.ToString())
break;
}
byte[] bytes = webClient.DownloadData(uri);
MemoryStream ms = new MemoryStream(bytes);
Image artWork = Image.FromStream(ms);