mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-18 10:59:41 +02: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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user