protected void Page_Load(object sender, EventArgs e) { Person_id = Convert.ToInt32(Request.QueryString["person_id"]); TMDbClient client = new TMDbClient("e1b3af48ad2d28cab2fb3ac299948c08"); TMDbLib.Objects.People.Person person = client.GetPersonAsync(Person_id).Result; string str1 = ""; string str2 = ""; str1 += "<img src='" + "https://image.tmdb.org/t/p/w185_and_h278_bestv2" + person.ProfilePath + "' class='img-responsive' />"; string date = ""; if (person.Birthday != null) { date = person.Birthday.Value.ToString("D", CultureInfo.CreateSpecificCulture("en-US")); } str2 += "<h3 style='font-family: 'Arial';'>" + person.Name + "</h3><p class='movie_option'><strong>Place_of_birth: </strong>" + person.PlaceOfBirth + "</p>" + "<p class='movie_option'><strong>Birthday:</strong > " + date + "</P>" + "</P><p class='movie_option'><strong>Biography: </strong>" + person.Biography + "</p>"; str2 += "<a href='" + "http://www.imdb.com/name/" + person.ImdbId + "'>Go IMDB Link</a>"; m_image.Controls.Add(new LiteralControl(str1)); info.Controls.Add(new LiteralControl(str2)); }
public PersonModel AddPerson(Person p) { PersonModel person = Mapper.Map <PersonModel>(p); AddImage(p, person); return(person.Save(_peopleRootFolder, _masterService)); }
public void AddImage(Person p, PersonModel person) { if (p.Images != null && p.Images.Profiles != null && p.Images.Profiles.Any()) { List <Profile> profiles = p.Images.Profiles; string filePath = profiles.First().FilePath; Guid dbImageId = MediaExtensions.AddMovieDBImage(_client, filePath); person.Image = GlassExtensions.GetImage(dbImageId, person.Title); } }
public ICastMember AddCastMember(Cast c) { int id = c.Id; Person p = _client.GetPerson(id, PersonMethods.Images); PersonModel person = AddPerson(p); ICastMember castMember = Mapper.Map <CastMember>(c); castMember.Person = GlassExtensions.GetInternalLink(person); castMember.Save(_castAndCreweRootFolder, _masterService); return(castMember); }
public async Task InitializeAsync(int id) { PersonInfo = await TMDbService.GetPersonAsync(id); }