| @@ 643-652 (lines=10) @@ | ||
| 640 | $info = video_get_info_by_blogpostid( $this->site->get_id(), $media_id ); |
|
| 641 | ||
| 642 | // Thumbnails |
|
| 643 | if ( function_exists( 'video_format_done' ) && function_exists( 'video_image_url_by_guid' ) ) { |
|
| 644 | $response['thumbnails'] = array( 'fmt_hd' => '', 'fmt_dvd' => '', 'fmt_std' => '' ); |
|
| 645 | foreach ( $response['thumbnails'] as $size => $thumbnail_url ) { |
|
| 646 | if ( video_format_done( $info, $size ) ) { |
|
| 647 | $response['thumbnails'][ $size ] = video_image_url_by_guid( $info->guid, $size ); |
|
| 648 | } else { |
|
| 649 | unset( $response['thumbnails'][ $size ] ); |
|
| 650 | } |
|
| 651 | } |
|
| 652 | } |
|
| 653 | ||
| 654 | $response['videopress_guid'] = $info->guid; |
|
| 655 | $response['videopress_processing_done'] = true; |
|
| @@ 1430-1439 (lines=10) @@ | ||
| 1427 | } |
|
| 1428 | ||
| 1429 | // Thumbnails |
|
| 1430 | if ( function_exists( 'video_format_done' ) && function_exists( 'video_image_url_by_guid' ) ) { |
|
| 1431 | $response['thumbnails'] = array( |
|
| 1432 | 'fmt_hd' => '', |
|
| 1433 | 'fmt_dvd' => '', |
|
| 1434 | 'fmt_std' => '', |
|
| 1435 | ); |
|
| 1436 | foreach ( $response['thumbnails'] as $size => $thumbnail_url ) { |
|
| 1437 | if ( video_format_done( $info, $size ) ) { |
|
| 1438 | $response['thumbnails'][ $size ] = video_image_url_by_guid( $info->guid, $size ); |
|
| 1439 | } else { |
|
| 1440 | unset( $response['thumbnails'][ $size ] ); |
|
| 1441 | } |
|
| 1442 | } |
|