mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 16:37:48 +01:00
Smarter deduplication messages
This commit is contained in:
@@ -190,7 +190,7 @@ namespace Flowframes.Magick
|
||||
foreach (string frame in framesToDelete)
|
||||
IoUtils.TryDeleteIfExists(frame);
|
||||
|
||||
string testStr = testRun ? " [TestRun]" : "";
|
||||
string testStr = testRun ? "[TESTRUN] " : "";
|
||||
|
||||
if (Interpolate.canceled) return;
|
||||
|
||||
@@ -199,15 +199,17 @@ namespace Flowframes.Magick
|
||||
float percentDeleted = ((float)framesDeleted / framePaths.Length) * 100f;
|
||||
string keptPercent = $"{(100f - percentDeleted).ToString("0.0")}%";
|
||||
|
||||
Logger.Log($"[Deduplication]{testStr} Done. Kept {framesLeft} ({keptPercent}) frames, deleted {framesDeleted} frames.", false, true);
|
||||
|
||||
if (statsFramesKept <= 0)
|
||||
if (framesDeleted <= 0)
|
||||
{
|
||||
Interpolate.Cancel("No frames were left after de-duplication!\n\nTry decreasing the de-duplication threshold.");
|
||||
Logger.Log($"Deduplication: No duplicate frames detected on this video.", false, true);
|
||||
}
|
||||
else if (statsFramesKept <= 0)
|
||||
{
|
||||
Interpolate.Cancel("No frames were left after de-duplication!\n\nTry lowering the de-duplication threshold.");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Interpolate.InterpProgressMultiplier = (framePaths.Length / (float)framesLeft);
|
||||
Logger.Log($"{testStr}Deduplication: Kept {framesLeft} ({keptPercent}) frames, deleted {framesDeleted} frames.", false, true);
|
||||
}
|
||||
}
|
||||
static float GetDifference(MagickImage img1, MagickImage img2)
|
||||
|
||||
@@ -146,12 +146,13 @@ namespace Flowframes
|
||||
float percentDeleted = ((float)framesDeleted / currentMediaFile.FrameCount) * 100f;
|
||||
string keptPercent = $"{(100f - percentDeleted).ToString("0.0")}%";
|
||||
|
||||
if (framesDeleted > 0)
|
||||
{
|
||||
if (QuickSettingsTab.trimEnabled)
|
||||
Logger.Log($"Deduplication: Kept {framesLeft} frames.");
|
||||
else
|
||||
Logger.Log($"Deduplication: Kept {framesLeft} ({keptPercent}) frames, deleted {framesDeleted} frames.");
|
||||
|
||||
// InterpProgressMultiplier = (currentMediaFile.FrameCount / (float)framesLeft);
|
||||
}
|
||||
}
|
||||
|
||||
if (!Config.GetBool("allowConsecutiveSceneChanges", true))
|
||||
|
||||
Reference in New Issue
Block a user