You are here

function asset_youtube_assetapi in Asset 5

Same name and namespace in other branches
  1. 6 asset_youtube/asset_youtube.module \asset_youtube_assetapi()

File

asset_youtube/asset_youtube.module, line 202

Code

function asset_youtube_assetapi($op = 'list', $asset = null) {
  switch ($op) {
    case 'load':
      if ($asset->extension == 'youtube') {
        $fields['url'] = 'http://youtube.com/watch?v=' . str_replace('.youtube', '', $asset->filename);
      }
      return $fields;
  }
}