Skip to content

Commit

Permalink
Upgrade to audiobooks 13.0.0-beta0009
Browse files Browse the repository at this point in the history
  • Loading branch information
io7m committed May 15, 2024
1 parent 37af96b commit 597e3f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion org.thepalaceproject.android.platform
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import org.librarysimplified.audiobook.api.PlayerBookmark
import org.librarysimplified.audiobook.api.PlayerBookmarkKind
import org.librarysimplified.audiobook.api.PlayerBookmarkMetadata
import org.librarysimplified.audiobook.manifest.api.PlayerManifestReadingOrderID
import org.librarysimplified.audiobook.manifest.api.PlayerMillisecondsReadingOrderItem
import org.nypl.simplified.accounts.api.AccountID
import org.nypl.simplified.bookmarks.api.BookmarkServiceUsableType
import org.nypl.simplified.bookmarks.api.BookmarksForBook
Expand Down Expand Up @@ -98,7 +99,7 @@ object AudioBookBookmarks {
bookProgress = source.metadata.bookProgressEstimate,
location = SerializedLocatorAudioBookTime2(
readingOrderItem = source.readingOrderID.text,
readingOrderItemOffsetMilliseconds = source.offsetMilliseconds
readingOrderItemOffsetMilliseconds = source.offsetMilliseconds.value
),
uri = null
)
Expand All @@ -122,10 +123,16 @@ object AudioBookBookmarks {
BookmarkKind.BookmarkExplicit -> PlayerBookmarkKind.EXPLICIT
BookmarkKind.BookmarkLastReadLocation -> PlayerBookmarkKind.LAST_READ
}

val readingOrderID =
PlayerManifestReadingOrderID(location.readingOrderItem)
val offsetMilliseconds =
PlayerMillisecondsReadingOrderItem(location.readingOrderItemOffsetMilliseconds)

PlayerBookmark(
kind = kind,
readingOrderID = PlayerManifestReadingOrderID(location.readingOrderItem),
offsetMilliseconds = location.readingOrderItemOffsetMilliseconds,
readingOrderID = readingOrderID,
offsetMilliseconds = offsetMilliseconds,
metadata = PlayerBookmarkMetadata(
creationTime = source.time,
chapterTitle = source.bookChapterTitle,
Expand Down

0 comments on commit 597e3f4

Please sign in to comment.