Beispiel #1
0
        public PersonModel AddPerson(Person p)
        {
            PersonModel person = Mapper.Map <PersonModel>(p);

            AddImage(p, person);
            return(person.Save(_peopleRootFolder, _masterService));
        }
Beispiel #2
0
 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);
     }
 }
Beispiel #3
0
        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);
        }