From 17c570bf1d2dec7df5e90672cb2a87a22e696162 Mon Sep 17 00:00:00 2001 From: Leonid Nikitin Date: Sat, 10 May 2025 00:54:15 +0500 Subject: [PATCH] Fixed error handling for setting default duration on failure Previously, failures in getting the total duration resulted in queue status updates and interruptions due to errors. Now, if we could not determine the duration, we return zero. This will at least allow us to simply convert without a progress bar. --- kernel/app.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kernel/app.go b/kernel/app.go index 54a82f1..e1ec4f9 100644 --- a/kernel/app.go +++ b/kernel/app.go @@ -84,10 +84,7 @@ func (a App) RunConvertor() { totalDuration, err := a.convertorService.GetTotalDuration(&queue.Setting.VideoFileInput) if err != nil { - queue.Status = StatusType(Error) - queue.Error = err - a.Window.GetLayout().ChangeQueueStatus(queueId, queue) - continue + totalDuration = 0 } progress := a.Window.GetLayout().NewProgressbar(queueId, totalDuration)