Skip to content

Decouple publication date, filesystem date, and library import date #99

Description

@Darkkal

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:

  1. 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).
  2. 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.
  3. Database Import Date (importedAt): The exact second the file was scanned, processed, and written to the database.

This will involve:

  1. Creating a database migration to add fileModifiedAt and rename the existing columns to clean, maintainable names (publishedAt and importedAt).
  2. Updating the library scanner to strictly parse and decouple these values without mixing them or falling back to disk time for publication time.
  3. Updating the database repositories, frontend hooks, and components to consume the renamed and new date fields.
  4. Refactoring all API and sorting code to match the new schema structure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions