WIP: disabled logic to make API changes less painful
This commit is contained in:
parent
8c91dd2107
commit
a364dc7a8a
@ -40,43 +40,38 @@ func Run() {
|
|||||||
logErrorAndExit(err, 3)
|
logErrorAndExit(err, 3)
|
||||||
}
|
}
|
||||||
|
|
||||||
categories, err := category.GetAllCategoriesFromServer(context.piwigo)
|
//err = category.SynchronizeCategories(filesystemNodes, context.piwigo, context.dataStore)
|
||||||
if err != nil {
|
//if err != nil {
|
||||||
logErrorAndExit(err, 4)
|
// logErrorAndExit(err, 4)
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
err = category.SynchronizeCategories(context.piwigo, filesystemNodes, categories)
|
//err = images.SynchronizeLocalImageMetadata(context.dataStore, filesystemNodes, categories, localFileStructure.CalculateFileCheckSums)
|
||||||
if err != nil {
|
//if err != nil {
|
||||||
logErrorAndExit(err, 5)
|
// logErrorAndExit(err, 5)
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
err = images.SynchronizeLocalImageMetadata(context.dataStore, filesystemNodes, categories, localFileStructure.CalculateFileCheckSums)
|
//err = images.SynchronizePiwigoMetadata(context.piwigo, context.dataStore)
|
||||||
if err != nil {
|
//if err != nil {
|
||||||
logErrorAndExit(err, 6)
|
// logErrorAndExit(err, 6)
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
err = images.SynchronizePiwigoMetadata(context.piwigo, context.dataStore)
|
//if *removeImages {
|
||||||
if err != nil {
|
// err = images.DeleteImages(context.piwigo, context.dataStore)
|
||||||
logErrorAndExit(err, 7)
|
// if err != nil {
|
||||||
}
|
// logErrorAndExit(err, 7)
|
||||||
|
// }
|
||||||
if *removeImages {
|
//} else {
|
||||||
err = images.DeleteImages(context.piwigo, context.dataStore)
|
// logrus.Info("The flag removeImages is disabled. Skipping...")
|
||||||
if err != nil {
|
//}
|
||||||
logErrorAndExit(err, 8)
|
//
|
||||||
}
|
//if !(*noUpload) {
|
||||||
} else {
|
// err = images.UploadImages(context.piwigo, context.dataStore)
|
||||||
logrus.Info("The flag removeImages is disabled. Skipping...")
|
// if err != nil {
|
||||||
}
|
// logErrorAndExit(err, 8)
|
||||||
|
// }
|
||||||
if !(*noUpload) {
|
//} else {
|
||||||
err = images.UploadImages(context.piwigo, context.dataStore)
|
// logrus.Warnln("Skipping upload of images as flag noUpload is set to true!")
|
||||||
if err != nil {
|
//}
|
||||||
logErrorAndExit(err, 9)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
logrus.Warnln("Skipping upload of images as flag noUpload is set to true!")
|
|
||||||
}
|
|
||||||
|
|
||||||
_ = context.piwigo.Logout()
|
_ = context.piwigo.Logout()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user