lib/pipeline/base.rb in tracksperanto-1.3.1 vs lib/pipeline/base.rb in tracksperanto-1.4.0
- old
+ new
@@ -70,10 +70,12 @@
elsif d.match?
raise "Width and height must be provided for a #{d.importer_klass}" unless (opts[:pix_w] && opts[:pix_h])
opts[:parser] = d.importer_klass
else
raise "Cannot autodetect the file format - please specify the importer explicitly" unless opts[:parser]
- raise "Width and height must be provided for this importer" unless (opts[:pix_w] && opts[:pix_h])
+ unless opts[:parser].autodetects_size?
+ raise "Width and height must be provided for this importer" unless (opts[:pix_w] && opts[:pix_h])
+ end
end
[opts[:pix_w], opts[:pix_h], opts[:parser]]
end
\ No newline at end of file