mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 00:17:44 +01:00
Handle situation where interp fails without any log writes
This commit is contained in:
@@ -119,9 +119,16 @@ namespace Flowframes.Os
|
||||
|
||||
if (!Interpolate.currentSettings.ai.Piped && interpFramesCount < 3)
|
||||
{
|
||||
string amount = interpFramesCount > 0 ? $"Only {interpFramesCount}" : "No";
|
||||
|
||||
if (lastLogName.IsEmpty())
|
||||
{
|
||||
Interpolate.Cancel($"Interpolation failed - {amount} interpolated frames were created, and no log was written.");
|
||||
return;
|
||||
}
|
||||
|
||||
string[] logLines = File.ReadAllLines(Path.Combine(Paths.GetLogPath(), lastLogName + ".txt"));
|
||||
string log = string.Join("\n", logLines.Reverse().Take(10).Reverse().Select(x => x.Split("]: ").Last()).ToList());
|
||||
string amount = interpFramesCount > 0 ? $"Only {interpFramesCount}" : "No";
|
||||
Interpolate.Cancel($"Interpolation failed - {amount} interpolated frames were created.\n\n\nLast 10 log lines:\n{log}\n\nCheck the log '{lastLogName}' for more details.");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user