Skip to content

Sync playback progress to Hardcover #1562

Description

@jules2689

Feature request

  • Add playback progress syncing for Hardcover, not just status updates.
  • BookPlayer currently appears to mark a matched Hardcover book as “Currently Reading” after the reading threshold, and “Read” when finished.
  • It would be useful if BookPlayer also updated the active Hardcover read record with the current audiobook position during playback.

I know #1362 (comment) says that it's not possible yet, but I noticed other apps like Grimmory do this now. I've linked their code below.

Narrative

GIVEN:

  • I have connected Hardcover in BookPlayer.
  • A local audiobook is matched to a Hardcover book.
  • I am listening to the audiobook in BookPlayer.

WHEN:

  • Playback progresses past the configured Hardcover reading threshold.
  • Playback continues over time.
  • The audiobook is eventually finished.

THEN:

  • The book should be marked as “Currently Reading” in Hardcover, as it is today.
  • BookPlayer should periodically sync the current listening position to Hardcover during playback.
  • For audiobooks, this could use Hardcover’s user_book_read progress field, ideally progress_seconds.
  • When the book is finished, BookPlayer should send the final progress and mark the Hardcover read as finished / read.

Design

Possible implementation approach:

  • Keep the existing HardcoverService progress subscription.
  • After the reading threshold is crossed, ensure the book exists in the user’s Hardcover library as reading.
  • Find or create an open user_book_read record for the Hardcover userBookID.
  • During playback, throttle progress updates so Hardcover is not called too often, for example every 60 seconds or only when progress changes meaningfully.
  • Send the local playback position as progress_seconds.
  • On finish, update the read record one last time with final progress_seconds and finished_at, then mark the book as read.

Other projects appear to do similar Hardcover progress syncing:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions