func (c Client) FindStashBoxPerformersByNames(ctx context.Context, performerIDs []string) ([]*models.StashBoxPerformerQueryResult, error) {
	ids, err := stringslice.StringSliceToIntSlice(performerIDs)
	if err != nil {
		return nil, err
	}

	var performers []*models.Performer

	if err := c.txnManager.WithReadTxn(ctx, func(r models.ReaderRepository) error {
		qb := r.Performer()

		for _, performerID := range ids {
			performer, err := qb.Find(performerID)
			if err != nil {
				return err
			}

			if performer == nil {
				return fmt.Errorf("performer with id %d not found", performerID)
			}

			if performer.Name.Valid {
				performers = append(performers, performer)
			}
		}

		return nil
	}); err != nil {
		return nil, err
	}

	return c.findStashBoxPerformersByNames(ctx, performers)
}
// FindStashBoxPerformersByNames queries stash-box for performers by name
FindStashBoxPerformersByNames queries stash-box for performers by name
// FindStashBoxPerformersByNames queries stash - box for performers by name
func (c Client) FindStashBoxPerformersByNames(ctx context.Context, performerIDs []string) ([]*models.StashBoxPerformerQueryResult, error) {
	ids, err := stringslice.StringSliceToIntSlice(performerIDs)
	if err != nil {
		return nil, err
	}
	var performers []*models.Performer
	if err := c.txnManager.WithReadTxn(ctx, func(r models.ReaderRepository) error {
		qb := r.Performer()
		for _, performerID := range ids {
			performer, err := qb.Find(performerID)
			if err != nil {
				return err
			}
			if performer == nil {
				return fmt.Errorf("performer with id %d not found", performerID)
			}
			if performer.Name.Valid {
				performers = append(performers, performer)
			}
		}
		return nil
	}); err != nil {
		return nil, err
	}
	return c.findStashBoxPerformersByNames(ctx, performers)
}
func ( c Client ) FindStashBoxPerformersByNames ( ctx context . Context , performerIDs [ ] string ) ( [ ] * models . StashBoxPerformerQueryResult , error ) { ids , err := stringslice . StringSliceToIntSlice ( performerIDs ) if err != nil { return nil , err } var performers [ ] * models . Performer if err := c . txnManager . WithReadTxn ( ctx , func ( r models . ReaderRepository ) error { qb := r . Performer ( ) for _ , performerID := range ids { performer , err := qb . Find ( performerID ) if err != nil { return err } if performer == nil { return fmt . Errorf ( " " , performerID ) } if performer . Name . Valid { performers = append ( performers , performer ) } } return nil } ) ; err != nil { return nil , err } return c . findStashBoxPerformersByNames ( ctx , performers ) }
FindStashBoxPerformersByNames queries stash-box for performers by name
FindStashBoxPerformersByNames queries stash - box for performers by name