lib/mxfinfo.rb in mxfinfo-0.0.3.2 vs lib/mxfinfo.rb in mxfinfo-0.0.3.3
- old
+ new
@@ -11,11 +11,10 @@
def self.binary; @@binary; end
def self.binary=(binary); @@binary = binary; end
def self.scan(path)
info = InfoObject.new(path)
- info.valid? ? info : nil
end
def self.import(data)
InfoObject.new(data, false)
end
@@ -46,9 +45,11 @@
File.exists?(@filepath) ? @valid = true : @valid = false
if @valid
@mxfinfo = mxfinfo
# Check if output contains error from binary
@mxfinfo.include?("ERROR") ? @valid = false : @valid = true
+ @mxfinfo.include?("Failed to open file") ? @valid = false : @valid = true
+ @mxfinfo.include?("mxf_disk_file_open_read") ? @valid = false : @valid = true
end
else
@valid = true
@mxfinfo = input
end