mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-12 22:41:29 +00:00
Add playbackRate to MediaProgress extraData for per-book playback speed #1173
This commit is contained in:
parent
6d3404272c
commit
8bd99a459e
1 changed files with 6 additions and 0 deletions
|
|
@ -165,6 +165,7 @@ class MediaProgress extends Model {
|
|||
hideFromContinueListening: !!this.hideFromContinueListening,
|
||||
ebookLocation: this.ebookLocation,
|
||||
ebookProgress: this.ebookProgress,
|
||||
playbackRate: this.extraData?.playbackRate || null,
|
||||
lastUpdate: this.updatedAt.valueOf(),
|
||||
startedAt: this.createdAt.valueOf(),
|
||||
finishedAt: this.finishedAt?.valueOf() || null
|
||||
|
|
@ -205,6 +206,11 @@ class MediaProgress extends Model {
|
|||
this.changed('extraData', true)
|
||||
}
|
||||
|
||||
if (progressPayload.playbackRate !== undefined) {
|
||||
this.extraData.playbackRate = progressPayload.playbackRate
|
||||
this.changed('extraData', true)
|
||||
}
|
||||
|
||||
this.set(progressPayload)
|
||||
|
||||
// Reset hideFromContinueListening if the progress has changed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue