diff options
author | Heshan <heshan@heidisoft.com> | 2011-03-06 23:22:38 +0530 |
---|---|---|
committer | Heshan <heshan@heidisoft.com> | 2011-03-06 23:22:38 +0530 |
commit | 7235ebc06e881ebefe1d2c45a3b0f5304e26b936 (patch) | |
tree | 43a58a1a988ad29a03fde22e638f234564cfc275 /includes/video_helper.inc | |
parent | f1b598ecbcc28304aa33d98d6c42ab29af1c2b42 (diff) | |
download | video-7235ebc06e881ebefe1d2c45a3b0f5304e26b936.tar.gz video-7235ebc06e881ebefe1d2c45a3b0f5304e26b936.tar.bz2 |
Completed general video upload with Video field and auto thumbnails creation using FFMPEG
Diffstat (limited to 'includes/video_helper.inc')
-rw-r--r-- | includes/video_helper.inc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/includes/video_helper.inc b/includes/video_helper.inc index 0205a50..b41f657 100644 --- a/includes/video_helper.inc +++ b/includes/video_helper.inc @@ -94,15 +94,19 @@ class video_helper { // Setup our thumbnail path. $default_thumbnail = file_load($field_settings['default_video_thumbnail']); - $use_default_img = isset($variables['item']['use_default_video_thumb']) ? $variables['item']['use_default_video_thumb'] : false; + $use_default_img = isset($variables['item']['use_default_video_thumb']) ? + $variables['item']['use_default_video_thumb'] : FALSE; + if ($use_default_img && !empty($field_settings['default_video_thumbnail'])) { + // Check the checkbox to use default thumbnail on node $thumbnail->filepath = $default_thumbnail->uri; - } elseif (isset($variables['item']['video_thumb']) ? $variables['item']['video_thumb'] : false) { + } elseif (isset($variables['item']['video_thumb']) ? $variables['item']['video_thumb'] : FALSE) { + // actual video thumbnails is present $thumbnail_load = file_load($variables['item']['video_thumb']); $thumbnail->filepath = $thumbnail_load->uri; } else { //need some type of default if nothing is present - drupal_set_message(t('No thumbnail has been configured for the video !title.', array('!title' => $variables['entity']->title)), 'error'); +// drupal_set_message(t('No thumbnail has been configured for the video !title.', array('!title' => $variables['entity']->title)), 'error'); return; } |