private async Task MoveActorImagePath(IActorViewModel actor) { string newActorPath = ActorMetadata.GetActorThumbPath(_path, actor.Name.Value); await _fileSystemService.MoveFile(actor.ThumbPath.Path, newActorPath); actor.ThumbPath.Path = newActorPath; }
private void SetActorsThumbPath(string path, MovieMetadata metadata) { string movieFolder = _fileSystemService.GetParentFolder(path, 1); foreach (ActorMetadata actor in metadata.Actors) { actor.ThumbPath = ActorMetadata.GetActorThumbPath(movieFolder, actor.Name); } }
public async Task <TvShowMetadata> Get(string path) { TvShowMetadata metadata = await _metadataRepository.Get(path); foreach (ActorMetadata actor in metadata.Actors) { actor.ThumbPath = ActorMetadata.GetActorThumbPath(path, actor.Name); } return(metadata); }
private static void UpdateActors(MovieMetadata metadata, string movieFolder, IEnumerable <Cast> actors) { foreach (Cast themoviedbActor in actors) { ActorMetadata actor = new ActorMetadata { Name = themoviedbActor.Name, Role = themoviedbActor.Character, Thumb = themoviedbActor.ProfilePath, ThumbPath = ActorMetadata.GetActorThumbPath(movieFolder, themoviedbActor.Name) }; metadata.Actors.Add(actor); } }
private async Task UpdateActorsMetadata(string path, TvShowMetadata metadata) { IEnumerable <Actor> actors = await _metadataUpdater.FindActors(metadata.Id); foreach (Actor thetvdbActor in actors) { ActorMetadata actor = new ActorMetadata { Name = thetvdbActor.Name, Role = thetvdbActor.Role, Thumb = TvShowHelper.ExpandImagesUrl(thetvdbActor.Image), ThumbPath = ActorMetadata.GetActorThumbPath(path, thetvdbActor.Name) }; metadata.Actors.Add(actor); } }