The youtube thumbnail handling in media module is awesome, checks if the local file exists and if not, copies the thumbnail to a local store.

I am desperate for this functionality in Brightcove as we use it alongside Youtube and would prefer to not add any special handling for Brightcove.

I read through the issues and noticed no patches for this, so I have written one.

Comments

cb’s picture

Hmmm, I cant add attachments when editing ... See next comment.

cb’s picture

cb’s picture

I can't take all the credit for the code, its been sourced from different locations, Youtube module and also a repo of the Brightcove module that I found elsewhere. /

/Disclaimer

davidseth’s picture

Thanks Christian. I added the ability for the images to be themed via image styles. Patch attached. This patch is your original patch plus the couple of extra lines for theming

davidseth’s picture

Status: Active » Needs review
tamasd’s picture

Version: 7.x-3.2 » 7.x-3.x-dev
Status: Needs review » Needs work

Can you reroll the patch against 7.x-3.x HEAD?

tamasd’s picture

Quick note about the patch: use Drupal's file managing functions.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new4.08 KB

This has been partially rewritten using Drupal's HTTP and file handling functions, but appears to be working correctly in my tests.

damienmckenna’s picture

StatusFileSize
new3.89 KB

Correction - the patch in #8 was for the 7.x-2.x branch, *this* patch is for 7.x-3.x.

anni’s picture

What are the possibilities after patching?
Selecting an imagecache preset for the brightcove field in views still doesn´t work.

dalin’s picture

Version: 7.x-3.x-dev » 6.x-2.x-dev
Category: feature » task
StatusFileSize
new3.37 KB

This patch removes getOriginalData() - use the cached version from brightcove_video_load() instead, though perhaps that facility should be exclusively moved into the stream wrapper. As @anni discovered, this patch does not deal with all of the Media 1.x cruft. This patch assumes that you are using Media 2.x and File Entity modules. Perhaps there should be a follow-up patch to yank out all of the Media 1.x stuff (rather than port that code here but then remove it later).

dalin’s picture

For a patch that might work for Media 1.x see #1829070: Dialog players don't work with image styles

David_Rothstein’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev
Issue summary: View changes
Status: Needs review » Needs work
StatusFileSize
new3.58 KB

It looks like #11 was actually against 7.x-3.x-dev. However, it no longer applies to the latest 7.x-3.x code (it does apply to 7.x-3.4).

Here's a reroll (also still only applies to 7.x-3.4; didn't have time to investigate the latest conflicts) which adds file override handling for the image attributes. This means that when the thumbnail appears in the WYSIWYG and you do something to change the image attributes (resize the image, set it to align left, etc) it actually works.

For a similar issue in the Media YouTube module, see #2134485: Attributes added by the WYSIWYG on YouTube preview images are not preserved.

hairqles’s picture

Status: Needs work » Closed (fixed)

Updated the patch to apply to the current 7.x-3.x and also pushed it to the 7.x-3.x branch.

Thank you guys!

hairqles’s picture

Issue tags: +7.x-3.5 release
hairqles’s picture

Issue tags: -7.x-3.5 release +7.x-3.6 release