feat(backend): add EPUB CFI and percentage to reading progress

Enhance reading progress tracking to support EPUB-specific location data:
- Add epubcfi field to store EPUB Canonical Fragment Identifier
- Add percentage field for normalized position across formats
- Update UpdateReadingProgress API handler to accept new fields
- Modify database queries to persist additional progress metadata

This enables precise position tracking in reflowable EPUB content
where page numbers are insufficient for accurate bookmarking.
This commit is contained in:
2026-04-09 21:16:53 -04:00
parent 20e96e940d
commit 051ee287c7
2 changed files with 8 additions and 2 deletions
+2
View File
@@ -9579,6 +9579,8 @@ type UpdateReadingProgressParams struct {
UserID pgtype.UUID `db:"user_id" json:"user_id"`
CurrentPage pgtype.Int4 `db:"current_page" json:"current_page"`
TotalPages pgtype.Int4 `db:"total_pages" json:"total_pages"`
Epubcfi string `json:"epubcfi"`
Percentage float64 `json:"percentage"`
}
func (q *Queries) UpdateReadingProgress(ctx context.Context, arg UpdateReadingProgressParams) (ReadingProgress, error) {