From a364dc7a8a7fce4b132cfe469d934217e9dff6c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=A4felfinger?= Date: Thu, 4 Apr 2019 15:51:29 +0200 Subject: [PATCH] WIP: disabled logic to make API changes less painful --- internal/app/app.go | 69 +++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 37 deletions(-) diff --git a/internal/app/app.go b/internal/app/app.go index bf9e6f2..0a6b611 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -40,43 +40,38 @@ func Run() { logErrorAndExit(err, 3) } - categories, err := category.GetAllCategoriesFromServer(context.piwigo) - if err != nil { - logErrorAndExit(err, 4) - } - - err = category.SynchronizeCategories(context.piwigo, filesystemNodes, categories) - if err != nil { - logErrorAndExit(err, 5) - } - - err = images.SynchronizeLocalImageMetadata(context.dataStore, filesystemNodes, categories, localFileStructure.CalculateFileCheckSums) - if err != nil { - logErrorAndExit(err, 6) - } - - err = images.SynchronizePiwigoMetadata(context.piwigo, context.dataStore) - if err != nil { - logErrorAndExit(err, 7) - } - - if *removeImages { - err = images.DeleteImages(context.piwigo, context.dataStore) - if err != nil { - logErrorAndExit(err, 8) - } - } else { - logrus.Info("The flag removeImages is disabled. Skipping...") - } - - if !(*noUpload) { - err = images.UploadImages(context.piwigo, context.dataStore) - if err != nil { - logErrorAndExit(err, 9) - } - } else { - logrus.Warnln("Skipping upload of images as flag noUpload is set to true!") - } + //err = category.SynchronizeCategories(filesystemNodes, context.piwigo, context.dataStore) + //if err != nil { + // logErrorAndExit(err, 4) + //} + // + //err = images.SynchronizeLocalImageMetadata(context.dataStore, filesystemNodes, categories, localFileStructure.CalculateFileCheckSums) + //if err != nil { + // logErrorAndExit(err, 5) + //} + // + //err = images.SynchronizePiwigoMetadata(context.piwigo, context.dataStore) + //if err != nil { + // logErrorAndExit(err, 6) + //} + // + //if *removeImages { + // err = images.DeleteImages(context.piwigo, context.dataStore) + // if err != nil { + // logErrorAndExit(err, 7) + // } + //} else { + // logrus.Info("The flag removeImages is disabled. Skipping...") + //} + // + //if !(*noUpload) { + // err = images.UploadImages(context.piwigo, context.dataStore) + // if err != nil { + // logErrorAndExit(err, 8) + // } + //} else { + // logrus.Warnln("Skipping upload of images as flag noUpload is set to true!") + //} _ = context.piwigo.Logout() }