mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
[PR #15633] Add ProgressState field for precise EPUB location tracking #14368
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/15633
Author: @bluesam1
Created: 11/26/2025
Status: 🔄 Open
Base:
master← Head:feature/epub-progress-state📝 Commits (1)
72aeb28Add ProgressState field for precise EPUB location tracking📊 Changes
9 files changed (+1824 additions, -1 deletions)
View changed files
📝
Emby.Server.Implementations/Library/UserDataManager.cs(+9 -1)📝
Emby.Server.Implementations/Session/SessionManager.cs(+7 -0)📝
MediaBrowser.Controller/Entities/UserItemData.cs(+11 -0)📝
MediaBrowser.Model/Dto/UpdateUserItemDataDto.cs(+10 -0)📝
MediaBrowser.Model/Dto/UserItemDataDto.cs(+10 -0)📝
MediaBrowser.Model/Session/PlaybackProgressInfo.cs(+11 -0)📝
src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/UserData.cs(+14 -0)➕
src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20251125042610_AddProgressStateToUserData.Designer.cs(+1724 -0)➕
src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20251125042610_AddProgressStateToUserData.cs(+28 -0)📄 Description
Summary
In order to make the 'Books' feature useful, this adds a generic string-based
ProgressStatefield to support complex media position tracking that cannot be represented as simple ticks. Primary use case is EPUB CFI (Canonical Fragment Identifier) strings for precise ebook location resumption.Problem
EPUB files use CFI strings (e.g.,
epubcfi(/6/4[chap01]!/4[body]/10[para05]/3:10)) to point to exact locations regardless of font size, screen width, or layout changes. The currentPlaybackPositionTicksfield only supports linear percentage values, causing users to lose their reading position when syncing across devices with different screen sizes.Solution
ProgressStatenullable string field toUserDatadatabase entityUserItemDataDto,UpdateUserItemDataDto,PlaybackProgressInfo) to includeProgressStateUserDataManagerto map and persistProgressStateSessionManager.OnPlaybackProgressto saveProgressStatewhen providedChanges
ProgressStatecolumn toUserDatatable via EF Core migrationProgressStateproperty toUserItemData,UserItemDataDto,UpdateUserItemDataDto, andPlaybackProgressInfoUserDataManagerandSessionManagerTesting
ProgressStatecontinue to work)Related
Complements frontend PR: jellyfin/jellyfin-web#7353 (Use ProgressState for precise EPUB location tracking)
Addresses the issue described in the feature proposal for native EPUB CFI support. jellyfin/jellyfin-web/issues/3791
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.