Minor UI/UX fixes and improvements related to resuming

This commit is contained in:
n00mkrad
2021-09-30 19:57:59 +02:00
parent f2451e2174
commit c7a2656b85
3 changed files with 5 additions and 6 deletions

View File

@@ -54,12 +54,10 @@ namespace Flowframes.Main
{
try
{
Logger.Log($"Resume: Loading temp folder");
string resumeFolderPath = Path.Combine(tempFolderPath, Paths.resumeDir);
string settingsJsonPath = Path.Combine(resumeFolderPath, interpSettingsFilename);
InterpSettings interpSettings = JsonConvert.DeserializeObject<InterpSettings>(File.ReadAllText(settingsJsonPath));
Program.mainForm.LoadBatchEntry(interpSettings);
Logger.Log($"Resume: Loaded temp folder");
}
catch(Exception e)
{
@@ -84,8 +82,6 @@ namespace Flowframes.Main
List<string> processedInputFrames = JsonConvert.DeserializeObject<List<string>>(File.ReadAllText(inFramesJsonPath));
int uniqueInputFrames = processedInputFrames.Distinct().Count();
Logger.Log($"Preparing resumed run - Already encoded {encodedFrames} frames in {encodedChunks} chunks, processed {uniqueInputFrames} input frames");
foreach (string inputFrameName in processedInputFrames)
{
string inputFrameFullPath = Path.Combine(I.current.tempFolder, Paths.framesDir, inputFrameName);
@@ -101,7 +97,7 @@ namespace Flowframes.Main
int inputFramesLeft = IoUtils.GetAmountOfFiles(Path.Combine(I.current.tempFolder, Paths.framesDir), false);
Logger.Log($"Deleted already processed input frames - {inputFramesLeft} left to interpolate");
Logger.Log($"Resume: Already encoded {encodedFrames} frames in {encodedChunks} chunks. There are now {inputFramesLeft} input frames left to interpolate.");
if(inputFramesLeft < 2)
{

View File

@@ -45,12 +45,12 @@ namespace Flowframes
currentInputFrameCount = await GetFrameCountCached.GetFrameCountAsync(current.inPath);
current.stepByStep = false;
Program.mainForm.SetStatus("Starting...");
sw.Restart();
if (!AutoEncodeResume.resumeNextRun)
{
await GetFrames();
if (canceled) return;
sw.Restart();
await PostProcessFrames(false);
}

View File

@@ -58,6 +58,9 @@ namespace Flowframes.Ui
await Task.Delay(10);
InterpolationProgress.SetPreviewImg(await GetThumbnail(path));
if(AutoEncodeResume.resumeNextRun)
Logger.Log($"Incomplete interpolation detected. Flowframes will resume the interpolation.");
if (start)
Program.mainForm.runBtn_Click(null, null);