mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-08 04:49:37 +00:00
Fix: data recovery, Fix: Create bookmark when no user audiobook data exists #115, Fix: Book cover padding covering progress bar
This commit is contained in:
parent
cf8984a96a
commit
411409d67e
3 changed files with 7 additions and 6 deletions
|
|
@ -255,7 +255,8 @@ class Db {
|
|||
|
||||
console.log('Data recovery successful -- unlinking old')
|
||||
|
||||
await fs.unlink(orphanOld)
|
||||
var orphanOldPath = Path.join(dbdatadir, orphanOld)
|
||||
await fs.unlink(orphanOldPath)
|
||||
console.log('Removed .old file')
|
||||
var lockdirpath = Path.join(dbdatadir, `data.${dbnum}.lock`)
|
||||
await fs.rmdir(lockdirpath)
|
||||
|
|
|
|||
|
|
@ -280,10 +280,10 @@ class User {
|
|||
}
|
||||
|
||||
createBookmark({ audiobookId, time, title }) {
|
||||
if (!this.audiobooks || !this.audiobooks[audiobookId]) {
|
||||
return {
|
||||
error: 'Invalid Audiobook'
|
||||
}
|
||||
if (!this.audiobooks) this.audiobooks = {}
|
||||
if (!this.audiobooks[audiobookId]) {
|
||||
this.audiobooks[audiobookId] = new UserAudiobookData()
|
||||
this.audiobooks[audiobookId].audiobookId = audiobookId
|
||||
}
|
||||
if (this.audiobooks[audiobookId].checkBookmarkExists(time)) {
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue