Also test the current year for the new albums

This commit is contained in:
2021-12-28 11:39:36 +01:00
committed by GitHub
parent d72cee2e1b
commit bb0327ca64

View File

@@ -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