Skip to content
Snippets Groups Projects
Commit 312c72bc authored by Israel Barreto Sant'Anna's avatar Israel Barreto Sant'Anna
Browse files

Added .avi to video converter

parent 5bb0f3a5
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment