Now doesn't fail with AVPROBE or FFPROBE if a file doesn't have streams

This commit is contained in:
Sergio Costas 2015-01-16 01:30:44 +01:00
parent 0a437b5bbb
commit f765450864
4 changed files with 10 additions and 1 deletions

View file

@ -47,6 +47,9 @@ Some of the future ideas to add to Devede NG are, without an specific order:
## History of versions ##
* version 0.1 beta 9 (2015-01-16)
* Now doesn't fail with AVPROBE or FFPROBE if a file doesn't have streams
* version 0.1 beta 8 (2014-12-28)
* Added an extra fix for AVPROBE and FFPROBE, using the human readable strings to get the duration
* Cleaner code for AVPROBE and FFPROBE

View file

@ -88,6 +88,9 @@ class avprobe(devede.executor.executor):
except:
return True # There was an error reading the JSON data
if not("streams" in video_data):
return True # There are no streams!!!!!
for element in video_data["streams"]:
if (self.original_length == -1) and ("duration" in element):

View file

@ -35,7 +35,7 @@ class configuration(GObject.GObject):
def __init__(self):
GObject.GObject.__init__(self)
self.version = "0.1 Beta 8"
self.version = "0.1 Beta 9"
def fill_config(self):

View file

@ -88,6 +88,9 @@ class ffprobe(devede.executor.executor):
except:
return True # There was an error reading the JSON data
if not("streams" in video_data):
return True # There are no streams!!!!!
for element in video_data["streams"]:
if (self.original_length == -1) and ("duration" in element):