func GetSceneMarkersJSON(markerReader models.SceneMarkerReader, tagReader models.TagReader, scene *models.Scene) ([]jsonschema.SceneMarker, error) {
	sceneMarkers, err := markerReader.FindBySceneID(scene.ID)
	if err != nil {
		return nil, fmt.Errorf("error getting scene markers: %v", err)
	}

	var results []jsonschema.SceneMarker

	for _, sceneMarker := range sceneMarkers {
		primaryTag, err := tagReader.Find(sceneMarker.PrimaryTagID)
		if err != nil {
			return nil, fmt.Errorf("invalid primary tag for scene marker: %v", err)
		}

		sceneMarkerTags, err := tagReader.FindBySceneMarkerID(sceneMarker.ID)
		if err != nil {
			return nil, fmt.Errorf("invalid tags for scene marker: %v", err)
		}

		sceneMarkerJSON := jsonschema.SceneMarker{
			Title:      sceneMarker.Title,
			Seconds:    getDecimalString(sceneMarker.Seconds),
			PrimaryTag: primaryTag.Name,
			Tags:       getTagNames(sceneMarkerTags),
			CreatedAt:  json.JSONTime{Time: sceneMarker.CreatedAt.Timestamp},
			UpdatedAt:  json.JSONTime{Time: sceneMarker.UpdatedAt.Timestamp},
		}

		results = append(results, sceneMarkerJSON)
	}

	return results, nil
}
// GetSceneMarkersJSON returns a slice of SceneMarker JSON representation
// objects corresponding to the provided scene's markers.
GetSceneMarkersJSON returns a slice of SceneMarker JSON representation
objects corresponding to the provided scene's markers.
// GetSceneMarkersJSON returns a slice of SceneMarker JSON representation // objects corresponding to the provided scene ' s markers .
func GetSceneMarkersJSON(markerReader models.SceneMarkerReader, tagReader models.TagReader, scene *models.Scene) ([]jsonschema.SceneMarker, error) {
	sceneMarkers, err := markerReader.FindBySceneID(scene.ID)
	if err != nil {
		return nil, fmt.Errorf("error getting scene markers: %v", err)
	}
	var results []jsonschema.SceneMarker
	for _, sceneMarker := range sceneMarkers {
		primaryTag, err := tagReader.Find(sceneMarker.PrimaryTagID)
		if err != nil {
			return nil, fmt.Errorf("invalid primary tag for scene marker: %v", err)
		}
		sceneMarkerTags, err := tagReader.FindBySceneMarkerID(sceneMarker.ID)
		if err != nil {
			return nil, fmt.Errorf("invalid tags for scene marker: %v", err)
		}
		sceneMarkerJSON := jsonschema.SceneMarker{
			Title:      sceneMarker.Title,
			Seconds:    getDecimalString(sceneMarker.Seconds),
			PrimaryTag: primaryTag.Name,
			Tags:       getTagNames(sceneMarkerTags),
			CreatedAt:  json.JSONTime{Time: sceneMarker.CreatedAt.Timestamp},
			UpdatedAt:  json.JSONTime{Time: sceneMarker.UpdatedAt.Timestamp},
		}
		results = append(results, sceneMarkerJSON)
	}
	return results, nil
}
func GetSceneMarkersJSON ( markerReader models . SceneMarkerReader , tagReader models . TagReader , scene * models . Scene ) ( [ ] jsonschema . SceneMarker , error ) { sceneMarkers , err := markerReader . FindBySceneID ( scene . ID ) if err != nil { return nil , fmt . Errorf ( " " , err ) } var results [ ] jsonschema . SceneMarker for _ , sceneMarker := range sceneMarkers { primaryTag , err := tagReader . Find ( sceneMarker . PrimaryTagID ) if err != nil { return nil , fmt . Errorf ( " " , err ) } sceneMarkerTags , err := tagReader . FindBySceneMarkerID ( sceneMarker . ID ) if err != nil { return nil , fmt . Errorf ( " " , err ) } sceneMarkerJSON := jsonschema . SceneMarker { Title : sceneMarker . Title , Seconds : getDecimalString ( sceneMarker . Seconds ) , PrimaryTag : primaryTag . Name , Tags : getTagNames ( sceneMarkerTags ) , CreatedAt : json . JSONTime { Time : sceneMarker . CreatedAt . Timestamp } , UpdatedAt : json . JSONTime { Time : sceneMarker . UpdatedAt . Timestamp } , } results = append ( results , sceneMarkerJSON ) } return results , nil }
GetSceneMarkersJSON returns a slice of SceneMarker JSON representation
objects corresponding to the provided scene's markers.
GetSceneMarkersJSON returns a slice of SceneMarker JSON representation objects corresponding to the provided scene ' s markers .