You are here

function scald_youtube_scald_fetch in Scald YouTube 7

Implements hook_scald_fetch().

File

./scald_youtube.module, line 269
Defines a YouTube provider for Scald.

Code

function scald_youtube_scald_fetch($atom, $type) {
  $items = field_get_items('scald_atom', $atom, 'scald_thumbnail');
  if ($items && file_exists($items[0]['uri'])) {
    $atom->file_source = $atom->thumbnail_source = $items[0]['uri'];
  }
}