mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-25 21:35:07 +02:00
New data model migration for users, bookmarks and playback sessions
This commit is contained in:
parent
4c2ad3ede5
commit
68b13ae45f
17 changed files with 462 additions and 192 deletions
|
@ -1,32 +0,0 @@
|
|||
class AudioBookmark {
|
||||
constructor(bookmark) {
|
||||
this.title = null
|
||||
this.time = null
|
||||
this.createdAt = null
|
||||
|
||||
if (bookmark) {
|
||||
this.construct(bookmark)
|
||||
}
|
||||
}
|
||||
|
||||
toJSON() {
|
||||
return {
|
||||
title: this.title || '',
|
||||
time: this.time,
|
||||
createdAt: this.createdAt
|
||||
}
|
||||
}
|
||||
|
||||
construct(bookmark) {
|
||||
this.title = bookmark.title || ''
|
||||
this.time = bookmark.time || 0
|
||||
this.createdAt = bookmark.createdAt
|
||||
}
|
||||
|
||||
setData(time, title) {
|
||||
this.title = title
|
||||
this.time = time
|
||||
this.createdAt = Date.now()
|
||||
}
|
||||
}
|
||||
module.exports = AudioBookmark
|
Loading…
Add table
Add a link
Reference in a new issue