Merge branch 'fix-error-when-duration-is-NA' into 'master'

Fix error when duration is N/A

See merge request rastersoft/devedeng!85
This commit is contained in:
Rastersoft 2023-12-17 20:28:25 +00:00
commit 8cd457b494
5 changed files with 15 additions and 6 deletions

View file

@ -1,5 +1,8 @@
# History of versions # # History of versions #
* version 4.18.0 (2023-12-17)
* Fix stall when ffmpeg returns N/A as the time
* version 4.17.0 (2021-12-28) * version 4.17.0 (2021-12-28)
* Added support for videos with "rotate" tag * Added support for videos with "rotate" tag

View file

@ -85,7 +85,7 @@ except:
setup( setup(
name='devedeng', name='devedeng',
version='4.17.0', version='4.18.0',
description='A video DVD creator', description='A video DVD creator',
long_description="A program that allows to create video DVDs", long_description="A program that allows to create video DVDs",

View file

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

View file

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

View file

@ -1,2 +1,2 @@
[DEFAULT] [DEFAULT]
depends: python-setuptools, python-urllib3, python-gobject2, python-cairo, gobject-introspection, gobject-introspection-runtime, gtk3, ffmpeg, mplayer, vlc, dvdauthor, mkisolinux, vcdimager, libvorbis depends: python-setuptools, python-urllib3, python-gobject, python-cairo, gobject-introspection, gobject-introspection-runtime, gtk3, ffmpeg, mplayer, vlc, dvdauthor, cdrkit, vcdimager, libvorbis