Parallel scanning/generation, and combined scanning/preview/sprite (#820)

* Implement parallel scanning and generation, and combined scanning/preview/sprite generation.
* Added UI component for preview/sprite generation during scan, and configurable number of parallel tasks.
* Add v050 changelog entry
This commit is contained in:
JoeSmithStarkers
2020-11-25 12:45:10 +11:00
committed by GitHub
parent 502e9297ad
commit e3eb550a7d
25 changed files with 445 additions and 73 deletions

View File

@@ -79,6 +79,7 @@ export const SettingsConfigurationPanel: React.FC = () => {
const [videoFileNamingAlgorithm, setVideoFileNamingAlgorithm] = useState<
GQL.HashAlgorithm | undefined
>(undefined);
const [parallelTasks, setParallelTasks] = useState<number>(0);
const [previewSegments, setPreviewSegments] = useState<number>(0);
const [previewSegmentDuration, setPreviewSegmentDuration] = useState<number>(
0
@@ -139,6 +140,7 @@ export const SettingsConfigurationPanel: React.FC = () => {
calculateMD5,
videoFileNamingAlgorithm:
(videoFileNamingAlgorithm as GQL.HashAlgorithm) ?? undefined,
parallelTasks,
previewSegments,
previewSegmentDuration,
previewExcludeStart,
@@ -182,6 +184,7 @@ export const SettingsConfigurationPanel: React.FC = () => {
setCachePath(conf.general.cachePath);
setVideoFileNamingAlgorithm(conf.general.videoFileNamingAlgorithm);
setCalculateMD5(conf.general.calculateMD5);
setParallelTasks(conf.general.parallelTasks);
setPreviewSegments(conf.general.previewSegments);
setPreviewSegmentDuration(conf.general.previewSegmentDuration);
setPreviewExcludeStart(conf.general.previewExcludeStart);
@@ -567,6 +570,31 @@ export const SettingsConfigurationPanel: React.FC = () => {
<hr />
<Form.Group>
<h4>Parallel Scan/Generation</h4>
<Form.Group id="parallel-tasks">
<h6>Number of parallel task for scan/generation</h6>
<Form.Control
className="col col-sm-6 text-input"
type="number"
value={parallelTasks}
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
setParallelTasks(
Number.parseInt(e.currentTarget.value || "0", 10)
)
}
/>
<Form.Text className="text-muted">
Set to 0 for auto-detection. Warning running more tasks than is
required to achieve 100% cpu utilisation will decrease performance
and potentially cause other issues.
</Form.Text>
</Form.Group>
</Form.Group>
<hr />
<Form.Group>
<h4>Preview Generation</h4>