Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cleaning-portalmec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Richard Fernando Heise Ferreira
cleaning-portalmec
Commits
312c72bc
Commit
312c72bc
authored
7 years ago
by
Israel Barreto Sant'Anna
Browse files
Options
Downloads
Patches
Plain Diff
Added .avi to video converter
parent
5bb0f3a5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/workers/convert_video_worker.rb
+1
-1
1 addition, 1 deletion
app/workers/convert_video_worker.rb
lib/tasks/convert_video.rake
+1
-4
1 addition, 4 deletions
lib/tasks/convert_video.rake
with
2 additions
and
5 deletions
app/workers/convert_video_worker.rb
+
1
−
1
View file @
312c72bc
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
lib/tasks/convert_video.rake
+
1
−
4
View file @
312c72bc
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment