mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-28 09:38:56 +01: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
@ -4,7 +4,7 @@
|
||||
<div class="w-full h-full" :style="{ marginTop: sizeMultiplier + 'rem' }">
|
||||
<div v-if="shelf.books" class="flex items-center -mb-2">
|
||||
<template v-for="entity in shelf.books">
|
||||
<cards-book-card :key="entity.id" :width="bookCoverWidth" :user-progress="userAudiobooks[entity.id]" :audiobook="entity" @hook:updated="updatedBookCard" @edit="editBook" />
|
||||
<cards-book-card :key="entity.id" :width="bookCoverWidth" :user-progress="userAudiobooks[entity.id]" :audiobook="entity" @hook:updated="updatedBookCard" :padding-y="24" @edit="editBook" />
|
||||
</template>
|
||||
</div>
|
||||
<div v-else-if="shelf.series" class="flex items-center -mb-2">
|
||||
|
@ -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…
Reference in New Issue
Block a user