mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 18:42:52 -07:00
fix parallelism when set to 0
This commit is contained in:
parent
ac6d51554c
commit
a51adec836
@ -564,6 +564,9 @@ namespace MediaBrowser.Controller.Entities
|
||||
progress.Report(childrenProgress.Average());
|
||||
}
|
||||
|
||||
var fanoutConcurrency = ConfigurationManager.Configuration.LibraryScanFanoutConcurrency;
|
||||
var parallelism = fanoutConcurrency == 0 ? Environment.ProcessorCount : fanoutConcurrency;
|
||||
|
||||
var actionBlock = new ActionBlock<int>(
|
||||
async i =>
|
||||
{
|
||||
@ -588,7 +591,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
},
|
||||
new ExecutionDataflowBlockOptions
|
||||
{
|
||||
MaxDegreeOfParallelism = ConfigurationManager.Configuration.LibraryScanFanoutConcurrency,
|
||||
MaxDegreeOfParallelism = parallelism,
|
||||
CancellationToken = cancellationToken,
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user