mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-24 04:09:29 +01:00
Delete invalid/incomplete chunks before resuming to avoid duplicate chunks
This commit is contained in:
@@ -92,14 +92,19 @@ namespace Flowframes.Main
|
||||
IoUtils.TryDeleteIfExists(inputFrameFullPath);
|
||||
}
|
||||
|
||||
string videoChunksFolder = Path.Combine(I.current.tempFolder, Paths.chunksDir);
|
||||
|
||||
FileInfo[] invalidChunks = IoUtils.GetFileInfosSorted(videoChunksFolder, false, "????.*").Skip(encodedChunks).ToArray();
|
||||
|
||||
foreach (FileInfo chunk in invalidChunks)
|
||||
chunk.Delete();
|
||||
|
||||
int inputFramesLeft = IoUtils.GetAmountOfFiles(Path.Combine(I.current.tempFolder, Paths.framesDir), false);
|
||||
|
||||
Logger.Log($"Deleted already processed input frames - {inputFramesLeft} left to interpolate");
|
||||
|
||||
if(inputFramesLeft < 2)
|
||||
{
|
||||
string videoChunksFolder = Path.Combine(I.current.tempFolder, Paths.chunksDir);
|
||||
|
||||
if(IoUtils.GetAmountOfFiles(videoChunksFolder, true, "*.*") > 0)
|
||||
{
|
||||
Logger.Log($"No more frames left to interpolate - Merging existing video chunks instead.");
|
||||
|
||||
Reference in New Issue
Block a user