mirror of
https://github.com/n00mkrad/flowframes.git
synced 2026-07-10 04:21:49 +02:00
AutoEncode "Delete Frames Once Encoded" works again
No longer deletes frames that are still needed (for dupes)
This commit is contained in:
@@ -94,8 +94,9 @@ namespace Flowframes.Main
|
||||
{
|
||||
foreach (int frame in frameLinesToEncode)
|
||||
{
|
||||
// TODO: Make sure frames are no longer needed (e.g. for dupes) before deleting!!
|
||||
continue;
|
||||
// Make sure frames are no longer needed (e.g. for dupes) before deleting!
|
||||
if(FrameIsStillNeeded(interpFramesLines[frame], frame))
|
||||
continue;
|
||||
|
||||
string framePath = Path.Combine(interpFramesPath, interpFramesLines[frame]);
|
||||
File.WriteAllText(framePath, "THIS IS A DUMMY FILE - DO NOT DELETE ME"); // Overwrite to save space without breaking progress counter
|
||||
@@ -119,6 +120,16 @@ namespace Flowframes.Main
|
||||
await CreateVideo.ChunksToVideos(Interpolate.current.tempFolder, videoChunksFolder, Interpolate.current.outFilename);
|
||||
}
|
||||
|
||||
static bool FrameIsStillNeeded (string frameName, int frameIndex)
|
||||
{
|
||||
for(int i = frameIndex + 1; i < interpFramesLines.Length; i++)
|
||||
{
|
||||
if (interpFramesLines[i].Contains(frameName))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool HasWorkToDo ()
|
||||
{
|
||||
if (Interpolate.canceled || interpFramesFolder == null) return false;
|
||||
|
||||
Reference in New Issue
Block a user