From 5e9643331c4a24f4799a3c8c0b17750588ee3b54 Mon Sep 17 00:00:00 2001 From: Toni Melisma Date: Sun, 28 Feb 2021 00:25:14 +0200 Subject: [PATCH] Add TODO markers for future code --- cmd/fastgallery/main.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/fastgallery/main.go b/cmd/fastgallery/main.go index 7e89761..77e6383 100644 --- a/cmd/fastgallery/main.go +++ b/cmd/fastgallery/main.go @@ -869,6 +869,7 @@ func getGalleryFilenames(sourceFilename string, config configuration) (thumbnail } func transformFile(thisJob transformationJob, progressBar *pb.ProgressBar, config configuration) { + // TODO add ctrl-C support, signal intercept if isImageFile(thisJob.filename) { transformImage(thisJob.sourceFilepath, thisJob.fullsizeFilepath, thisJob.thumbnailFilepath, config) } else if isVideoFile(thisJob.filename) { @@ -942,16 +943,18 @@ func createMedia(source directory, gallerySubdirectory string, dryRun bool, conf func cleanDirectory(gallery directory, dryRun bool) { for _, file := range gallery.files { if !file.exists { - // TODO if dryRun { log.Println("would clean up file:", gallery.absPath, file.name) + } else { + // TODO cleanup functionality } } } for _, dir := range gallery.subdirectories { if !dir.exists { - // TODO + // TODO cleanup functionality + // TODO directory bug - only after files are deleted we know which directories are empty // What about reserved directories for thumbnails, pictures and originals? // Implement logic to mark non-existent gallery directories if dryRun {