-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jmrunge/image support #198
Closed
Closed
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
0dc27d6
Added media types object
jmrunge 9e85773
Modified ffmpeg to use seconds for screenshot from options if set
jmrunge 178e2e0
Added support for handling image files on scrape
jmrunge 786a1be
Show type on media attributes
jmrunge 02bb58c
Allow pieces to be clickable (so modal window with attrs to edit can …
jmrunge 649db4c
Add type to attrs to show in row mode
jmrunge 08df79b
Add modal target for showing modal dialogs
jmrunge 2928804
Added image edit template
jmrunge d98ab78
Export image edit template
jmrunge f2e1345
Added ImageEditPrompt
jmrunge b19c3c1
Added imageEdit function
jmrunge 95d11c0
Added itemEdit target for editing Pieces
jmrunge ec0eec8
Fixed missing type function, requires update from mbc-common
jmrunge 4cc5880
Make Piece to show its length on edit prompt
jmrunge 81893e9
Add alert function
jmrunge 7acdcbe
Validate length input format
jmrunge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
var _ = require('underscore') | ||
; | ||
module.exports = { | ||
types: [{ | ||
type: 'image', | ||
seconds: 0, | ||
isMedia: function(filename) { | ||
return filename.match(/\.(bmp|gif|jpg|png|yuv|pix|dpx|exr|jpeg|pam|pbm|pcx|pgm|pic|ppm|ptx|sgi|tif|tiff|webp|xbm|xwd)$/i); | ||
} | ||
}, | ||
{ | ||
type: 'video', | ||
seconds: 5, | ||
isMedia: function(filename) { | ||
return filename.match(/\.(webm|mp4|flv|avi|mpeg|mpeg2|mpg|mov|mkv|ogm|ogg)$/i); | ||
} | ||
}], | ||
isMedia: function(filename) { | ||
return _.some(this.types, function(type) { | ||
return type.isMedia(filename); | ||
}); | ||
}, | ||
getType: function(filename) { | ||
return _.find(this.types, function(type) { | ||
return type.isMedia(filename); | ||
}); | ||
}, | ||
getSeconds: function(type) { | ||
return _.findWhere(this.types, {type: type}).seconds; | ||
} | ||
}; | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
- var submit = i18n.gettext("Submit") | ||
- var cancel = i18n.gettext("Cancel") | ||
|
||
.bbm-modal__topbar | ||
h3.bbm-modal__title= title | ||
.bbm-modal__section | ||
fieldset | ||
legend.editor= duration | ||
input#duration(type="text", style="width:200px", value=duration_value) | ||
.bbm-modal__bottombar | ||
a.bbm-button.submit(href="#")= submit | ||
a.bbm-button.cancel(href="#")= cancel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe in the future we can use something like node-mime
https://github.com/broofa/node-mime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its nice, but I dont know if all the image or video types identified by node-mime are supported by ffmpeg. And as for using our custom types file, I think perhaps is better to use then our own "mime" handling. Sure it should be moved to common in the very near future so mosto and caspa use the same code.