mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-16 00:39:40 +00:00
New model update audio player, stream, collections
This commit is contained in:
parent
2d19208340
commit
65df377a49
20 changed files with 145 additions and 145 deletions
|
|
@ -61,14 +61,15 @@ class UserListeningSession {
|
|||
this.startedAt = session.startedAt
|
||||
}
|
||||
|
||||
setData(audiobook, user) {
|
||||
setData(libraryItem, user) {
|
||||
this.id = getId('ls')
|
||||
this.userId = user.id
|
||||
this.audiobookId = audiobook.id
|
||||
this.audiobookTitle = audiobook.title || ''
|
||||
this.audiobookAuthor = audiobook.authorFL || ''
|
||||
this.audiobookDuration = audiobook.duration || 0
|
||||
this.audiobookGenres = [...audiobook.genres]
|
||||
this.audiobookId = libraryItem.id
|
||||
// TODO: For podcasts this needs to be generic
|
||||
this.audiobookTitle = libraryItem.media.metadata.title || ''
|
||||
this.audiobookAuthor = libraryItem.media.metadata.authorName || ''
|
||||
this.audiobookDuration = libraryItem.media.duration || 0
|
||||
this.audiobookGenres = [...libraryItem.media.metadata.genres]
|
||||
|
||||
this.timeListening = 0
|
||||
this.lastUpdate = Date.now()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue