1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-25 11:43:17 +01:00
This commit is contained in:
Mikael Finstad 2023-08-20 15:49:40 +02:00
parent 5bc5715bf9
commit a8d47b827b
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26

View File

@ -593,11 +593,11 @@ const App = memo(() => {
const copyFileStreams = useMemo(() => Object.entries(copyStreamIdsByFile).map(([path, streamIdsMap]) => ({
path,
streamIds: Object.keys(streamIdsMap).filter(index => streamIdsMap[index]).map((streamIdStr) => parseInt(streamIdStr, 10)),
streamIds: Object.entries(streamIdsMap).filter(([, shouldCopy]) => shouldCopy).map(([streamIdStr]) => parseInt(streamIdStr, 10)),
})), [copyStreamIdsByFile]);
// total number of streams to copy for ALL files
const numStreamsToCopy = copyFileStreams.reduce((acc, { streamIds }) => acc + streamIds.length, 0);
const numStreamsToCopy = useMemo(() => copyFileStreams.reduce((acc, { streamIds }) => acc + streamIds.length, 0), [copyFileStreams]);
const allFilesMeta = useMemo(() => ({
...externalFilesMeta,