mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04: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());
|
progress.Report(childrenProgress.Average());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var fanoutConcurrency = ConfigurationManager.Configuration.LibraryScanFanoutConcurrency;
|
||||||
|
var parallelism = fanoutConcurrency == 0 ? Environment.ProcessorCount : fanoutConcurrency;
|
||||||
|
|
||||||
var actionBlock = new ActionBlock<int>(
|
var actionBlock = new ActionBlock<int>(
|
||||||
async i =>
|
async i =>
|
||||||
{
|
{
|
||||||
@ -588,7 +591,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
},
|
},
|
||||||
new ExecutionDataflowBlockOptions
|
new ExecutionDataflowBlockOptions
|
||||||
{
|
{
|
||||||
MaxDegreeOfParallelism = ConfigurationManager.Configuration.LibraryScanFanoutConcurrency,
|
MaxDegreeOfParallelism = parallelism,
|
||||||
CancellationToken = cancellationToken,
|
CancellationToken = cancellationToken,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user