func ScrapedMovie(qb models.MovieReader, m *models.ScrapedMovie) error {
	if m.StoredID != nil || m.Name == nil {
		return nil
	}

	movies, err := qb.FindByNames([]string{*m.Name}, true)

	if err != nil {
		return err
	}

	if len(movies) != 1 {
		// ignore - cannot match
		return nil
	}

	id := strconv.Itoa(movies[0].ID)
	m.StoredID = &id
	return nil
}
// ScrapedMovie matches the provided movie with the movies
// in the database and sets the ID field if one is found.
ScrapedMovie matches the provided movie with the movies
in the database and sets the ID field if one is found.
// ScrapedMovie matches the provided movie with the movies // in the database and sets the ID field if one is found .
func ScrapedMovie(qb models.MovieReader, m *models.ScrapedMovie) error {
	if m.StoredID != nil || m.Name == nil {
		return nil
	}
	movies, err := qb.FindByNames([]string{*m.Name}, true)
	if err != nil {
		return err
	}
	if len(movies) != 1 {
		return nil
	}
	id := strconv.Itoa(movies[0].ID)
	m.StoredID = &id
	return nil
}
func ScrapedMovie ( qb models . MovieReader , m * models . ScrapedMovie ) error { if m . StoredID != nil || m . Name == nil { return nil } movies , err := qb . FindByNames ( [ ] string { * m . Name } , true ) if err != nil { return err } if len ( movies ) != 1 { return nil } id := strconv . Itoa ( movies [ 0 ] . ID ) m . StoredID = & id return nil }
ScrapedMovie matches the provided movie with the movies
in the database and sets the ID field if one is found.
ScrapedMovie matches the provided movie with the movies in the database and sets the ID field if one is found .
// ignore - cannot match