mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-14 15:59:38 +00:00
Scanner ignore .part files #2063
This commit is contained in:
parent
80fee92037
commit
2a11932822
2 changed files with 17 additions and 6 deletions
|
|
@ -1,3 +1,4 @@
|
|||
const Path = require('path')
|
||||
const EventEmitter = require('events')
|
||||
const Watcher = require('./libs/watcher/watcher')
|
||||
const Logger = require('./Logger')
|
||||
|
|
@ -177,10 +178,16 @@ class FolderWatcher extends EventEmitter {
|
|||
Logger.error(`[Watcher] New file folder not found in library "${libwatcher.name}" with path "${path}"`)
|
||||
return
|
||||
}
|
||||
|
||||
const folderFullPath = filePathToPOSIX(folder.fullPath)
|
||||
|
||||
const relPath = path.replace(folderFullPath, '')
|
||||
|
||||
if (Path.extname(relPath).toLowerCase() === '.part') {
|
||||
Logger.debug(`[Watcher] Ignoring .part file "${relPath}"`)
|
||||
return
|
||||
}
|
||||
|
||||
// Ignore files/folders starting with "."
|
||||
const hasDotPath = relPath.split('/').find(p => p.startsWith('.'))
|
||||
if (hasDotPath) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue