| @@ 644-653 (lines=10) @@ | ||
| 641 | $info = video_get_info_by_blogpostid( $this->site->get_id(), $media_id ); |
|
| 642 | ||
| 643 | // Thumbnails |
|
| 644 | if ( function_exists( 'video_format_done' ) && function_exists( 'video_image_url_by_guid' ) ) { |
|
| 645 | $response['thumbnails'] = array( 'fmt_hd' => '', 'fmt_dvd' => '', 'fmt_std' => '' ); |
|
| 646 | foreach ( $response['thumbnails'] as $size => $thumbnail_url ) { |
|
| 647 | if ( video_format_done( $info, $size ) ) { |
|
| 648 | $response['thumbnails'][ $size ] = video_image_url_by_guid( $info->guid, $size ); |
|
| 649 | } else { |
|
| 650 | unset( $response['thumbnails'][ $size ] ); |
|
| 651 | } |
|
| 652 | } |
|
| 653 | } |
|
| 654 | ||
| 655 | $response['videopress_guid'] = $info->guid; |
|
| 656 | $response['videopress_processing_done'] = true; |
|
| @@ 1450-1459 (lines=10) @@ | ||
| 1447 | } |
|
| 1448 | ||
| 1449 | // Thumbnails |
|
| 1450 | if ( function_exists( 'video_format_done' ) && function_exists( 'video_image_url_by_guid' ) ) { |
|
| 1451 | $response['thumbnails'] = array( |
|
| 1452 | 'fmt_hd' => '', |
|
| 1453 | 'fmt_dvd' => '', |
|
| 1454 | 'fmt_std' => '', |
|
| 1455 | ); |
|
| 1456 | foreach ( $response['thumbnails'] as $size => $thumbnail_url ) { |
|
| 1457 | if ( video_format_done( $info, $size ) ) { |
|
| 1458 | $response['thumbnails'][ $size ] = video_image_url_by_guid( $info->guid, $size ); |
|
| 1459 | } else { |
|
| 1460 | unset( $response['thumbnails'][ $size ] ); |
|
| 1461 | } |
|
| 1462 | } |
|