@@ 1364-1373 (lines=10) @@ | ||
1361 | } |
|
1362 | ||
1363 | // Thumbnails |
|
1364 | if ( function_exists( 'video_format_done' ) && function_exists( 'video_image_url_by_guid' ) ) { |
|
1365 | $response['thumbnails'] = array( 'fmt_hd' => '', 'fmt_dvd' => '', 'fmt_std' => '' ); |
|
1366 | foreach ( $response['thumbnails'] as $size => $thumbnail_url ) { |
|
1367 | if ( video_format_done( $info, $size ) ) { |
|
1368 | $response['thumbnails'][ $size ] = video_image_url_by_guid( $info->guid, $size ); |
|
1369 | } else { |
|
1370 | unset( $response['thumbnails'][ $size ] ); |
|
1371 | } |
|
1372 | } |
|
1373 | } |
|
1374 | ||
1375 | // If we didn't get VideoPress information (for some reason) then let's |
|
1376 | // not try and include it in the response. |
@@ 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; |