mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-04 22:45:02 +02:00
Update scanner v3, add isActive support for users
This commit is contained in:
parent
394d312282
commit
beaa1e14bb
13 changed files with 230 additions and 160 deletions
|
@ -75,20 +75,10 @@ class Server {
|
|||
})
|
||||
}
|
||||
|
||||
async newFilesAdded({ dir, files }) {
|
||||
Logger.info(files.length, 'New Files Added in dir', dir)
|
||||
var result = await this.scanner.scanAudiobook(dir)
|
||||
Logger.info('New Files Added result', result)
|
||||
}
|
||||
async filesRemoved({ dir, files }) {
|
||||
Logger.info(files.length, 'Files Removed in dir', dir)
|
||||
var result = await this.scanner.scanAudiobook(dir)
|
||||
Logger.info('Files Removed result', result)
|
||||
}
|
||||
async filesRenamed({ dir, files }) {
|
||||
Logger.info(files.length, 'Files Renamed in dir', dir)
|
||||
var result = await this.scanner.scanAudiobook(dir)
|
||||
Logger.info('Files Renamed result', result)
|
||||
async filesChanged(files) {
|
||||
Logger.info('[Server]', files.length, 'Files Changed')
|
||||
var result = await this.scanner.filesChanged(files)
|
||||
Logger.info('[Server] Files changed result', result)
|
||||
}
|
||||
|
||||
async scan() {
|
||||
|
@ -125,9 +115,7 @@ class Server {
|
|||
this.auth.init()
|
||||
|
||||
this.watcher.initWatcher()
|
||||
this.watcher.on('new_files', this.newFilesAdded.bind(this))
|
||||
this.watcher.on('removed_files', this.filesRemoved.bind(this))
|
||||
this.watcher.on('renamed_files', this.filesRenamed.bind(this))
|
||||
this.watcher.on('files', this.filesChanged.bind(this))
|
||||
}
|
||||
|
||||
authMiddleware(req, res, next) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue