mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-11-27 19:02:44 +01:00
Update:Scanner adjustable number of parallel audio probes to use less CPU
This commit is contained in:
1 parent
277a5fa37c
commit
86ee4dcff2
10 files changed
+372
-71
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user