Remove force re-scan and old scanner logic

This commit is contained in:
advplyr 2023-09-04 13:59:37 -05:00
parent b9da3fa30e
commit b1c07834be
14 changed files with 146 additions and 689 deletions

View file

@ -153,12 +153,12 @@ class AudioFileScanner {
const probeData = await prober.probe(libraryFile.metadata.path)
if (probeData.error) {
Logger.error(`[MediaFileScanner] ${probeData.error} : "${libraryFile.metadata.path}"`)
Logger.error(`[AudioFileScanner] ${probeData.error} : "${libraryFile.metadata.path}"`)
return null
}
if (!probeData.audioStream) {
Logger.error('[MediaFileScanner] Invalid audio file no audio stream')
Logger.error('[AudioFileScanner] Invalid audio file no audio stream')
return null
}
@ -195,5 +195,15 @@ class AudioFileScanner {
return results
}
/**
*
* @param {AudioFile} audioFile
* @returns {object}
*/
probeAudioFile(audioFile) {
Logger.debug(`[AudioFileScanner] Running ffprobe for audio file at "${audioFile.metadata.path}"`)
return prober.rawProbe(audioFile.metadata.path)
}
}
module.exports = new AudioFileScanner()