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.
This commit is contained in:
Leonid Nikitin 2025-05-10 00:54:15 +05:00
parent 86886fb5d9
commit 17c570bf1d
Signed by: kor-elf
GPG Key ID: DAB5355A11C22541

View File

@ -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)