mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-16 12:24:56 +02:00
New data model scanner update and change scan chunks to be based on total file size
This commit is contained in:
parent
14a8f84446
commit
f00b120e96
6 changed files with 94 additions and 36 deletions
|
@ -1,5 +1,5 @@
|
|||
const EBookFile = require('../files/EBookFile')
|
||||
const { areEquivalent, copyValue } = require('../../utils/index')
|
||||
const { areEquivalent, copyValue, getId } = require('../../utils/index')
|
||||
|
||||
class EBook {
|
||||
constructor(ebook) {
|
||||
|
@ -64,6 +64,15 @@ class EBook {
|
|||
return this.ebookFile.metadata.size
|
||||
}
|
||||
|
||||
setData(ebookFile, index) {
|
||||
this.id = getId('eb')
|
||||
this.name = ebookFile.metadata.filename
|
||||
this.index = index
|
||||
this.ebookFile = ebookFile
|
||||
this.addedAt = Date.now()
|
||||
this.updatedAt = Date.now()
|
||||
}
|
||||
|
||||
findFileWithInode(inode) {
|
||||
return this.ebookFile.ino === inode
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue