| @@ 639-648 (lines=10) @@ | ||
| 636 | $info = video_get_info_by_blogpostid( $this->site->get_id(), $media_id ); |
|
| 637 | ||
| 638 | // Thumbnails |
|
| 639 | if ( function_exists( 'video_format_done' ) && function_exists( 'video_image_url_by_guid' ) ) { |
|
| 640 | $response['thumbnails'] = array( 'fmt_hd' => '', 'fmt_dvd' => '', 'fmt_std' => '' ); |
|
| 641 | foreach ( $response['thumbnails'] as $size => $thumbnail_url ) { |
|
| 642 | if ( video_format_done( $info, $size ) ) { |
|
| 643 | $response['thumbnails'][ $size ] = video_image_url_by_guid( $info->guid, $size ); |
|
| 644 | } else { |
|
| 645 | unset( $response['thumbnails'][ $size ] ); |
|
| 646 | } |
|
| 647 | } |
|
| 648 | } |
|
| 649 | ||
| 650 | $response['videopress_guid'] = $info->guid; |
|
| 651 | $response['videopress_processing_done'] = true; |
|
| @@ 1462-1471 (lines=10) @@ | ||
| 1459 | } |
|
| 1460 | ||
| 1461 | // Thumbnails |
|
| 1462 | if ( function_exists( 'video_format_done' ) && function_exists( 'video_image_url_by_guid' ) ) { |
|
| 1463 | $response['thumbnails'] = array( |
|
| 1464 | 'fmt_hd' => '', |
|
| 1465 | 'fmt_dvd' => '', |
|
| 1466 | 'fmt_std' => '', |
|
| 1467 | ); |
|
| 1468 | foreach ( $response['thumbnails'] as $size => $thumbnail_url ) { |
|
| 1469 | if ( video_format_done( $info, $size ) ) { |
|
| 1470 | $response['thumbnails'][ $size ] = video_image_url_by_guid( $info->guid, $size ); |
|
| 1471 | } else { |
|
| 1472 | unset( $response['thumbnails'][ $size ] ); |
|
| 1473 | } |
|
| 1474 | } |
|