Currently, the application tracks capturedAt (which serves as a hybrid of publication date from metadata and filesystem modification date) and createdAt (which is the database record creation time).
This issue is for a comprehensive overhaul to decouple these three timelines and record them cleanly and losslessly in the database:
- Publication/Post Date (
publishedAt): The exact date the post was originally published on the platform (Twitter, Pixiv, Gelbooru), derived strictly from official downloaded metadata. If the post date is unknown, it should remain null (Unknown).
- Filesystem modified/created date (
fileModifiedAt / fileCreatedAt): The actual file modified time (stat.mtime) of the file on disk when it was saved/modified by gallery-dl or manually.
- Database Import Date (
importedAt): The exact second the file was scanned, processed, and written to the database.
This will involve:
- Creating a database migration to add
fileModifiedAt and rename the existing columns to clean, maintainable names (publishedAt and importedAt).
- Updating the library scanner to strictly parse and decouple these values without mixing them or falling back to disk time for publication time.
- Updating the database repositories, frontend hooks, and components to consume the renamed and new date fields.
- Refactoring all API and sorting code to match the new schema structure.
Currently, the application tracks
capturedAt(which serves as a hybrid of publication date from metadata and filesystem modification date) andcreatedAt(which is the database record creation time).This issue is for a comprehensive overhaul to decouple these three timelines and record them cleanly and losslessly in the database:
publishedAt): The exact date the post was originally published on the platform (Twitter, Pixiv, Gelbooru), derived strictly from official downloaded metadata. If the post date is unknown, it should remainnull(Unknown).fileModifiedAt/fileCreatedAt): The actual file modified time (stat.mtime) of the file on disk when it was saved/modified bygallery-dlor manually.importedAt): The exact second the file was scanned, processed, and written to the database.This will involve:
fileModifiedAtand rename the existing columns to clean, maintainable names (publishedAtandimportedAt).