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
Comment #1
cbHmmm, I cant add attachments when editing ... See next comment.
Comment #2
cbComment #3
cbI 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
Comment #4
davidseth commentedThanks 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
Comment #5
davidseth commentedComment #6
tamasd commentedCan you reroll the patch against 7.x-3.x HEAD?
Comment #7
tamasd commentedQuick note about the patch: use Drupal's file managing functions.
Comment #8
damienmckennaThis has been partially rewritten using Drupal's HTTP and file handling functions, but appears to be working correctly in my tests.
Comment #9
damienmckennaCorrection - the patch in #8 was for the 7.x-2.x branch, *this* patch is for 7.x-3.x.
Comment #10
anni commentedWhat are the possibilities after patching?
Selecting an imagecache preset for the brightcove field in views still doesn´t work.
Comment #11
dalinThis 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).
Comment #12
dalinFor a patch that might work for Media 1.x see #1829070: Dialog players don't work with image styles
Comment #13
David_Rothstein commentedIt 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.
Comment #14
hairqles commentedUpdated 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!
Comment #15
hairqles commentedComment #16
hairqles commented