diff --git a/backend/app/services/date_guess.py b/backend/app/services/date_guess.py index 6ab6512..2b740b7 100644 --- a/backend/app/services/date_guess.py +++ b/backend/app/services/date_guess.py @@ -64,6 +64,13 @@ def _segments(filepath: str) -> list[str]: return [s for s in re.split(r"[\\/]+", filepath) if s] +# Synology Photos export: `YY-MM-DD HH-MM-SS NNNN.ext`. The explicit +# HH-MM-SS half is what makes the 2-digit year safe to trust — a random +# digit triple won't satisfy the hour/minute/second range checks below. +# YY is mapped to 2000+YY (this format is a recent export convention). +_SYNOLOGY_RE = re.compile( + r"(?