Attached is what I have working in Media Mover 2...
I created a cck filefield node, and handled that via media mover 2 ... It correctly uploaded it (I added a parameter specifically to me, as my username is a GoogleApps manage email/domain and needs that sent up with request).
Does anyone want to test out? Maybe the owner can take a look as I'm not the greatest php person...
There are some things I commented TODO in the module file:
1. It assumes your Zend lib is in sites/all/libraries... before it was looking in module dir... Maybe someone thinks both paths should be in there and wants to modify to their needs.
2. Some functions arent in mm 6.2 dev: Notably:
media_mover_api_config_current_file
media_mover_api_extract_form_data
I used what I thought would work... but for example Im not sure what should get uploaded, the original file... or the processed FFMPEG file on my end.
Optimally I'd like the smaller FFMPEG file go up but currently $file just has the current original cck source file...
This might be another step in MM, where FFMPEG tells next steps to use new converted file in upcoming steps instead of the original harvested from the node cck or filesystem dir.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | mm_youtube.module.txt | 9.45 KB | armyofda12mnkeys |
| #1 | mm_youtube.module.txt | 9.44 KB | armyofda12mnkeys |
Comments
Comment #1
armyofda12mnkeys commentedwhoops file attached...
Can you fork a new 2.x dev version voidberg to go along with mm 2.x?
Note: I think that one issue with FFMPEG is solved in mm, as I can save the new file back to cck and then upload that with youtube.
Also maybe use the Libraries API module if its available to look for where the Zend libs are, but not sure how to integrate it.
Comment #2
arthurf commentedFYI: media_mover_api_extract_form_data() is completely depreciated- it was an ugly thing to recurse through the form tree to find values for you. Now media_mover_api takes care of that for you and puts the values into $step->settings[].
For form validation, you need add a #element_validate element to your form and handle it the standard way with drupal's FAPI. I figured that was much cleaner than having a specific media mover configuration validation hook.
So probably add:
$form['mm_youtube_conf']['#element_validate'] = 'mm_youtube_config_storage_validate';
Comment #3
chuckbar77 commentedsubscribing
Comment #4
armyofda12mnkeys commentedthe step should return the full youtube url versus just the id as we need to use it to populate cck.
and also the validate step was shortened
'#element_validate' => 'mm_youtube_config_storage_validate' didnt work but
'#element_validate' => array('mm_youtube_config_storage_validate') did
Latest file attached.
Comment #5
chuckbar77 commentedDoes all the videos get uploaded to the admin's youtube account?
Thank you
Comment #6
armyofda12mnkeys commentedIt does upload to youtube under the account you provide in the media mover step.
I think the last module upgrade I attached here should be fine for a while.
It just can't populate cck/creating new node based on url returned by mm_youtube is media_mover's problem, so reported that here: http://drupal.org/node/1039186