Update:Scanner adjustable number of parallel audio probes to use less CPU

This commit is contained in:
advplyr 2022-07-16 18:54:34 -05:00
parent 277a5fa37c
commit 86ee4dcff2
10 changed files with 372 additions and 71 deletions

View file

@ -1,7 +1,7 @@
const AudioFileMetadata = require('../objects/metadata/AudioMetaTags')
class MediaProbeData {
constructor() {
constructor(probeData) {
this.embeddedCoverArt = null
this.format = null
this.duration = null
@ -26,6 +26,20 @@ class MediaProbeData {
this.discNumber = null
this.discTotal = null
if (probeData) {
this.construct(probeData)
}
}
construct(probeData) {
for (const key in probeData) {
if (key === 'audioFileMetadata' && probeData[key]) {
this[key] = new AudioFileMetadata(probeData[key])
} else if (this[key] !== undefined) {
this[key] = probeData[key]
}
}
}
getEmbeddedCoverArt(videoStream) {