mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2025-12-31 06:09:39 -06:00
adding more debugging to time percentage
This commit is contained in:
@@ -164,6 +164,7 @@ namespace FileFlows.VideoNodes
|
||||
{
|
||||
var timeString = rgxTime.Match(e.Data).Value;
|
||||
var ts = TimeSpan.Parse(timeString);
|
||||
Logger.DLog("TimeSpan Detected: " + ts);
|
||||
if (AtTime != null)
|
||||
AtTime.Invoke(ts);
|
||||
}
|
||||
|
||||
@@ -57,8 +57,12 @@ namespace FileFlows.VideoNodes
|
||||
void AtTimeEvent(TimeSpan time)
|
||||
{
|
||||
if (TotalTime.TotalMilliseconds == 0)
|
||||
{
|
||||
args?.Logger?.DLog("Can't report time progress as total time is 0");
|
||||
return;
|
||||
}
|
||||
float percent = (float)((time.TotalMilliseconds / TotalTime.TotalMilliseconds) * 100);
|
||||
args?.Logger?.ILog($"Time Percent: {percent} ({time.TotalMilliseconds}) ({TotalTime.TotalMilliseconds})");
|
||||
args?.PartPercentageUpdate(percent);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user