lib/daengine/teamsite_metadata_parser.rb in daengine-0.3.9.3 vs lib/daengine/teamsite_metadata_parser.rb in daengine-0.3.9.4

- old
+ new

@@ -136,10 +136,13 @@ if File.exist?(file) docs << doc if(File.mtime(file) > last_read) begin exifdata = ::MiniExiftool.new(file) # spaces in filename - doc['pages'] = exifdata.pagecount || exifdata.pages || exifdata.slides # or exifdata['Slides'] + pages = exifdata.pagecount + pages = exifdata.pages if pages.blank? + pages = exifdata.slides if pages.blank? + doc['pages'] = pages doc['size'] = exifdata.filesize doc['mime_type'] = exifdata.mimetype Daengine.log "Exif data for #{file} was pages:#{doc['pages']}, size:#{doc['size']}", "info" rescue Exception => e Daengine.log "Error reading metadata from #{file} #{e.message}", "error" \ No newline at end of file