From 312c72bce72d6edec568cbd23bb63966508427a7 Mon Sep 17 00:00:00 2001 From: Israel Barreto Sant'Anna <ibsa14@inf.ufpr.br> Date: Wed, 22 Nov 2017 12:05:34 -0200 Subject: [PATCH] Added .avi to video converter --- app/workers/convert_video_worker.rb | 2 +- lib/tasks/convert_video.rake | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/workers/convert_video_worker.rb b/app/workers/convert_video_worker.rb index ca21419e0..f01a19bf8 100644 --- a/app/workers/convert_video_worker.rb +++ b/app/workers/convert_video_worker.rb @@ -32,7 +32,7 @@ class ConvertVideoWorker # convert if object has a flv and not a mp4 video = nil dspace_object.bit_streams.each do |bitstream| - video = bitstream if bitstream.name =~ /(.flv|.wmv|.mov|.mpg)$/i + video = bitstream if bitstream.name =~ /(.flv|.wmv|.mov|.mpg|.avi)$/i return true if bitstream.name =~ /.mp4$/i end diff --git a/lib/tasks/convert_video.rake b/lib/tasks/convert_video.rake index 8f5ac63ff..01553d29c 100644 --- a/lib/tasks/convert_video.rake +++ b/lib/tasks/convert_video.rake @@ -29,15 +29,12 @@ namespace :convert do items.each do |item| item.attachments.each do |attachment| - if attachment.name =~ /(.flv|.wmv|.mov|.mpg)$/i + if attachment.name =~ /(.flv|.wmv|.mov|.mpg|.avi)$/i ConvertVideoWorker.perform_async(item.id) p "Convert learning object #{item.id}" end end end - - # Increment offset, to get new items on next iteration - offset += limit end end -- GitLab