mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-07 13:25:23 +02:00
New data model scanner update and change scan chunks to be based on total file size
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
const Path = require('path')
|
||||
const AudioFile = require('../files/AudioFile')
|
||||
const { areEquivalent, copyValue } = require('../../utils/index')
|
||||
const { areEquivalent, copyValue, getId } = require('../../utils/index')
|
||||
const AudioTrack = require('../files/AudioTrack')
|
||||
|
||||
class Audiobook {
|
||||
@@ -93,6 +93,14 @@ class Audiobook {
|
||||
return this.audioFiles.some(af => af.embeddedCoverArt)
|
||||
}
|
||||
|
||||
setData(name, index) {
|
||||
this.id = getId('ab')
|
||||
this.name = name
|
||||
this.index = index
|
||||
this.addedAt = Date.now()
|
||||
this.updatedAt = Date.now()
|
||||
}
|
||||
|
||||
update(payload) {
|
||||
var json = this.toJSON()
|
||||
var hasUpdates = false
|
||||
|
||||
Reference in New Issue
Block a user