noosfero | Added video type and url formatted to video plugin (!1207)

Leandro Nunes gitlab at mg.gitlab.com
Mon May 8 17:06:39 BRT 2017


Leandro Nunes started a new discussion on plugins/video/lib/video_plugin/video_block.rb:

>    def api_content(params = {})
>      content = {:url => self.url}
>      content[:mime_type] = VideoPlugin::Video.mime_type(self.url) if VideoPlugin::Video.is_video_file?(self.url)
> +    if is_youtube?

These if's collection is not the ruby way :)
Please refactor this code to something like VideoPlugin::Video.mime_typ solution.
You could create a method like VideoPlugin::Video.video_type and VideoPlugin::Video.formatted_url or something like this

---
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/merge_requests/1207#note_29064909
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170508/6df1e028/attachment-0001.html>


More information about the Noosfero-dev mailing list