You are here

function scald_video_scald_fetch in Scald: Media Management made easy 7

Implements hook_scald_fetch().

File

modules/providers/scald_video/scald_video.module, line 71
Scald Video is a Scald Atom Provider for video files.

Code

function scald_video_scald_fetch($atom, $type) {
  $file_items = field_get_items('scald_atom', $atom, 'scald_thumbnail');
  if (!empty($file_items)) {
    $file_item = current($file_items);
    if (file_exists($file_item['uri'])) {
      $atom->thumbnail_source = $file_item['uri'];
    }
  }
  $atom->file_source = $atom->data['video_file'];
}