aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeshan Wanigasooriya <heshanmw@gmail.com>2011-02-20 03:15:34 +0000
committerHeshan Wanigasooriya <heshanmw@gmail.com>2011-02-20 03:15:34 +0000
commit0b35f4ec59c044fd81efd5c5b1d2cd13b2f88371 (patch)
treee32b9ddc974529269b107383dcea6dae43199d9c
parent93afb8774252485676eda4f6629b3d93e4d329f1 (diff)
downloadvideo-0b35f4ec59c044fd81efd5c5b1d2cd13b2f88371.tar.gz
video-0b35f4ec59c044fd81efd5c5b1d2cd13b2f88371.tar.bz2
Updating the file path to the thumbnails.
-rw-r--r--video.module6
1 files changed, 3 insertions, 3 deletions
diff --git a/video.module b/video.module
index 385b334..167a11b 100644
--- a/video.module
+++ b/video.module
@@ -285,19 +285,19 @@ function video_thumb_process(&$element, &$form_state) {
$transcoder = new video_transcoder;
if ($thumbs = $transcoder->generate_thumbnails($file)) {
$rnd_img = rand(0, variable_get('video_thumbs', 5) - 1);
- $default_thumb = $thumbs[$rnd_img]->uri;
+ $default_thumb = $thumbs[$rnd_img]->fid;
if (is_array($thumbs)) {
foreach ($thumbs as $fid => $img) {
// if file object contain url then use file name to identify object
- $key = $img->uri;
+ $key = $img->fid;
$thumbss[$key] = theme('image_style', array('style_name' => $field['settings']['preview_video_thumb_style'], 'path' => $img->uri));
}
}
}
if (!empty($thumbss)) {
- $element['video_thumb'] = array(
+ $element['video_thumbnail'] = array(
'#type' => 'radios',
'#title' => t('Video Thumbnails'),
'#options' => $thumbss,