Fix error when duration is N/A

This commit is contained in:
Rastersoft 2023-12-17 20:28:25 +00:00
parent cf386691b0
commit a84aea081b
5 changed files with 15 additions and 6 deletions

View file

@ -590,8 +590,11 @@ class ffmpeg(devedeng.executor.executor):
parts = data[0][pos:pos2].split(":")
t = 0.0
for e in parts:
t *= 60.0
t += float(e)
try:
v = float(e)
except:
continue
t = t * 60.0 + v
t /= self.final_length
self.progress_bar[1].set_fraction(t)
self.progress_bar[1].set_text("%.1f%%" % (100.0 * t))