func (d *FileDeleter) MarkGeneratedFiles(scene *models.Scene) error {
	sceneHash := scene.GetHash(d.FileNamingAlgo)

	if sceneHash == "" {
		return nil
	}

	markersFolder := filepath.Join(d.Paths.Generated.Markers, sceneHash)

	exists, _ := fsutil.FileExists(markersFolder)
	if exists {
		if err := d.Dirs([]string{markersFolder}); err != nil {
			return err
		}
	}

	var files []string

	thumbPath := d.Paths.Scene.GetThumbnailScreenshotPath(sceneHash)
	exists, _ = fsutil.FileExists(thumbPath)
	if exists {
		files = append(files, thumbPath)
	}

	normalPath := d.Paths.Scene.GetScreenshotPath(sceneHash)
	exists, _ = fsutil.FileExists(normalPath)
	if exists {
		files = append(files, normalPath)
	}

	streamPreviewPath := d.Paths.Scene.GetVideoPreviewPath(sceneHash)
	exists, _ = fsutil.FileExists(streamPreviewPath)
	if exists {
		files = append(files, streamPreviewPath)
	}

	streamPreviewImagePath := d.Paths.Scene.GetWebpPreviewPath(sceneHash)
	exists, _ = fsutil.FileExists(streamPreviewImagePath)
	if exists {
		files = append(files, streamPreviewImagePath)
	}

	transcodePath := d.Paths.Scene.GetTranscodePath(sceneHash)
	exists, _ = fsutil.FileExists(transcodePath)
	if exists {
		files = append(files, transcodePath)
	}

	spritePath := d.Paths.Scene.GetSpriteImageFilePath(sceneHash)
	exists, _ = fsutil.FileExists(spritePath)
	if exists {
		files = append(files, spritePath)
	}

	vttPath := d.Paths.Scene.GetSpriteVttFilePath(sceneHash)
	exists, _ = fsutil.FileExists(vttPath)
	if exists {
		files = append(files, vttPath)
	}

	heatmapPath := d.Paths.Scene.GetInteractiveHeatmapPath(sceneHash)
	exists, _ = fsutil.FileExists(heatmapPath)
	if exists {
		files = append(files, heatmapPath)
	}

	return d.Files(files)
}
// MarkGeneratedFiles marks for deletion the generated files for the provided scene.
MarkGeneratedFiles marks for deletion the generated files for the provided scene.
// MarkGeneratedFiles marks for deletion the generated files for the provided scene .
func (d *FileDeleter) MarkGeneratedFiles(scene *models.Scene) error {
	sceneHash := scene.GetHash(d.FileNamingAlgo)
	if sceneHash == "" {
		return nil
	}
	markersFolder := filepath.Join(d.Paths.Generated.Markers, sceneHash)
	exists, _ := fsutil.FileExists(markersFolder)
	if exists {
		if err := d.Dirs([]string{markersFolder}); err != nil {
			return err
		}
	}
	var files []string
	thumbPath := d.Paths.Scene.GetThumbnailScreenshotPath(sceneHash)
	exists, _ = fsutil.FileExists(thumbPath)
	if exists {
		files = append(files, thumbPath)
	}
	normalPath := d.Paths.Scene.GetScreenshotPath(sceneHash)
	exists, _ = fsutil.FileExists(normalPath)
	if exists {
		files = append(files, normalPath)
	}
	streamPreviewPath := d.Paths.Scene.GetVideoPreviewPath(sceneHash)
	exists, _ = fsutil.FileExists(streamPreviewPath)
	if exists {
		files = append(files, streamPreviewPath)
	}
	streamPreviewImagePath := d.Paths.Scene.GetWebpPreviewPath(sceneHash)
	exists, _ = fsutil.FileExists(streamPreviewImagePath)
	if exists {
		files = append(files, streamPreviewImagePath)
	}
	transcodePath := d.Paths.Scene.GetTranscodePath(sceneHash)
	exists, _ = fsutil.FileExists(transcodePath)
	if exists {
		files = append(files, transcodePath)
	}
	spritePath := d.Paths.Scene.GetSpriteImageFilePath(sceneHash)
	exists, _ = fsutil.FileExists(spritePath)
	if exists {
		files = append(files, spritePath)
	}
	vttPath := d.Paths.Scene.GetSpriteVttFilePath(sceneHash)
	exists, _ = fsutil.FileExists(vttPath)
	if exists {
		files = append(files, vttPath)
	}
	heatmapPath := d.Paths.Scene.GetInteractiveHeatmapPath(sceneHash)
	exists, _ = fsutil.FileExists(heatmapPath)
	if exists {
		files = append(files, heatmapPath)
	}
	return d.Files(files)
}
func ( d * FileDeleter ) MarkGeneratedFiles ( scene * models . Scene ) error { sceneHash := scene . GetHash ( d . FileNamingAlgo ) if sceneHash == " " { return nil } markersFolder := filepath . Join ( d . Paths . Generated . Markers , sceneHash ) exists , _ := fsutil . FileExists ( markersFolder ) if exists { if err := d . Dirs ( [ ] string { markersFolder } ) ; err != nil { return err } } var files [ ] string thumbPath := d . Paths . Scene . GetThumbnailScreenshotPath ( sceneHash ) exists , _ = fsutil . FileExists ( thumbPath ) if exists { files = append ( files , thumbPath ) } normalPath := d . Paths . Scene . GetScreenshotPath ( sceneHash ) exists , _ = fsutil . FileExists ( normalPath ) if exists { files = append ( files , normalPath ) } streamPreviewPath := d . Paths . Scene . GetVideoPreviewPath ( sceneHash ) exists , _ = fsutil . FileExists ( streamPreviewPath ) if exists { files = append ( files , streamPreviewPath ) } streamPreviewImagePath := d . Paths . Scene . GetWebpPreviewPath ( sceneHash ) exists , _ = fsutil . FileExists ( streamPreviewImagePath ) if exists { files = append ( files , streamPreviewImagePath ) } transcodePath := d . Paths . Scene . GetTranscodePath ( sceneHash ) exists , _ = fsutil . FileExists ( transcodePath ) if exists { files = append ( files , transcodePath ) } spritePath := d . Paths . Scene . GetSpriteImageFilePath ( sceneHash ) exists , _ = fsutil . FileExists ( spritePath ) if exists { files = append ( files , spritePath ) } vttPath := d . Paths . Scene . GetSpriteVttFilePath ( sceneHash ) exists , _ = fsutil . FileExists ( vttPath ) if exists { files = append ( files , vttPath ) } heatmapPath := d . Paths . Scene . GetInteractiveHeatmapPath ( sceneHash ) exists , _ = fsutil . FileExists ( heatmapPath ) if exists { files = append ( files , heatmapPath ) } return d . Files ( files ) }
MarkGeneratedFiles marks for deletion the generated files for the provided scene.
MarkGeneratedFiles marks for deletion the generated files for the provided scene .