Hello
I am trying to use this great module for a video community site with Local FFmpeg installation. The problem starts when a user uploads a (broken) video that fails to transcode and the node must deleted (best) or at least prevent from publishing a ‘Thumbnail not availble’ teaser leading to a broken node.
As a non-programmer user this is the only way I managed to make it work.
So i set the video node to default workflow 'not published' and I add in function _bd_video_render_video this
node_delete($node->nid);
(starts at line 380)
case 'idle':
node_delete($node->nid);// <<<--- ADDED THIS: Delete the node - But Its not working!
$output = '<p>' . t('Transcoding failed. Please try another video.') . '</p>';
break;
but its not working so i add a $node->promote = 1; in
(starts at line 325)
function _bd_video_render_video($video, $formatter, $nid = 0, $autostart = NULL) {
if($video['flv_file']) {
switch($formatter) {
case 'default':
$node->promote = 1; // <<<--- ADDED THIS: Publish the node - its works!
$output = _bd_video_player_render($video);
break;
and the nodes become published only if the transcoder finish successfully.
But I thing deleting the nodes saves us time from frequently checking and manually deleting every node by hand. Now i am stuck to drupal api docs so if anyone can help with directions / suggestions to look for?
Thanks.
[Centos5.4/PHP5.2/APACHE2/DRUPAL6.19/bd_video-6.x-1.2/flowplayer-6.x-1.x-dev/storage_api-6.x-1.2/
FFmpeg version 0.5.2]