return nothing if file does not exist
This commit is contained in:
parent
7b062f9a4f
commit
0f5252e7a7
1 changed files with 4 additions and 1 deletions
|
@ -34,7 +34,10 @@ class Info:
|
||||||
self.input.props.location = videofile
|
self.input.props.location = videofile
|
||||||
self.dbin = self.pipeline.get_by_name('dbin')
|
self.dbin = self.pipeline.get_by_name('dbin')
|
||||||
|
|
||||||
|
if os.path.exists(videofile):
|
||||||
self.metadata['size'] = os.stat(videofile).st_size
|
self.metadata['size'] = os.stat(videofile).st_size
|
||||||
|
else:
|
||||||
|
self.metadata['size'] = 0:
|
||||||
if self.metadata['size'] != 0:
|
if self.metadata['size'] != 0:
|
||||||
self.bus = self.pipeline.get_bus()
|
self.bus = self.pipeline.get_bus()
|
||||||
self.dbin.connect('new-decoded-pad', self.demux_pad_added)
|
self.dbin.connect('new-decoded-pad', self.demux_pad_added)
|
||||||
|
|
Loading…
Reference in a new issue