lib/vtools/thumbnailer.rb in vtools-0.1.1 vs lib/vtools/thumbnailer.rb in vtools-1.0.0

- old
+ new

@@ -22,11 +22,11 @@ @output_file = "#{generate_path @video.name, "thumb"}/#{@video.name}_" command = "#{CONFIG[:thumb_binary]} -i '#{@video.path}' #{options} " # callback - Handler.exec :before_thumb, @video, options + Hook.exec :before_thumb, @video, options # process cicle @total.times do |count| seconds = (options && options[:t]) || set_point(options || count) @@ -40,22 +40,22 @@ VTools.fix_encoding lines # save thumb if no error if (error = lines).empty? thumbs << thumb = {:path => file, :offset => time_offset(seconds)} - Handler.exec :in_thumb, @video, thumb # callbacks + Hook.exec :in_thumb, @video, thumb # callbacks else errors << "#{error} (#{file})" end end end # callbacks if errors.empty? - Handler.exec :thumb_success, @video, thumbs + Hook.exec :thumb_success, @video, thumbs else errors = " Errors: #{errors.flatten.join(";").gsub(/\n/, ' ')}. " - Handler.exec :thumb_error, @video, errors + Hook.exec :thumb_error, @video, errors raise ProcessError, "Thumbnailer error: #{errors}" if thumbs.empty? && @total > 0 end thumbs end