class documentation

A class to define gallery entries and their table.

Do not update this without updating the schema version and creating way to migrate.

Class Variable __tablename__ Undocumented
Class Variable created The created time.
Class Variable gallery_added_data Extra data added by the gallery UI.
Class Variable gallery_info Card type specific information that is shared with the gallery.
Class Variable hash A hash for checking if the file has updated.
Class Variable modified The modifiedtime.
Class Variable path The path on disk relative to the base data directory.
Class Variable thumbnail_source The path on disk (relative to the base data dir) or None for no thumbnail.
__tablename__: str = (source)

Undocumented

created: orm.Mapped[float] = (source)

The created time.

This is separated from gallery_info so it can be used for sorting and filtering.

gallery_added_data: orm.Mapped[dict] = (source)

Extra data added by the gallery UI.

This should not be changed server side. Its value should never affect the hash, as the hash is used to determine if the data on disk has changed since caching to the database. This data is not stored on disk except in the database.

gallery_info: orm.Mapped[dict] = (source)

Card type specific information that is shared with the gallery.

hash: orm.Mapped[str] = (source)

A hash for checking if the file has updated.

Each gallery providing Thing can choose its own hashing method.

modified: orm.Mapped[float] = (source)

The modifiedtime.

This is separated from gallery_info so it can be used for sorting and filtering.

path: orm.Mapped[str] = (source)

The path on disk relative to the base data directory.

This must always be the normalised posix path relative to the data directory.

thumbnail_source: orm.Mapped[str | None] = (source)

The path on disk (relative to the base data dir) or None for no thumbnail.