lib/pipeline/base.rb in tracksperanto-2.2.2 vs lib/pipeline/base.rb in tracksperanto-2.2.4
- old
+ new
@@ -14,11 +14,10 @@
class NoTrackersRecoveredError < RuntimeError
def message; "Could not recover any non-empty trackers from this file. Wrong import format maybe?"; end
end
-
# The base pipeline is the whole process of track conversion from start to finish. The pipeline object organizes the import formats, scans them,
# applies the middlewares. Here's how a calling sequence for a pipeline looks like:
#
# pipe = Tracksperanto::Pipeline::Base.new
# pipe.middleware_tuples = ["Golden", {:enabled => true}]
@@ -147,10 +146,10 @@
STDERR.puts "Import::Base#stream_parse(io) is obsolete, please rewrite your importer to use each instead"
importer.receiver = @accumulator
importer.stream_parse(io_with_progress)
else
importer.io = io_with_progress
- importer.each {|t| @accumulator.push(t) }
+ importer.each {|t| @accumulator.push(t) unless t.empty? }
end
report_progress(percent_complete = 50.0, "Validating #{@accumulator.size} imported trackers")
raise NoTrackersRecoveredError if @accumulator.size.zero?
\ No newline at end of file