mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-03 09:44:41 +02:00
Update:Scanner adjustable number of parallel audio probes to use less CPU
This commit is contained in:
parent
277a5fa37c
commit
86ee4dcff2
10 changed files with 372 additions and 71 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue