From bb0327ca64c486c9bf8d3100544461b7b7db578d Mon Sep 17 00:00:00 2001 From: napnap75 Date: Tue, 28 Dec 2021 11:39:36 +0100 Subject: [PATCH] Also test the current year for the new albums --- piwigo-souvenirs/piwigo-souvenirs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piwigo-souvenirs/piwigo-souvenirs.go b/piwigo-souvenirs/piwigo-souvenirs.go index b966b5a..d2cabdf 100644 --- a/piwigo-souvenirs/piwigo-souvenirs.go +++ b/piwigo-souvenirs/piwigo-souvenirs.go @@ -263,7 +263,7 @@ func runLoop(param parameters) error { continue } - if (shareDate.Month() == time.Now().AddDate(0, 0, -1).Month()) && (shareDate.Day() == time.Now().AddDate(0, 0, -1).Day()) { + if (shareDate.Year() == time.Now().AddDate(0, 0, -1).Year()) && (shareDate.Month() == time.Now().AddDate(0, 0, -1).Month()) && (shareDate.Day() == time.Now().AddDate(0, 0, -1).Day()) { // Prepare the message url := fmt.Sprintf("%s/?xauth=%s", param.piwigoBaseURL, albumCode) imagePath := representativePath